Re: [PATCH] Silence 'ignoring return value' warnings indrivers/video/aty/radeon_base.c

From: Andrew Morton
Date: Tue May 06 2008 - 17:40:29 EST


On Thu, 24 Apr 2008 14:34:01 +1000
tony@xxxxxxxxxxxxxxxxxx (Tony Breeds) wrote:

> Current kernel builds warn about:
> drivers/video/aty/radeon_base.c: In function 'radeonfb_pci_register':
> drivers/video/aty/radeon_base.c:2334: warning: ignoring return value of 'sysfs_create_bin_file', declared with attribute warn_unused_result
> drivers/video/aty/radeon_base.c:2336: warning: ignoring return value of 'sysfs_create_bin_file', declared with attribute warn_unused_result
>
> Do minimal checking of these functions and issue a warning if either
> fails. They don't seem to be critical..

well OK, but I object to the patch title!

The point isn't to silence warnings. It is to fix the problem which that
warning is drawing our attention to.

So I rewrote the title to "drivers/video/aty/radeon_base.c: notify user if
sysfs_create_bin_file() failed".

And your fix looks appropriate - if sysfs_create_bin_file() fails we will now get
reports of this and we can find out what kernel bug caused this to happen.

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