Search Linux Wireless

Re: [RFC v6] rfkill: rewrite

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

 



On Thu, 2009-04-30 at 12:53 -0300, Henrique de Moraes Holschuh wrote:

> > 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?  

Well, ok. I don't really think it's all that confusing since you don't
need to think about the non-RFKILL code, you can just write the code as
though rfkill was always enabled.

> I still think in
> that case, we'd be better off if rfkill_alloc always uses the ERR_PTR
> convention.

Umm, no, think again. If we do that, the driver won't do
	if (!rf)
but
	if (IS_ERR(rf))
and the advantage is lost.

This is exactly what debugfs does too.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[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