[PATCH 2.6.19-rc6] powerpc: fix of_device __must_check warning

Paul Mackerras paulus at samba.org
Wed Nov 29 19:35:55 EST 2006


Ryusuke Konishi writes:

> This fixes the following compile warning:
> 
> arch/powerpc/kernel/of_device.c: In function 'of_device_register':
> arch/powerpc/kernel/of_device.c:199: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result

Your patch also makes a policy change, though, in that without your
patch, a failure in creating the "devspec" file in sysfs doesn't
prevent of_device_register from performing its main function.  With
your patch, of_device_register will fail if we can't create the
"devspec" file.

On the whole, I am inclined to think that it is useful for
of_device_register to succeed even if the devspec file can't be
created, since nothing in the kernel relies on the devspec file being
present.

Paul.



More information about the Linuxppc-dev mailing list