Messages in this thread |  | | | Subject | Re: [PATCH] Silence 'ignoring return value' warnings in drivers/video/aty/radeon_base.c | | From | Harvey Harrison <> | | Date | Thu, 08 May 2008 17:02:44 -0700 |
| |
On Fri, 2008-05-09 at 09:50 +1000, Paul Mackerras wrote: > Greg KH writes: > > > > I hear you :) I found it useful, but it seems we should get rid of it > > > for _create_file() now. > > > > Why? You point out it found some real bugs, should we just assume that > > no new bugs of this same problem will happen again in the future? > > Because it causes warnings for the callers which don't really care > whether the file gets created or not, and getting rid of those > warnings adds unnecessary bloat. > > I think the best solution is to make a new sysfs_maybe_create_file() > which isn't marked must_check, and then move suitable callers (such as > radeonfb) over to that. That will make it obvious in the callers that > the file creation isn't guaranteed.
Or just a a flag parameter to the existing one that says whether failure is allowed or not. In a case that fails, a WARN_ON can be printed from the common create_file rather than putting printks all over the kernel.
This would also document which files are necessary vs. optional.
Harvey
|  |