[PATCH] [POWERPC] remove build warnings in windfarm_core
Segher Boessenkool
segher at kernel.crashing.org
Tue May 15 16:32:08 EST 2007
>> - device_create_file(&wf_platform_device.dev, &new_ct->attr);
>> + ret = device_create_file(&wf_platform_device.dev, &new_ct->attr);
>> + if (ret) {
>> + list_del(&new_ct->link);
>> + printk(KERN_WARNING "windfarm: device_creat_file failed"
>> + "for %s\n", new_ct->name);
>> + goto out_unlock;
>
> This shows up why I hate the must_check stuff. The sysfs files are
> not essential for the operation of the windfarm subsystem.
They are essential for the user expectations of the
subsystem though; if registration fails, a warning
should be printed.
> If the
> sysfs registration fails for any reason, we now have a completely
> non-functional windfarm subsystem instead of a mostly-working one. :(
Yeah, but that's not must_check's fault, it doesn't
say *what* to do with the error code :-)
Segher
More information about the Linuxppc-dev
mailing list