Remove idiom and use ternary operator for consistently trigger 0/1 value
on variable declaration.
Signed-off-by: Melissa Wen
---
drivers/staging/iio/cdc/ad7150.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc
General cleaning of comments to remove useless information or improve
description.
Signed-off-by: Melissa Wen
---
drivers/staging/iio/cdc/ad7150.c | 11 ++-
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c
Since i2c_smbus_write_byte_data returns no-positive value, this commit
making the treatment of its return value less verbose.
Signed-off-by: Melissa Wen
---
drivers/staging/iio/cdc/ad7150.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/iio/cdc
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 a
This patchset solves readability issues in AD7150 code: use of FIELD_GET
to fashion improvement, make operation more succint and remove useless
comments.
Changes in v2:
- Remove noisy patch that reorganized registers definitions
- Remove else to improve i2c return operation.
Melissa Wen (3
properly replaces it in the places where it is used.
Fixes: 531efd6aa0991 ("staging:iio:adc:ad7150: chan_spec conv + i2c_smbus
commands + drop unused poweroff timeout control.")
Signed-off-by: Melissa Wen
---
drivers/staging/iio/cdc/ad7150.c | 19 +++
1 file c
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 shi
On 05/05, Jonathan Cameron wrote:
> On Sat, 4 May 2019 14:12:22 +0300
> Alexandru Ardelean wrote:
>
> > On Sat, May 4, 2019 at 1:24 AM Melissa Wen wrote:
> > >
> > > This patchset solves readability issues in AD7150 code, such as clarify
> > > registe
General cleaning of comments to remove useless information or improve
description.
Signed-off-by: Melissa Wen
---
drivers/staging/iio/cdc/ad7150.c | 11 ++-
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c
Since i2c_smbus_write_byte_data returns no-positive value, this commit
making the treatment of its return value less verbose.
Signed-off-by: Melissa Wen
---
drivers/staging/iio/cdc/ad7150.c | 10 +++---
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/iio/cdc
Use the suffix REG to make the register addresses clear
and indentation to highlight field names.
Signed-off-by: Melissa Wen
---
drivers/staging/iio/cdc/ad7150.c | 75
1 file changed, 37 insertions(+), 38 deletions(-)
diff --git a/drivers/staging/iio/cdc/ad7150
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 a
This patchset solves readability issues in AD7150 code, such as clarify
register and mask definition, fashion improvement of mask uses, reduce
tedious operation and useless comments.
Melissa Wen (4):
staging: iio: ad7150: organize registers definition
staging: iio: ad7150: use FIELD_GET and
Remove unneeded parentheses around the arguments of ||. This reduces
clutter and code behave in the same way. Change suggested by
checkpatch.pl.
CHECK: Unnecessary parentheses around 'st->devid == ID_AD9833'
CHECK: Unnecessary parentheses around 'st->devid == ID_AD9837
14 matches
Mail list logo