Re: [PATCH 3/4] staging: iio: accel: Use sign_extend32 and adjust a switch statement

2018-02-17 Thread Dan Carpenter
On Sat, Feb 17, 2018 at 12:23:53PM +, Jonathan Cameron wrote: > On Mon, 12 Feb 2018 16:10:01 +0300 > Dan Carpenter wrote: > > > On Mon, Feb 12, 2018 at 05:24:58PM +0530, Himanshu Jha wrote: > > > Use sign_extend32 function instead of manually coding it. Also, adjust

Re: [PATCH 3/4] staging: iio: accel: Use sign_extend32 and adjust a switch statement

2018-02-17 Thread Jonathan Cameron
On Mon, 12 Feb 2018 16:10:01 +0300 Dan Carpenter wrote: > On Mon, Feb 12, 2018 at 05:24:58PM +0530, Himanshu Jha wrote: > > Use sign_extend32 function instead of manually coding it. Also, adjust a > ^ > >

Re: [PATCH 3/4] staging: iio: accel: Use sign_extend32 and adjust a switch statement

2018-02-12 Thread Dan Carpenter
On Mon, Feb 12, 2018 at 05:24:58PM +0530, Himanshu Jha wrote: > Use sign_extend32 function instead of manually coding it. Also, adjust a ^ > switch block to explicitly match channels and return -EINVAL as default > case which improves

[PATCH 3/4] staging: iio: accel: Use sign_extend32 and adjust a switch statement

2018-02-12 Thread Himanshu Jha
Use sign_extend32 function instead of manually coding it. Also, adjust a switch block to explicitly match channels and return -EINVAL as default case which improves code readability. Signed-off-by: Himanshu Jha --- drivers/staging/iio/accel/adis16201.c | 13