Re: [PATCHv2 08/10] rfkill: Use switch to demux userspace operations

2016-03-08 Thread João Paulo Rechi Vita
Hello Johannes, On 1 March 2016 at 11:15, João Paulo Rechi Vita wrote: > On 1 March 2016 at 08:43, Johannes Berg wrote: >> >> I'm fine with Jouni's change, preserving the original behaviour of >> requiring TYPE_ALL or the correct type, but I'm

Re: [PATCHv2 08/10] rfkill: Use switch to demux userspace operations

2016-03-01 Thread João Paulo Rechi Vita
On 1 March 2016 at 08:43, Johannes Berg wrote: > On Tue, 2016-03-01 at 00:39 +0200, Jouni Malinen wrote: > >> > I agree there is a difference in the logic here, > > Gah. I thought I'd reviewed the logic and made sure there's no > difference ... :) > >> > thanks for

Re: [PATCHv2 08/10] rfkill: Use switch to demux userspace operations

2016-03-01 Thread Johannes Berg
On Tue, 2016-03-01 at 00:39 +0200, Jouni Malinen wrote: > > I agree there is a difference in the logic here, Gah. I thought I'd reviewed the logic and made sure there's no difference ... :) > > thanks for taking the > > time to point it out so clearly, and sorry for missing this. But AFAIU > >

Re: [PATCHv2 08/10] rfkill: Use switch to demux userspace operations

2016-02-29 Thread Jouni Malinen
On Mon, Feb 29, 2016 at 05:30:20PM -0500, João Paulo Rechi Vita wrote: > I agree there is a difference in the logic here, thanks for taking the > time to point it out so clearly, and sorry for missing this. But AFAIU > userspace should not call RFKILL_OP_CHANGE with ev.type == > RFKILL_TYPE_ALL,

Re: [PATCHv2 08/10] rfkill: Use switch to demux userspace operations

2016-02-29 Thread João Paulo Rechi Vita
Hello Jouni, On 26 February 2016 at 12:59, Jouni Malinen wrote: > On Mon, Feb 22, 2016 at 11:36:39AM -0500, João Paulo Rechi Vita wrote: >> Using a switch to handle different ev.op values in rfkill_fop_write() >> makes the code easier to extend, as out-of-range values can always be

Re: [PATCHv2 08/10] rfkill: Use switch to demux userspace operations

2016-02-26 Thread Jouni Malinen
On Mon, Feb 22, 2016 at 11:36:39AM -0500, João Paulo Rechi Vita wrote: > Using a switch to handle different ev.op values in rfkill_fop_write() > makes the code easier to extend, as out-of-range values can always be > handled by the default case. This breaks rfkill.. There are automated test

[PATCHv2 08/10] rfkill: Use switch to demux userspace operations

2016-02-22 Thread João Paulo Rechi Vita
Using a switch to handle different ev.op values in rfkill_fop_write() makes the code easier to extend, as out-of-range values can always be handled by the default case. Signed-off-by: João Paulo Rechi Vita --- net/rfkill/core.c | 32 ++-- 1 file