Re: [PATCH v2] eeepc-laptop: simplify parse_arg()

2014-09-16 Thread Darren Hart
On Thu, Sep 11, 2014 at 03:37:39PM -0700, Darren Hart wrote: > On Wed, Sep 10, 2014 at 10:05:20PM +0200, Paul Bolle wrote: > > parse_arg() has three possible return values: > > -EINVAL if sscanf(), in short, fails; > > zero if "count" is zero; and > > "count" in all other cases > > > >

Re: [PATCH v2] eeepc-laptop: simplify parse_arg()

2014-09-11 Thread Darren Hart
On Wed, Sep 10, 2014 at 10:05:20PM +0200, Paul Bolle wrote: > parse_arg() has three possible return values: > -EINVAL if sscanf(), in short, fails; > zero if "count" is zero; and > "count" in all other cases > > But "count" will never be zero. See, parse_arg() is called by the > variou

[PATCH v2] eeepc-laptop: simplify parse_arg()

2014-09-10 Thread Paul Bolle
parse_arg() has three possible return values: -EINVAL if sscanf(), in short, fails; zero if "count" is zero; and "count" in all other cases But "count" will never be zero. See, parse_arg() is called by the various store functions. And the callchain of these functions starts with sysfs_