staging: iio: meter: Match alignment with open parenthesis
Subsystems (4)
PATCH 1/1 staging: iio: meter: Match alignment with open parenthesis
This patch fixes the following checkpatch.pl check:
CHECK: Alignment should match open parenthesis
--- drivers/staging/iio/meter/ade7753.c | 43 ++++++++++++++----------------------- 1 file changed, 16 insertions(+), 27 deletions(-)
drivers/staging/iio/meter/ade7753.c +16 -27
@@ -42,8 +42,7 @@ static int ade7753_spi_write_reg_8(struct device *dev, }static int ade7753_spi_write_reg_16 (struct device *dev, -u8 reg_address, -u16 value) +u8 reg_address,u16 value) {int ret;struct iio_dev *indio_dev =dev_to_iio_dev (dev);
@@ -60,8 +59,7 @@ static int ade7753_spi_write_reg_16(struct device *dev, }static int ade7753_spi_read_reg_8 (struct device *dev, -u8 reg_address, -u8 *val) +u8 reg_address,u8 *val) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st =iio_priv (indio_dev);
@@ -70,7 +68,7 @@ static int ade7753_spi_read_reg_8(struct device *dev, ret =spi_w8r8 (st->us,ADE7753_READ_REG (reg_address));if (ret <0 ) {dev_err (&st->us->dev,"problem when reading 8 bit register 0x%02X" , - reg_address); + reg_address);return ret; } *val = ret;
@@ -79,8 +77,7 @@ static int ade7753_spi_read_reg_8(struct device *dev, }static int ade7753_spi_read_reg_16 (struct device *dev, -u8 reg_address, -u16 *val) +u8 reg_address,u16 *val) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st =iio_priv (indio_dev);
@@ -99,8 +96,7 @@ static int ade7753_spi_read_reg_16(struct device *dev, }static int ade7753_spi_read_reg_24 (struct device *dev, -u8 reg_address, -u32 *val) +u8 reg_address,u32 *val) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st =iio_priv (indio_dev);
@@ -123,7 +119,7 @@ static int ade7753_spi_read_reg_24(struct device *dev, ret =spi_sync_transfer (st->us, xfers,ARRAY_SIZE (xfers));if (ret) {dev_err (&st->us->dev,"problem when reading 24 bit register 0x%02X" , - reg_address); + reg_address); goto error_ret; } *val = (st->rx[0 ] <<16 ) | (st->rx[1 ] <<8 ) | st->rx[2 ];
@@ -134,8 +130,7 @@ error_ret: }static ssize_t ade7753_read_8bit (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u8 val;
@@ -149,8 +144,7 @@ static ssize_t ade7753_read_8bit(struct device *dev, }static ssize_t ade7753_read_16bit (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u16 val;
@@ -164,8 +158,7 @@ static ssize_t ade7753_read_16bit(struct device *dev, }static ssize_t ade7753_read_24bit (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u32 val;
@@ -179,9 +172,8 @@ static ssize_t ade7753_read_24bit(struct device *dev, }static ssize_t ade7753_write_8bit (struct device *dev, -struct device_attribute *attr, -const char *buf, -size_t len) +struct device_attribute *attr, +const char *buf,size_t len) {struct iio_dev_attr *this_attr =to_iio_dev_attr (attr);int ret;
@@ -197,9 +189,8 @@ error_ret: }static ssize_t ade7753_write_16bit (struct device *dev, -struct device_attribute *attr, -const char *buf, -size_t len) +struct device_attribute *attr, +const char *buf,size_t len) {struct iio_dev_attr *this_attr =to_iio_dev_attr (attr);int ret;
@@ -384,8 +375,7 @@ err_ret: }static ssize_t ade7753_read_frequency (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u16 t;
@@ -402,9 +392,8 @@ static ssize_t ade7753_read_frequency(struct device *dev, }static ssize_t ade7753_write_frequency (struct device *dev, -struct device_attribute *attr, -const char *buf, -size_t len) +struct device_attribute *attr, +const char *buf,size_t len) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st =iio_priv (indio_dev);
Signature · 1 line
2.7.4
Quoted 4 lines · Georgiana Rodica Chelu
This patch fixes the following checkpatch.pl check:
CHECK: Alignment should match open parenthesisSigned-off-by Georgiana Rodica Chelu <[email protected]>
Hi Georgiana,
Nice patch. I think there's a patch for this already in the IIO queue, so probably won't get taken. In IIO, the driver name is typically mentioned in the Subject line - as in:
staging: iio: meter: ade5933: ....
alisons
Quoted 151 lines
--- drivers/staging/iio/meter/ade7753.c | 43 ++++++++++++++----------------------- 1 file changed, 16 insertions(+), 27 deletions(-)drivers/staging/iio/meter/ade7753.c +16
-27@@ -42,8 +42,7 @@ static int ade7753_spi_write_reg_8(struct device *dev, }static int ade7753_spi_write_reg_16 (struct device *dev, -u8 reg_address, -u16 value) +u8 reg_address,u16 value) {int ret;struct iio_dev *indio_dev =dev_to_iio_dev (dev);@@ -60,8 +59,7 @@ static int ade7753_spi_write_reg_16(struct device *dev, }static int ade7753_spi_read_reg_8 (struct device *dev, -u8 reg_address, -u8 *val) +u8 reg_address,u8 *val) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st =iio_priv (indio_dev);@@ -70,7 +68,7 @@ static int ade7753_spi_read_reg_8(struct device *dev, ret =spi_w8r8 (st->us,ADE7753_READ_REG (reg_address));if (ret <0 ) {dev_err (&st->us->dev,"problem when reading 8 bit register 0x%02X" , - reg_address); + reg_address);return ret; } *val = ret;@@ -79,8 +77,7 @@ static int ade7753_spi_read_reg_8(struct device *dev, }static int ade7753_spi_read_reg_16 (struct device *dev, -u8 reg_address, -u16 *val) +u8 reg_address,u16 *val) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st =iio_priv (indio_dev);@@ -99,8 +96,7 @@ static int ade7753_spi_read_reg_16(struct device *dev, }static int ade7753_spi_read_reg_24 (struct device *dev, -u8 reg_address, -u32 *val) +u8 reg_address,u32 *val) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st =iio_priv (indio_dev);@@ -123,7 +119,7 @@ static int ade7753_spi_read_reg_24(struct device *dev, ret =spi_sync_transfer (st->us, xfers,ARRAY_SIZE (xfers));if (ret) {dev_err (&st->us->dev,"problem when reading 24 bit register 0x%02X" , - reg_address); + reg_address); goto error_ret; } *val = (st->rx[0 ] <<16 ) | (st->rx[1 ] <<8 ) | st->rx[2 ];@@ -134,8 +130,7 @@ error_ret: }static ssize_t ade7753_read_8bit (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u8 val;@@ -149,8 +144,7 @@ static ssize_t ade7753_read_8bit(struct device *dev, }static ssize_t ade7753_read_16bit (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u16 val;@@ -164,8 +158,7 @@ static ssize_t ade7753_read_16bit(struct device *dev, }static ssize_t ade7753_read_24bit (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u32 val;@@ -179,9 +172,8 @@ static ssize_t ade7753_read_24bit(struct device *dev, }static ssize_t ade7753_write_8bit (struct device *dev, -struct device_attribute *attr, -const char *buf, -size_t len) +struct device_attribute *attr, +const char *buf,size_t len) {struct iio_dev_attr *this_attr =to_iio_dev_attr (attr);int ret;@@ -197,9 +189,8 @@ error_ret: }static ssize_t ade7753_write_16bit (struct device *dev, -struct device_attribute *attr, -const char *buf, -size_t len) +struct device_attribute *attr, +const char *buf,size_t len) {struct iio_dev_attr *this_attr =to_iio_dev_attr (attr);int ret;@@ -384,8 +375,7 @@ err_ret: }static ssize_t ade7753_read_frequency (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u16 t;@@ -402,9 +392,8 @@ static ssize_t ade7753_read_frequency(struct device *dev, }static ssize_t ade7753_write_frequency (struct device *dev, -struct device_attribute *attr, -const char *buf, -size_t len) +struct device_attribute *attr, +const char *buf,size_t len) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st =iio_priv (indio_dev);Signature · 8 lines
2.7.4 -- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160918210056.GA6241%40fireworks. For more options, visit https://groups.google.com/d/optout.
Quoted 11 lines · Alison Schofield
Quoted 4 lines · Georgiana Rodica Chelu
This patch fixes the following checkpatch.pl check:
CHECK: Alignment should match open parenthesisSigned-off-by Georgiana Rodica Chelu <[email protected]>Hi Georgiana,
Nice patch. I think there's a patch for this already in the IIO queue, so probably won't get taken. In IIO, the driver name is typically mentioned in the Subject line - as in:
staging: iio: meter: ade5933: ....
Always check using git log --oneline for the affected file what others have done for the subject line. While iio may follow this strategy, other subsystems have other preferences.
julia
Quoted 161 lines
alisons
Quoted 145 lines
--- drivers/staging/iio/meter/ade7753.c | 43 ++++++++++++++----------------------- 1 file changed, 16 insertions(+), 27 deletions(-)drivers/staging/iio/meter/ade7753.c +16
-28@@ -42,8 +42,7 @@ static int ade7753_spi_write_reg_8(struct device *dev, }static int ade7753_spi_write_reg_16 (struct device *dev, -u8 reg_address, -u16 value) +u8 reg_address,u16 value) {int ret;struct iio_dev *indio_dev =dev_to_iio_dev (dev);@@ -60,8 +59,7 @@ static int ade7753_spi_write_reg_16(struct device *dev, }static int ade7753_spi_read_reg_8 (struct device *dev, -u8 reg_address, -u8 *val) +u8 reg_address,u8 *val) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st =iio_priv (indio_dev);@@ -70,7 +68,7 @@ static int ade7753_spi_read_reg_8(struct device *dev, ret =spi_w8r8 (st->us,ADE7753_READ_REG (reg_address));if (ret <0 ) {dev_err (&st->us->dev,"problem when reading 8 bit register 0x%02X" , - reg_address); + reg_address);return ret; } *val = ret;@@ -79,8 +77,7 @@ static int ade7753_spi_read_reg_8(struct device *dev, }static int ade7753_spi_read_reg_16 (struct device *dev, -u8 reg_address, -u16 *val) +u8 reg_address,u16 *val) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st =iio_priv (indio_dev);@@ -99,8 +96,7 @@ static int ade7753_spi_read_reg_16(struct device *dev, }static int ade7753_spi_read_reg_24 (struct device *dev, -u8 reg_address, -u32 *val) +u8 reg_address,u32 *val) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st =iio_priv (indio_dev);@@ -123,7 +119,7 @@ static int ade7753_spi_read_reg_24(struct device *dev, ret =spi_sync_transfer (st->us, xfers,ARRAY_SIZE (xfers));if (ret) {dev_err (&st->us->dev,"problem when reading 24 bit register 0x%02X" , - reg_address); + reg_address); goto error_ret; } *val = (st->rx[0 ] <<16 ) | (st->rx[1 ] <<8 ) | st->rx[2 ];@@ -134,8 +130,7 @@ error_ret: }static ssize_t ade7753_read_8bit (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u8 val;@@ -149,8 +144,7 @@ static ssize_t ade7753_read_8bit(struct device *dev, }static ssize_t ade7753_read_16bit (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u16 val;@@ -164,8 +158,7 @@ static ssize_t ade7753_read_16bit(struct device *dev, }static ssize_t ade7753_read_24bit (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u32 val;@@ -179,9 +172,8 @@ static ssize_t ade7753_read_24bit(struct device *dev, }static ssize_t ade7753_write_8bit (struct device *dev, -struct device_attribute *attr, -const char *buf, -size_t len) +struct device_attribute *attr, +const char *buf,size_t len) {struct iio_dev_attr *this_attr =to_iio_dev_attr (attr);int ret;@@ -197,9 +189,8 @@ error_ret: }static ssize_t ade7753_write_16bit (struct device *dev, -struct device_attribute *attr, -const char *buf, -size_t len) +struct device_attribute *attr, +const char *buf,size_t len) {struct iio_dev_attr *this_attr =to_iio_dev_attr (attr);int ret;@@ -384,8 +375,7 @@ err_ret: }static ssize_t ade7753_read_frequency (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u16 t;@@ -402,9 +392,8 @@ static ssize_t ade7753_read_frequency(struct device *dev, }static ssize_t ade7753_write_frequency (struct device *dev, -struct device_attribute *attr, -const char *buf, -size_t len) +struct device_attribute *attr, +const char *buf,size_t len) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st =iio_priv (indio_dev); --2.7.4
Quoted 6 lines
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160918210056.GA6241%40fireworks.
For more options, visit https://groups.google.com/d/optout.--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160919052122.GA2699%40d830.WORKGROUP.
For more options, visit https://groups.google.com/d/optout.
Hello!
Thank you for your responses. I will keep them in mind.
Quoted 160 lines · Georgiana Chelu
This patch fixes the following checkpatch.pl check:
CHECK: Alignment should match open parenthesisSigned-off-by Georgiana Rodica Chelu <[email protected]>---
drivers/staging/iio/meter/ade7753.c | 43 ++++++++++++++----------------------- 1 file changed, 16 insertions(+), 27 deletions(-)drivers/staging/iio/meter/ade7753.c +3
-5@@ -42,8 +42,7 @@ static int ade7753_spi_write_reg_8(struct device *dev, }static int ade7753_spi_write_reg_16 (struct device *dev, -u8 reg_address, -u16 value) +u8 reg_address,u16 value) {int ret;struct iio_dev *indio_dev =dev_to_iio_dev (dev);@@ -60,8 +59,7 @@ static int ade7753_spi_write_reg_16(struct device *dev, }static int ade7753_spi_read_reg_8 (struct device *dev, -u8 reg_address, -u8 *val) +u8 reg_address,u8 *val) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st =iio_priv (indio_dev);@@ -70,7 +68,7 @@ static int ade7753_spi_read_reg_8(struct device *dev, ret =spi_w8r8 (st->us,ADE7753_READ_REG (reg_address));if (ret <0 ) { dev_err(&st->us->dev, "problem when reading 8 bit register 0x%02X", - reg_address); + reg_address);return ret; }*val = ret;drivers/staging/iio/meter/ade7753.c +3
-5@@ -79,8 +77,7 @@ static int ade7753_spi_read_reg_8(struct device *dev, }static int ade7753_spi_read_reg_16 (struct device *dev, -u8 reg_address, -u16 *val) +u8 reg_address,u16 *val) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st =iio_priv (indio_dev);@@ -99,8 +96,7 @@ static int ade7753_spi_read_reg_16(struct device *dev, }static int ade7753_spi_read_reg_24 (struct device *dev, -u8 reg_address, -u32 *val) +u8 reg_address,u32 *val) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st =iio_priv (indio_dev);@@ -123,7 +119,7 @@ static int ade7753_spi_read_reg_24(struct device *dev, ret =spi_sync_transfer (st->us, xfers,ARRAY_SIZE (xfers));if (ret) { dev_err(&st->us->dev, "problem when reading 24 bit register 0x%02X", - reg_address); + reg_address); goto error_ret; }*val = (st->rx[0] << 16) | (st->rx[1] << 8) | st->rx[2];drivers/staging/iio/meter/ade7753.c +1
-2@@ -134,8 +130,7 @@ error_ret: }static ssize_t ade7753_read_8bit (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u8 val;drivers/staging/iio/meter/ade7753.c +1
-2@@ -149,8 +144,7 @@ static ssize_t ade7753_read_8bit(struct device *dev, }static ssize_t ade7753_read_16bit (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u16 val;drivers/staging/iio/meter/ade7753.c +1
-2@@ -164,8 +158,7 @@ static ssize_t ade7753_read_16bit(struct device *dev, }static ssize_t ade7753_read_24bit (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u32 val;drivers/staging/iio/meter/ade7753.c +5
-8@@ -179,9 +172,8 @@ static ssize_t ade7753_read_24bit(struct device *dev, }static ssize_t ade7753_write_8bit (struct device *dev, -struct device_attribute *attr, -const char *buf, -size_t len) +struct device_attribute *attr, +const char *buf,size_t len) {struct iio_dev_attr *this_attr =to_iio_dev_attr (attr);int ret;@@ -197,9 +189,8 @@ error_ret: }static ssize_t ade7753_write_16bit (struct device *dev, -struct device_attribute *attr, -const char *buf, -size_t len) +struct device_attribute *attr, +const char *buf,size_t len) {struct iio_dev_attr *this_attr =to_iio_dev_attr (attr);int ret;@@ -384,8 +375,7 @@ err_ret: }static ssize_t ade7753_read_frequency (struct device *dev, -struct device_attribute *attr, -char *buf) +struct device_attribute *attr,char *buf) {int ret;u16 t;drivers/staging/iio/meter/ade7753.c +2
-3@@ -402,9 +392,8 @@ static ssize_t ade7753_read_frequency(struct device *dev, }static ssize_t ade7753_write_frequency (struct device *dev, -struct device_attribute *attr, -const char *buf, -size_t len) +struct device_attribute *attr, +const char *buf,size_t len) {struct iio_dev *indio_dev =dev_to_iio_dev (dev);struct ade7753_state *st = iio_priv(indio_dev);Signature · 1 line
2.7.4