Search Linux Wireless

Re: [RFC v6] rfkill: rewrite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 30 Apr 2009, Johannes Berg wrote:
> > The return values for rfkill_alloc() are not the same on the stub and
> > real functions.  The stub function uses ERR_PTR, while the real
> > function uses NULL for any errors.   Please make them do the same
> > thing, and it is probably a damn good idea to document in the
> > kerneldoc what kind of return values one should expect when you return
> > a pointer and the function can fail (i.e. NULL or ERR_PTR).
> 
> Actually, I was going to clean this up, and then I noticed you're
> wrong. :) Returning ERR_PTR(-ENODEV) is intentional, in the non-RFKILL
> case. Imagine a driver like this:

Well, that's confusing as all heck... document it, please?  I still think in
that case, we'd be better off if rfkill_alloc always uses the ERR_PTR
convention.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux