Re: __must_check (stir the pot :-))

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 15, 2007 at 05:31:46PM +1000, Stephen Rothwell wrote:
>So I am looking at "fixing" some of the warning produced by __must_check
>but then I see (things like):
>
>drivers/base/core.c: In function 'device_add':
>drivers/base/core.c:714: warning: ignoring return value of 'sysfs_create_link', declared with attribute warn_unused_result
>drivers/base/core.c:719: warning: ignoring return value of 'sysfs_create_link', declared with attribute warn_unused_result
>drivers/base/core.c:722: warning: ignoring return value of 'sysfs_create_link', declared with attribute warn_unused_result
>drivers/base/core.c:728: warning: ignoring return value of 'sysfs_create_link', declared with attribute warn_unused_result
>drivers/base/core.c: In function 'device_rename':
>drivers/base/core.c:1187: warning: ignoring return value of 'sysfs_create_link', declared with attribute warn_unused_result
>drivers/base/core.c:1197: warning: ignoring return value of 'sysfs_create_link', declared with attribute warn_unused_result
>
>and things like this in drivers/base/sys.c:
>
>int sysdev_create_file(struct sys_device * s, struct sysdev_attribute * a)
>{
>        return sysfs_create_file(&s->kobj, &a->attr);
>}
>
>where sysfs_create_file() is marked __must_check and sysdev_create_file()
>isn't.
>
>So the questions come to mind:  Do we really care if our core
>infrastructure doesn't?  Can we care if the core infrastructure doesn't
>propogate the error returns?
>
>Flame away, I am prepared to ignore all opinions :-)


Hi!

I had noticed these warnings yet and had tried to fix them. But these ones are not relatively easy to fix, since they are nested in some complex contexts.

Can we leave this job to Greg? (Add some CCs below.)

CC: [email protected]
CC: [email protected]


Regards!

WANG Cong

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux