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]
Date:	Tue, 2 Dec 2008 20:05:45 +0000
From:	Matthew Garrett <mjg59@...f.ucam.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, Matt_Domsch@...l.com, greg@...ah.com,
	linux-acpi@...r.kernel.org, Richard Purdie <rpurdie@...ys.net>,
	Ivo van Doorn <ivdoorn@...il.com>
Subject: Re: [PATCH 2/2] misc: Add dell-laptop driver

On Tue, Dec 02, 2008 at 11:50:29AM -0800, Andrew Morton wrote:
> > +struct calling_interface_buffer {
> > +	u16 class;
> > +	u16 select;
> > +	volatile u32 input[4];
> > +	volatile u32 output[4];
> > +} __attribute__ ((packed));
> 
> We have that little __packed helper for this.

Ok. I've switched to that, although the __attribute__ notation seems to 
be the dominant form in the kernel right now.

> > +static struct dmi_system_id __initdata dell_device_table[] = {
> 
> this can be made const.

Done.

> > +	da_num_tokens += tokens;
> > +}
> 
> OK.  No locking is needed for updates to the global state?

The parse function is called once during module init, before the driver 
is registered. On the other hand, that makes me realise that we leak it 
if something else fails, so I've fixed that up as well.

> > +#ifdef CONFIG_ACPI
> > +	if (acpi_video_backlight_support())
> > +		return 0;
> > +#endif
> 
> Do we need the ifdefs here?  It looks like include/linux/acpi.h tries
> to provide a suitable 0-returning stub?

They're protected by #ifdef CONFIG_ACPI_VIDEO, but it looks like acpi.h 
is empty if CONFIG_ACPI isn't set?

> > +			dell_backlight_device = NULL;
> > +			ret = PTR_ERR(dell_backlight_device);
> 
> The above two statements are in the wrong order.

Good catch, thanks.

-- 
Matthew Garrett | mjg59@...f.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ