Re: [PATCH 2/2] Add Dell laptop driver

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Tuesday, August 19, 2008 - 11:46 pm

On Sat, 16 Aug 2008 21:30:27 +0100 Matthew Garrett <mjg59@srcf.ucam.org> wrote:


whitespace gone wild.


checkpatch will direct you to a fine document.

If the `volatiles' are unavoidable then I'd suggest that both the
changelog and code comments explain the reason(s) for their addition.


Make the above three members a `struct dmi_header' ...


... and switch this to container_of().


krealloc() can fail.


static struct calling_interface_buffer *
dell_send_request(struct calling_interface_buffer *buffer, int class,
		  int select)

would be more typical layout, although not vastly better.


Please put a blank line between end-of-locals and start-of-code. 
Everywhere, all the time.

kzalloc() can fail and must be checked.


Can we make `command' a local?  It's pretty small.  Perhaps
dcdbas_smi_request() (nee smi_request()) has some secret, undocumented
alignment restriction, similar to DMA?


kzalloc() can fail.

calling_interface_buffer is small enough to be a local.

coding-style.


kzalloc() can fail.


`buffer' is small enough to be a local.


ditto, ditto


Where does the reader go to find the meaning of these bits?

(code comment needed)


dittoes


blah


I don't think we really needed local variable `intensity'.  I guess it
has some commentary value.


ditto, ditto


ditto


Should propagate PTR_ERR(dell_backlight_device) back to caller.


backlight_device_unregister(NULL) is legal


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/2] Add Dell laptop driver, Matthew Garrett, (Sat Aug 16, 1:24 pm)
[PATCH 1/2] Export SMI call functionality from dcdbas driver, Matthew Garrett, (Sat Aug 16, 1:26 pm)
[PATCH 2/2] Add Dell laptop driver, Matthew Garrett, (Sat Aug 16, 1:30 pm)
Re: [PATCH 2/2] Add Dell laptop driver, Arjan van de Ven, (Sat Aug 16, 1:47 pm)
Re: [PATCH 2/2] Add Dell laptop driver, Matthew Garrett, (Sat Aug 16, 1:51 pm)
Re: [PATCH 2/2] Add Dell laptop driver, Andrew Morton, (Tue Aug 19, 11:46 pm)
Re: [PATCH 2/2] Add Dell laptop driver, Matthew Garrett, (Wed Aug 20, 3:21 am)
Re: [PATCH 0/2] Add Dell laptop driver, Michael E Brown, (Thu Sep 18, 1:22 pm)