lkml.org 
[lkml]   [2006]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Why is device_create_file __must_check?
Andrew Morton writes:

> > So we have to add printks in all sorts of places where the
> > device_create_file has never failed before. If you're that concerned,
>
> aren't you concerned too?

Not about the ones that have shown no sign of failing, no...

Most of the sites I have looked at have been cases where the kernel
genuinely doesn't care whether the device_create_file call succeeded
or failed. Adding an if and printk in all these places seems like
pointless bloat when it could be done in one place - namely
device_create_file. In one or two cases the return value from
device_create_file can be returned as its caller's return value, but
these were the minority. In no cases that I have looked at was there
any other suitable action to take.

> > why not add a WARN_ON(error) in device_create_file() ?
>
> That might be suitable, yup.

Greg claims that people ignore WARN_ON messages. If that's true, I
fail to see how adding printks will help.

Paul.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-10 09:07    [W:0.053 / U:0.060 seconds]
©2003-2011 Jasper Spaans. Advertise on this site