lkml.org 
[lkml]   [2014]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/13] eeepc-laptop: compare proper return values in get_cpufv
On Tue, Sep 16, 2014 at 11:40:37PM +0200, Frans Klaver wrote:
> On Tue, Sep 16, 2014 at 02:27:15PM -0700, Darren Hart wrote:
> >
> > - When reading and writing sysfs device attribute files, avoid dependency
> > on specific error codes wherever possible. This minimizes coupling to
> > the error handling implemementation within the kernel.
> >
> > In general, failures to read or write sysfs device attributes shall
> > propogate errors wherever possible. Common errors include, but are not
> > limited to:
> >
> > -EIO: The read or store operation is not supported, typically returned by
> > the sysfs system itself if the read or store pointer is NULL.
> >
> > -ENXIO: The read or store operation failed
> >
> > Error codes will not be changed without good reason, and should a change
> > to error codes result in user-space breakage, it will be fixed, or the
> > the offending change will be reverted.
>
> sysfs-rules.txt is written for user space? In that case, reverting the
> change is as much a fix as patching it.
>
> >
> > Userspace applications can, however, expect the format and contents of
> > the attribute files to remain consistent in the absence of a version
> > attribute change in the context of a given attributes.

Agreed, but I wanted to make this clear to kernel devs reading this as well,
rather than duplicating this blurb elsewhere.

>
> ...attribute.
>
> That's it for the nit-picking.

Thanks for the plural catch.

I'll send to Greg as a patch.

--
Darren Hart
Intel Open Source Technology Center


\
 
 \ /
  Last update: 2014-09-17 00:21    [W:0.078 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site