[PATCH] [POWERPC] remove build warnings in windfarm_core

Linas Vepstas linas at austin.ibm.com
Wed May 16 02:45:29 EST 2007


On Tue, May 15, 2007 at 08:32:08AM +0200, Segher Boessenkool wrote:
> >> -	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 :-)

Ergo, the patch should be reworked to print the warning only, 
but otherwise continue with the setup.

--linas



More information about the Linuxppc-dev mailing list