Re: [PATCH] staging: kpc2000: simplify nested conditionals that just return a boolean.

2019-05-26 Thread Jeremy Sowden
On 2019-05-24, at 16:59:45 +, Matt Sickler wrote: > From: devel On Behalf Of > Greg KH > > On Fri, May 24, 2019 at 01:19:26PM +0100, Jeremy Sowden wrote: > > > kp2000_check_uio_irq contained a pair of nested ifs which each > > > evaluated a bitwise operation. If both operations yielded

Re: [PATCH] staging: kpc2000: simplify nested conditionals that just return a boolean.

2019-05-25 Thread Dan Carpenter
On Fri, May 24, 2019 at 01:19:26PM +0100, Jeremy Sowden wrote: > kp2000_check_uio_irq contained a pair of nested ifs which each evaluated > a bitwise operation. If both operations yielded true, the function > returned 1; otherwise it returned 0. > > Replaced the whole thing with one return

RE: [PATCH] staging: kpc2000: simplify nested conditionals that just return a boolean.

2019-05-24 Thread Matt Sickler
>-Original Message- >From: devel On Behalf Of Greg >KH >On Fri, May 24, 2019 at 01:19:26PM +0100, Jeremy Sowden wrote: >> kp2000_check_uio_irq contained a pair of nested ifs which each evaluated >> a bitwise operation. If both operations yielded true, the function >> returned 1;

Re: [PATCH] staging: kpc2000: simplify nested conditionals that just return a boolean.

2019-05-24 Thread Greg KH
On Fri, May 24, 2019 at 01:19:26PM +0100, Jeremy Sowden wrote: > kp2000_check_uio_irq contained a pair of nested ifs which each evaluated > a bitwise operation. If both operations yielded true, the function > returned 1; otherwise it returned 0. > > Replaced the whole thing with one return

[PATCH] staging: kpc2000: simplify nested conditionals that just return a boolean.

2019-05-24 Thread Jeremy Sowden
kp2000_check_uio_irq contained a pair of nested ifs which each evaluated a bitwise operation. If both operations yielded true, the function returned 1; otherwise it returned 0. Replaced the whole thing with one return statement that evaluates the combination of both bitwise operations.