Subject: Re: [PATCH] [POWERPC] remove build warnings in windfarm_core

From: [email-masked] (Linas Vepstas)
Date: Tue, 15 May 2007 11:45:29 -0500

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