staging: iio: Fix multiple checkpatch issues
Subsystems (4)
cover staging: iio: Fix multiple checkpatch issues
This patchset fixes multiple whitespace and alignment issues reported by checkpatch.pl
Narcisa Ana Maria Vasile (3):
staging: iio: adt7136: Remove unnecessary blank lines
staging: iio: Add blank lines after function declarations
staging: iio: cdc: ad7746: Fix alignment with paranthesis
drivers/staging/iio/addac/adt7316.c | 5 +---- drivers/staging/iio/cdc/ad7152.c | 1 + drivers/staging/iio/cdc/ad7746.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/3 staging: iio: adt7136: Remove unnecessary blank lines
This was reported by checkpatch.pl
--- drivers/staging/iio/addac/adt7316.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/iio/addac/adt7316.c +0 -4
@@ -244,7 +244,6 @@ static ssize_t _adt7316_store_enabled(struct adt7316_chip_info *chip, chip->config1 = config1;return ret; - } static ssize_t adt7316_store_enabled(struct device *dev,
@@ -434,7 +433,6 @@ static ssize_t adt7316_store_ad_channel(struct device *dev, config2 = chip->config2 & (~ADT7316_AD_SINGLE_CH_MASK ); } - config2 |= data; ret = chip->bus.write (chip->bus.client,ADT7316_CONFIG2 , config2);
@@ -725,7 +723,6 @@ static IIO_DEVICE_ATTR(AIN_internal_Vref, 0644, adt7316_store_AIN_internal_Vref, 0); -static ssize_t adt7316_show_enable_prop_DACA (struct device *dev,struct device_attribute *attr,char *buf)
@@ -925,7 +922,6 @@ static ssize_t adt7316_show_all_DAC_update_modes(struct device *dev, static IIO_DEVICE_ATTR(all_DAC_update_modes, 0444, adt7316_show_all_DAC_update_modes, NULL, 0); - static ssize_t adt7316_store_update_DAC(struct device *dev, struct device_attribute *attr, const char *buf,
Signature · 1 line
1.9.1
PATCH 2/3 staging: iio: Add blank lines after function declarations
In reply to Narcisa Ana Maria VasileThis was reported by checkpatch.pl:
CHECK: Please use a blank line after function/struct/union/enum declarations
--- drivers/staging/iio/addac/adt7316.c | 1 + drivers/staging/iio/cdc/ad7152.c | 1 + 2 files changed, 2 insertions(+)
drivers/staging/iio/addac/adt7316.c +1 -0
@@ -1863,6 +1863,7 @@ static ssize_t adt7316_set_int_mask(struct device *dev,return len; } +static inline ssize_t adt7316_show_ad_bound (struct device *dev,struct device_attribute *attr,char *buf)
drivers/staging/iio/cdc/ad7152.c +1 -0
@@ -244,6 +244,7 @@ static int ad7152_write_raw_samp_freq(struct device *dev, int val)return ret; } + static int ad7152_write_raw(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, int val,
Signature · 1 line
1.9.1
PATCH 3/3 staging: iio: cdc: ad7746: Fix alignment with paranthesis
In reply to Narcisa Ana Maria VasileThis was reported by checkpatch.pl:
CHECK: Alignment should match open parenthesis
--- drivers/staging/iio/cdc/ad7746.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/cdc/ad7746.c +1 -1
@@ -546,7 +546,7 @@ static int ad7746_read_raw(struct iio_dev *indio_dev, regval = chip->config |AD7746_CONF_MODE_SINGLE_CONV ; ret =i2c_smbus_write_byte_data (chip->client,AD7746_REG_CFG , - regval); + regval);if (ret <0 ) goto out;
Signature · 1 line
1.9.1
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 3/3] staging: iio: cdc: ad7746: Fix alignment with paranthesis
Quoted 16 lines · Jonathan Cameron
Quoted 4 lines · Narcisa Ana Maria Vasile
This was reported by checkpatch.pl:
CHECK: Alignment should match open parenthesisSigned-off-by Narcisa Ana Maria Vasile <[email protected]>Applied to the togreg branch of iio.git and pushed out as testing.
Only real comment on this series is that it wasn't really a series. The linking element was check patch warnings. Not really enough. A series should exist for one of two reasons:
1) Patches to the same driver that need to be applied in order to avoid fuzz or for more fundamental reasons.
2) Grouping patches because they are the same change to lots of drivers. This is useful because it aids review - comments also apply to at least some subset of the patches.
Quoted 7 lines
Doesn't matter that much, but these should really just have been 3 separate patches. The first 2 might just fall under type 1 above I suppose, but not this third one!
Thanks,
Jonathan
Ok, I'll keep this in mind. Indeed, I grouped them because they were all fixing checkpatch warnings. It's clear now that I shouldn't have made a patchset.
Sorry for the mistake.
Thank you,
Narcisa
Quoted 19 lines
Quoted 18 lines
--- drivers/staging/iio/cdc/ad7746.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/iio/cdc/ad7746.c +1
-1@@ -546,7 +546,7 @@ static int ad7746_read_raw(struct iio_dev *indio_dev, regval = chip->config |AD7746_CONF_MODE_SINGLE_CONV ; ret =i2c_smbus_write_byte_data (chip->client,AD7746_REG_CFG , - regval); + regval);if (ret <0 ) goto out;