From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Matt_Domsch@dell.com,
greg@kroah.com, linux-acpi@vger.kernel.org,
Richard Purdie <rpurdie@rpsys.net>,
Ivo van Doorn <ivdoorn@gmail.com>
Subject: Re: [PATCH 2/2] misc: Add dell-laptop driver
Date: Tue, 2 Dec 2008 20:05:45 +0000 [thread overview]
Message-ID: <20081202200544.GA31620@srcf.ucam.org> (raw)
In-Reply-To: <20081202115029.2b9d1153.akpm@linux-foundation.org>
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@srcf.ucam.org
next prev parent reply other threads:[~2008-12-02 20:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-27 16:33 [PATCH 1/2] dcdbas: Export functionality for use in other drivers Matthew Garrett
2008-11-27 16:34 ` [PATCH 2/2] misc: Add dell-laptop driver Matthew Garrett
2008-12-02 17:02 ` Matt Domsch
2008-12-02 17:03 ` Matthew Garrett
2008-12-02 19:50 ` Andrew Morton
2008-12-02 20:05 ` Matthew Garrett [this message]
2008-12-02 20:22 ` Andrew Morton
2008-12-02 20:30 ` Matthew Garrett
2008-12-02 20:16 ` [PATCH 2/2 update] " Matthew Garrett
2008-12-03 12:37 ` Alan Jenkins
2008-12-03 13:01 ` none
2008-12-05 2:05 ` Henrique de Moraes Holschuh
2008-12-03 19:14 ` Len Brown
2008-12-03 19:52 ` Matthew Garrett
2008-12-04 9:12 ` Sven Wegener
2008-12-04 11:00 ` Alan Jenkins
2008-12-05 2:08 ` Henrique de Moraes Holschuh
2008-12-02 3:52 ` [PATCH 1/2] dcdbas: Export functionality for use in other drivers Greg KH
2008-12-02 4:03 ` Matthew Garrett
2008-12-02 17:03 ` Matt Domsch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081202200544.GA31620@srcf.ucam.org \
--to=mjg59@srcf.ucam.org \
--cc=Matt_Domsch@dell.com \
--cc=akpm@linux-foundation.org \
--cc=greg@kroah.com \
--cc=ivdoorn@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox