lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1457124096.29260.30.camel@gmail.com>
Date:	Fri, 04 Mar 2016 15:41:36 -0500
From:	Evan McClain <aeroevan@...il.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Jacek Anaszewski <j.anaszewski@...sung.com>
Cc:	Richard Purdie <rpurdie@...ys.net>, Bryan Wu <cooloney@...il.com>,
	Simon Que <sque@...omium.org>,
	Olof Johansson <olofj@...omium.org>,
	Duncan Laurie <dlaurie@...omium.org>,
	Guenter Roeck <groeck@...omium.org>,
	linux-kernel@...r.kernel.org, linux-leds@...r.kernel.org
Subject: Re: [PATCH] leds: Add Chrome OS keyboard backlight LEDs driver

On Fri, 2016-03-04 at 11:13 -0800, Dmitry Torokhov wrote:
> On Fri, Mar 04, 2016 at 10:38:40AM +0100, Jacek Anaszewski wrote:
> > 
> > Hi Evan,
> > 
> > On 03/04/2016 09:38 AM, Evan McClain wrote:
> > > 
> > > On Thu, 2016-03-03 at 15:46 -0800, Dmitry Torokhov wrote:
> > > > 
> > > > From: Simon Que <sque@...omium.org>
> > > > 
> > > > This is a driver for ACPI-based keyboard backlight LEDs found
> > > > on
> > > > Chromebooks. The driver locates \\_SB.KBLT ACPI device and
> > > > exports
> > > > backlight as "chromeos::kbd_backlight" LED class device in
> > > > sysfs.
> > > Was it ever decided where this driver should live? I was planning
> > > on
> > > submitting to platform/chrome since most keyboard backlights seem
> > > to
> > > live over there but I don't think I got a response.
> > > 
> > It hasn't been decided yet. I can take it, but could you submit one
> > more
> > version, without
> > 
> > 'owner	= THIS_MODULE' in struct platform_driver
> > keyboard_led_driver ?
> > 
> > It is redundant, because the core will do it.
> > 
> > Also the line with devm_kzalloc has over 80 characters.
> Also:
> 
> - preferably use sizeof(*cdev) instead of sizeof(struct ...)
> - do not check cdev->flags & LED_SUSPENDED in
>   keyboard_led_set_brightness() as it is not going to be called when
> led
>   device is suspended anyway

Your patch is definitely better, I was only taking Simon's original
submission and doing the minimal cleanup to help get it submitted (as
someone using mainline linux on a pixel 2/samus).

> - change the MODULE_LICENSE from "GPL v2" to "GPL" as to match the
>   actual license notice

I think this got changed in one of the revisions in error.

> - report ACPI errors in error messages (since we clobber them)
> - preferably use ENXIO instead of ENODEV

Most other drivers seem to use ENODEV on probe, but I'm in the 'learn
through grep' level of understanding for parts of linux.

> - maybe add "depends on CHROME_PLATFORMS || COMPILE_TEST" so that we
> do
>   not prompt for it on non-Chrome platforms

Adding depends on CHROME_PLATFORMS definitely makes sense, but also
might support putting this driver in platform/chrome. Either way I just
selfishly want better mainline support for this laptop.

The only change I made (other than the changes suggested by Jacek) was
to remove the line setting brightness to max_brightness on probe. I can
resubmit a cleaned up patch incorporating your changes unless you would
like to take over.

Thanks
-- 
Evan McClain
https://keybase.io/aeroevan

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ