On Sat, 2009-04-18 at 15:02 +0100, Alan Jenkins wrote: > >> * This function tells the rfkill core that the device is capable of > >> * remembering soft blocks (which it is notified of via the set_block > >> * method) -- this means that the driver may ignore the return value > >> * from rfkill_set_hw_state(). > >> > >> Doesn't this conflict with the declaration of rfkill_set_sw_state() as > >> __must_check? > >> > > > > Yeah, in a way it does, but I figure it's rare enough that those who > > really can ignore it can write > > (void) rfkill_set_sw_state(...) > > > > Don't really have a strong opinion, it just seemed the mistake in the > > other direction would be more common. > > > Oops... I meant to write rfkill_set_hw_state(), I think you copied me. Ok. I, uh, didn't even pay that much attention. > So then why is the _sw_ variant marked __must_check? That looks like a > mistake. I don't see what I can sensibly do with the return value. > Unless you want EPO to veto a firmware-initiated enable? Good question. It gives you the hardware enable state but I guess you know about that already. Hmm :) Yeah it seems that we should remove that __must_check. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part