Re: [PATCH 2/4] staging: iio: ad7150: use FIELD_GET and GENMASK

2019-05-08 Thread Ardelean, Alexandru
On Tue, 2019-05-07 at 17:44 -0300, Melissa Wen wrote: > [External] > > > On 05/06, Ardelean, Alexandru wrote: > > On Sat, 2019-05-04 at 13:43 +0300, Alexandru Ardelean wrote: > > > [External] > > > > > > > > > On Sat, May 4, 2019 at 1:25 AM Melissa Wen > > > wrote: > > > > > > > > Use the

Re: [PATCH 2/4] staging: iio: ad7150: use FIELD_GET and GENMASK

2019-05-07 Thread Melissa Wen
On 05/06, Ardelean, Alexandru wrote: > On Sat, 2019-05-04 at 13:43 +0300, Alexandru Ardelean wrote: > > [External] > > > > > > On Sat, May 4, 2019 at 1:25 AM Melissa Wen wrote: > > > > > > Use the bitfield macro FIELD_GET, and GENMASK to do the shift and mask > > > in > > > one go. This makes

Re: [PATCH 2/4] staging: iio: ad7150: use FIELD_GET and GENMASK

2019-05-06 Thread Ardelean, Alexandru
On Sat, 2019-05-04 at 13:43 +0300, Alexandru Ardelean wrote: > [External] > > > On Sat, May 4, 2019 at 1:25 AM Melissa Wen wrote: > > > > Use the bitfield macro FIELD_GET, and GENMASK to do the shift and mask > > in > > one go. This makes the code more readable than explicit masking > >

Re: [PATCH 2/4] staging: iio: ad7150: use FIELD_GET and GENMASK

2019-05-04 Thread Alexandru Ardelean
On Sat, May 4, 2019 at 1:25 AM Melissa Wen wrote: > > Use the bitfield macro FIELD_GET, and GENMASK to do the shift and mask in > one go. This makes the code more readable than explicit masking followed > by a shift. > This looks neat. I'd have to remember to ack it from my work email. One

[PATCH 2/4] staging: iio: ad7150: use FIELD_GET and GENMASK

2019-05-03 Thread Melissa Wen
Use the bitfield macro FIELD_GET, and GENMASK to do the shift and mask in one go. This makes the code more readable than explicit masking followed by a shift. Signed-off-by: Melissa Wen --- drivers/staging/iio/cdc/ad7150.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git