[PATCH] gianfar driver: eliminate compiler warnings and unnecessary macros

Jeff Garzik jgarzik at pobox.com
Wed Dec 5 07:15:08 EST 2007


Grant Likely wrote:
> From: Grant Likely <grant.likely at secretlab.ca>
> 
> This patch eliminates the warning of unused return values when the driver
> registers it sysfs files.  Now the driver will print an error if it is
> unable to register the sysfs files.
> 
> It also eliminates the macros used to wrap the DEVICE_ATTR macro and the
> device_create_file function call.  The macros don't reduce the number of
> lines of source code in the file and the name munging makes is so that
> cscope and friends don't see the references to the functions.  It's better
> to just call the kernel API directly.
> 
> While we're at it, the DEVICE_ATTR instances have been moved down to
> be grouped with the functions they depend on.
> 
> Signed-off-by: Grant Likely <grant.likely at secretlab.ca>
> ---
> 
>  drivers/net/gianfar_sysfs.c |   50 ++++++++++++++++++++++---------------------
>  1 files changed, 25 insertions(+), 25 deletions(-)

applied #upstream





More information about the Linuxppc-dev mailing list