Skip to contentSkip to conversation

staging: iio: ad5933: align arguments on new line with open parenthesis

PATCH Superseded Katie Dunne 4 participants 7 messages Sep 14, 2016

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: iio: ad5933: align arguments on new line with open parenthesis

[email protected], [email protected]
Bcc:
Subject: [PATCH] staging: iio: ad5933: align arguments on new line with open parenthesis Reply-To:

Issue found by checkpatch: "Alignment should match open parenthesis"

---
 drivers/staging/iio/impedance-analyzer/ad5933.c | 34 ++++++++++++-------------
 1 file changed, 17 insertions(+), 17 deletions(-)
drivers/staging/iio/impedance-analyzer/ad5933.c +17 -17
index 24c348d..2307b4d 100644
@@ -157,7 +157,7 @@ static const struct iio_chan_spec ad5933_channels[] = {
 };
 
 static int ad5933_i2c_write(struct i2c_client *client,
-			      u8 reg, u8 len, u8 *data)
+			    u8 reg, u8 len, u8 *data)
 {
 	int ret;
 
@@ -172,7 +172,7 @@ static int ad5933_i2c_write(struct i2c_client *client,
 }
 
 static int ad5933_i2c_read(struct i2c_client *client,
-			      u8 reg, u8 len, u8 *data)
+			   u8 reg, u8 len, u8 *data)
 {
 	int ret;
 
@@ -269,7 +269,7 @@ static int ad5933_setup(struct ad5933_state *st)
 	dat = cpu_to_be16(st->settling_cycles);
 
 	ret = ad5933_i2c_write(st->client,
-			AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
+			       AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
 	if (ret < 0)
 		return ret;
 
@@ -294,8 +294,8 @@ static void ad5933_calc_out_ranges(struct ad5933_state *st)
  */
 
 static ssize_t ad5933_show_frequency(struct device *dev,
-					struct device_attribute *attr,
-					char *buf)
+				     struct device_attribute *attr,
+				     char *buf)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
 	struct ad5933_state *st = iio_priv(indio_dev);
@@ -322,9 +322,9 @@ static ssize_t ad5933_show_frequency(struct device *dev,
 }
 
 static ssize_t ad5933_store_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 ad5933_state *st = iio_priv(indio_dev);
@@ -357,8 +357,8 @@ static IIO_DEVICE_ATTR(out_voltage0_freq_increment, S_IRUGO | S_IWUSR,
 			AD5933_REG_FREQ_INC);
 
 static ssize_t ad5933_show(struct device *dev,
-					struct device_attribute *attr,
-					char *buf)
+			   struct device_attribute *attr,
+			   char *buf)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
 	struct ad5933_state *st = iio_priv(indio_dev);
@@ -399,9 +399,9 @@ static ssize_t ad5933_show(struct device *dev,
 }
 
 static ssize_t ad5933_store(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 ad5933_state *st = iio_priv(indio_dev);
@@ -451,7 +451,7 @@ static ssize_t ad5933_store(struct device *dev,
 
 		dat = cpu_to_be16(val);
 		ret = ad5933_i2c_write(st->client,
-				AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
+				       AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
 		break;
 	case AD5933_FREQ_POINTS:
 		val = clamp(val, (u16)0, (u16)511);
@@ -545,8 +545,8 @@ static int ad5933_read_raw(struct iio_dev *indio_dev,
 			goto out;
 
 		ret = ad5933_i2c_read(st->client,
-				AD5933_REG_TEMP_DATA, 2,
-				(u8 *)&dat);
+				      AD5933_REG_TEMP_DATA, 2,
+				      (u8 *)&dat);
 		if (ret < 0)
 			goto out;
 		mutex_unlock(&indio_dev->mlock);
@@ -705,7 +705,7 @@ static void ad5933_work(struct work_struct *work)
 }
 
 static int ad5933_probe(struct i2c_client *client,
-				   const struct i2c_device_id *id)
+			const struct i2c_device_id *id)
 {
 	int ret, voltage_uv = 0;
 	struct ad5933_platform_data *pdata = dev_get_platdata(&client->dev);
Signature · 1 line
2.7.4
#1 lore raw
Quoted 4 lines · Katie Dunne

[email protected], [email protected]
Bcc:
Subject: [PATCH] staging: iio: ad5933: align arguments on new line with open parenthesis Reply-To:

Hi Katie,
Something odd happened just above here...with the cc list and subject repeating.
It looks like some of these can be pulled into less lines. If it fits within 80 chars, it's fine on one line. See below.

Quoted 13 lines

Issue found by checkpatch: "Alignment should match open parenthesis"

---
 drivers/staging/iio/impedance-analyzer/ad5933.c | 34 ++++++++++++-------------
 1 file changed, 17 insertions(+), 17 deletions(-)
drivers/staging/iio/impedance-analyzer/ad5933.c +0 -0
index 24c348d..2307b4d 100644

drivers/staging/iio/impedance-analyzer/ad5933.c static const struct iio_chan_spec ad5933_channels[] = { · line 160

Quoted 5 lines
drivers/staging/iio/impedance-analyzer/ad5933.c +1 -1
@@ -157,7 +157,7 @@ static const struct iio_chan_spec ad5933_channels[] = {
 };
 
 static int ad5933_i2c_write(struct i2c_client *client,
-			      u8 reg, u8 len, u8 *data)
+			    u8 reg, u8 len, u8 *data)

think this one fits on one line....
static int ad5933_i2c_read(struct i2c_client *client, u8 reg, u8 len, u8 *data) some others may do same or at least pull into less lines.

Quoted 107 lines
drivers/staging/iio/impedance-analyzer/ad5933.c +16 -16
 {
 	int ret;
 
@@ -172,7 +172,7 @@ static int ad5933_i2c_write(struct i2c_client *client,
 }
 
 static int ad5933_i2c_read(struct i2c_client *client,
-			      u8 reg, u8 len, u8 *data)
+			   u8 reg, u8 len, u8 *data)
 {
 	int ret;
 
@@ -269,7 +269,7 @@ static int ad5933_setup(struct ad5933_state *st)
 	dat = cpu_to_be16(st->settling_cycles);
 
 	ret = ad5933_i2c_write(st->client,
-			AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
+			       AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
 	if (ret < 0)
 		return ret;
 
@@ -294,8 +294,8 @@ static void ad5933_calc_out_ranges(struct ad5933_state *st)
  */
 
 static ssize_t ad5933_show_frequency(struct device *dev,
-					struct device_attribute *attr,
-					char *buf)
+				     struct device_attribute *attr,
+				     char *buf)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
 	struct ad5933_state *st = iio_priv(indio_dev);
@@ -322,9 +322,9 @@ static ssize_t ad5933_show_frequency(struct device *dev,
 }
 
 static ssize_t ad5933_store_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 ad5933_state *st = iio_priv(indio_dev);
@@ -357,8 +357,8 @@ static IIO_DEVICE_ATTR(out_voltage0_freq_increment, S_IRUGO | S_IWUSR,
 			AD5933_REG_FREQ_INC);
 
 static ssize_t ad5933_show(struct device *dev,
-					struct device_attribute *attr,
-					char *buf)
+			   struct device_attribute *attr,
+			   char *buf)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
 	struct ad5933_state *st = iio_priv(indio_dev);
@@ -399,9 +399,9 @@ static ssize_t ad5933_show(struct device *dev,
 }
 
 static ssize_t ad5933_store(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 ad5933_state *st = iio_priv(indio_dev);
@@ -451,7 +451,7 @@ static ssize_t ad5933_store(struct device *dev,
 
 		dat = cpu_to_be16(val);
 		ret = ad5933_i2c_write(st->client,
-				AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
+				       AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
 		break;
 	case AD5933_FREQ_POINTS:
 		val = clamp(val, (u16)0, (u16)511);
@@ -545,8 +545,8 @@ static int ad5933_read_raw(struct iio_dev *indio_dev,
 			goto out;
 
 		ret = ad5933_i2c_read(st->client,
-				AD5933_REG_TEMP_DATA, 2,
-				(u8 *)&dat);
+				      AD5933_REG_TEMP_DATA, 2,
+				      (u8 *)&dat);
 		if (ret < 0)
 			goto out;
 		mutex_unlock(&indio_dev->mlock);
@@ -705,7 +705,7 @@ static void ad5933_work(struct work_struct *work)
 }
 
 static int ad5933_probe(struct i2c_client *client,
-				   const struct i2c_device_id *id)
+			const struct i2c_device_id *id)
 {
 	int ret, voltage_uv = 0;
 	struct ad5933_platform_data *pdata = dev_get_platdata(&client->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/20160914010414.GA441%40katie-Inspiron-5748.
For more options, visit https://groups.google.com/d/optout.
#2 lore raw
Quoted 9 lines · Alison Schofield
Quoted 4 lines · Katie Dunne

[email protected], [email protected]
Bcc:
Subject: [PATCH] staging: iio: ad5933: align arguments on new line with open parenthesis Reply-To:

Hi Katie,
Something odd happened just above here...with the cc list and subject repeating.

Thanks Alison. Something weird happened with mutt where the subject disappeared so I had type it twice. I will try to figure out what went wrong.

Quoted 2 lines

It looks like some of these can be pulled into less lines. If it fits within 80 chars, it's fine on one line. See below.

I wasn't sure if I could do this in the same patch, but that makes sense.

I will send a v2.

Katie

Quoted 132 lines
Quoted 14 lines

Issue found by checkpatch: "Alignment should match open parenthesis"

---
 drivers/staging/iio/impedance-analyzer/ad5933.c | 34 ++++++++++++-------------
 1 file changed, 17 insertions(+), 17 deletions(-)
drivers/staging/iio/impedance-analyzer/ad5933.c +0 -0
index 24c348d..2307b4d 100644

drivers/staging/iio/impedance-analyzer/ad5933.c static const struct iio_chan_spec ad5933_channels[] = { · line 160

Quoted 5 lines
drivers/staging/iio/impedance-analyzer/ad5933.c +1 -1
@@ -157,7 +157,7 @@ static const struct iio_chan_spec ad5933_channels[] = {
 };
 
 static int ad5933_i2c_write(struct i2c_client *client,
-			      u8 reg, u8 len, u8 *data)
+			    u8 reg, u8 len, u8 *data)

think this one fits on one line....
static int ad5933_i2c_read(struct i2c_client *client, u8 reg, u8 len, u8 *data) some others may do same or at least pull into less lines.

Quoted 107 lines
drivers/staging/iio/impedance-analyzer/ad5933.c +16 -16
 {
 	int ret;
 
@@ -172,7 +172,7 @@ static int ad5933_i2c_write(struct i2c_client *client,
 }
 
 static int ad5933_i2c_read(struct i2c_client *client,
-			      u8 reg, u8 len, u8 *data)
+			   u8 reg, u8 len, u8 *data)
 {
 	int ret;
 
@@ -269,7 +269,7 @@ static int ad5933_setup(struct ad5933_state *st)
 	dat = cpu_to_be16(st->settling_cycles);
 
 	ret = ad5933_i2c_write(st->client,
-			AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
+			       AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
 	if (ret < 0)
 		return ret;
 
@@ -294,8 +294,8 @@ static void ad5933_calc_out_ranges(struct ad5933_state *st)
  */
 
 static ssize_t ad5933_show_frequency(struct device *dev,
-					struct device_attribute *attr,
-					char *buf)
+				     struct device_attribute *attr,
+				     char *buf)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
 	struct ad5933_state *st = iio_priv(indio_dev);
@@ -322,9 +322,9 @@ static ssize_t ad5933_show_frequency(struct device *dev,
 }
 
 static ssize_t ad5933_store_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 ad5933_state *st = iio_priv(indio_dev);
@@ -357,8 +357,8 @@ static IIO_DEVICE_ATTR(out_voltage0_freq_increment, S_IRUGO | S_IWUSR,
 			AD5933_REG_FREQ_INC);
 
 static ssize_t ad5933_show(struct device *dev,
-					struct device_attribute *attr,
-					char *buf)
+			   struct device_attribute *attr,
+			   char *buf)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
 	struct ad5933_state *st = iio_priv(indio_dev);
@@ -399,9 +399,9 @@ static ssize_t ad5933_show(struct device *dev,
 }
 
 static ssize_t ad5933_store(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 ad5933_state *st = iio_priv(indio_dev);
@@ -451,7 +451,7 @@ static ssize_t ad5933_store(struct device *dev,
 
 		dat = cpu_to_be16(val);
 		ret = ad5933_i2c_write(st->client,
-				AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
+				       AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
 		break;
 	case AD5933_FREQ_POINTS:
 		val = clamp(val, (u16)0, (u16)511);
@@ -545,8 +545,8 @@ static int ad5933_read_raw(struct iio_dev *indio_dev,
 			goto out;
 
 		ret = ad5933_i2c_read(st->client,
-				AD5933_REG_TEMP_DATA, 2,
-				(u8 *)&dat);
+				      AD5933_REG_TEMP_DATA, 2,
+				      (u8 *)&dat);
 		if (ret < 0)
 			goto out;
 		mutex_unlock(&indio_dev->mlock);
@@ -705,7 +705,7 @@ static void ad5933_work(struct work_struct *work)
 }
 
 static int ad5933_probe(struct i2c_client *client,
-				   const struct i2c_device_id *id)
+			const struct i2c_device_id *id)
 {
 	int ret, voltage_uv = 0;
 	struct ad5933_platform_data *pdata = dev_get_platdata(&client->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/20160914010414.GA441%40katie-Inspiron-5748.
For more options, visit https://groups.google.com/d/optout.
#3 lore raw
Quoted 15 lines · Katie Dunne
Quoted 9 lines · Alison Schofield
Quoted 4 lines · Katie Dunne

[email protected], [email protected]
Bcc:
Subject: [PATCH] staging: iio: ad5933: align arguments on new line with open parenthesis Reply-To:

Hi Katie,
Something odd happened just above here...with the cc list and subject repeating.

Thanks Alison. Something weird happened with mutt where the subject disappeared so I had type it twice. I will try to figure out what went wrong.

Quoted 7 lines
Quoted 2 lines

It looks like some of these can be pulled into less lines. If it fits within 80 chars, it's fine on one line. See below.

I wasn't sure if I could do this in the same patch, but that makes sense.

I will send a v2.

Hi Katie,

Just to make sure that everything works fine, it's always a good idea to send the email first only to yourself.

Then if it looks good send it to everybody :). I usually find late problems with this approach.

thanks,
daniel.

#4 lore raw
Quoted 24 lines · Daniel Baluta
Quoted 15 lines · Katie Dunne
Quoted 9 lines · Alison Schofield
Quoted 4 lines · Katie Dunne

[email protected], [email protected]
Bcc:
Subject: [PATCH] staging: iio: ad5933: align arguments on new line with open parenthesis Reply-To:

Hi Katie,
Something odd happened just above here...with the cc list and subject repeating.

Thanks Alison. Something weird happened with mutt where the subject disappeared so I had type it twice. I will try to figure out what went wrong.

Quoted 7 lines
Quoted 2 lines

It looks like some of these can be pulled into less lines. If it fits within 80 chars, it's fine on one line. See below.

I wasn't sure if I could do this in the same patch, but that makes sense.

I will send a v2.

Quoted 7 lines

Hi Katie,

Just to make sure that everything works fine, it's always a good idea to send the email first only to yourself.

Then if it looks good send it to everybody :). I usually find late problems with this approach.

Thanks, Daniel. It looks like the problem was how I was formating the Cc list in mutt. I sent it only to myself first and it looked correct. But adding multiple emails addresses incorrectly changed the formatting.

Katie

Quoted 3 lines

thanks,
daniel.

#5 lore raw
In reply to Katie Dunne
Quoted 15 lines · Katie Dunne
Quoted 9 lines · Alison Schofield
Quoted 4 lines · Katie Dunne

[email protected], [email protected]
Bcc:
Subject: [PATCH] staging: iio: ad5933: align arguments on new line with open parenthesis Reply-To:

Hi Katie,
Something odd happened just above here...with the cc list and subject repeating.

Thanks Alison. Something weird happened with mutt where the subject disappeared so I had type it twice. I will try to figure out what went wrong.

Quoted 7 lines
Quoted 2 lines

It looks like some of these can be pulled into less lines. If it fits within 80 chars, it's fine on one line. See below.

I wasn't sure if I could do this in the same patch, but that makes sense.

I will send a v2.

Katie,
Your comment is good, because that is a question we keep asking: should something be a separate patch? In this case, as you go to realign the function arguments and as a side effect remove some line wrap, it's all part of the realignment.
alisons

Quoted 135 lines

Katie

Quoted 132 lines
Quoted 14 lines

Issue found by checkpatch: "Alignment should match open parenthesis"

---
 drivers/staging/iio/impedance-analyzer/ad5933.c | 34 ++++++++++++-------------
 1 file changed, 17 insertions(+), 17 deletions(-)
drivers/staging/iio/impedance-analyzer/ad5933.c +0 -0
index 24c348d..2307b4d 100644

drivers/staging/iio/impedance-analyzer/ad5933.c static const struct iio_chan_spec ad5933_channels[] = { · line 160

Quoted 5 lines
drivers/staging/iio/impedance-analyzer/ad5933.c +1 -1
@@ -157,7 +157,7 @@ static const struct iio_chan_spec ad5933_channels[] = {
 };
 
 static int ad5933_i2c_write(struct i2c_client *client,
-			      u8 reg, u8 len, u8 *data)
+			    u8 reg, u8 len, u8 *data)

think this one fits on one line....
static int ad5933_i2c_read(struct i2c_client *client, u8 reg, u8 len, u8 *data) some others may do same or at least pull into less lines.

Quoted 107 lines
drivers/staging/iio/impedance-analyzer/ad5933.c +16 -16
 {
 	int ret;
 
@@ -172,7 +172,7 @@ static int ad5933_i2c_write(struct i2c_client *client,
 }
 
 static int ad5933_i2c_read(struct i2c_client *client,
-			      u8 reg, u8 len, u8 *data)
+			   u8 reg, u8 len, u8 *data)
 {
 	int ret;
 
@@ -269,7 +269,7 @@ static int ad5933_setup(struct ad5933_state *st)
 	dat = cpu_to_be16(st->settling_cycles);
 
 	ret = ad5933_i2c_write(st->client,
-			AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
+			       AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
 	if (ret < 0)
 		return ret;
 
@@ -294,8 +294,8 @@ static void ad5933_calc_out_ranges(struct ad5933_state *st)
  */
 
 static ssize_t ad5933_show_frequency(struct device *dev,
-					struct device_attribute *attr,
-					char *buf)
+				     struct device_attribute *attr,
+				     char *buf)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
 	struct ad5933_state *st = iio_priv(indio_dev);
@@ -322,9 +322,9 @@ static ssize_t ad5933_show_frequency(struct device *dev,
 }
 
 static ssize_t ad5933_store_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 ad5933_state *st = iio_priv(indio_dev);
@@ -357,8 +357,8 @@ static IIO_DEVICE_ATTR(out_voltage0_freq_increment, S_IRUGO | S_IWUSR,
 			AD5933_REG_FREQ_INC);
 
 static ssize_t ad5933_show(struct device *dev,
-					struct device_attribute *attr,
-					char *buf)
+			   struct device_attribute *attr,
+			   char *buf)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
 	struct ad5933_state *st = iio_priv(indio_dev);
@@ -399,9 +399,9 @@ static ssize_t ad5933_show(struct device *dev,
 }
 
 static ssize_t ad5933_store(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 ad5933_state *st = iio_priv(indio_dev);
@@ -451,7 +451,7 @@ static ssize_t ad5933_store(struct device *dev,
 
 		dat = cpu_to_be16(val);
 		ret = ad5933_i2c_write(st->client,
-				AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
+				       AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
 		break;
 	case AD5933_FREQ_POINTS:
 		val = clamp(val, (u16)0, (u16)511);
@@ -545,8 +545,8 @@ static int ad5933_read_raw(struct iio_dev *indio_dev,
 			goto out;
 
 		ret = ad5933_i2c_read(st->client,
-				AD5933_REG_TEMP_DATA, 2,
-				(u8 *)&dat);
+				      AD5933_REG_TEMP_DATA, 2,
+				      (u8 *)&dat);
 		if (ret < 0)
 			goto out;
 		mutex_unlock(&indio_dev->mlock);
@@ -705,7 +705,7 @@ static void ad5933_work(struct work_struct *work)
 }
 
 static int ad5933_probe(struct i2c_client *client,
-				   const struct i2c_device_id *id)
+			const struct i2c_device_id *id)
 {
 	int ret, voltage_uv = 0;
 	struct ad5933_platform_data *pdata = dev_get_platdata(&client->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/20160914010414.GA441%40katie-Inspiron-5748.
For more options, visit https://groups.google.com/d/optout.
#6 lore raw
In reply to Katie Dunne
Quoted 4 lines · Katie Dunne

[email protected], [email protected]
Bcc:
Subject: [PATCH] staging: iio: ad5933: align arguments on new line with open parenthesis Reply-To:

Something went wrong here...

julia

Quoted 126 lines

Issue found by checkpatch: "Alignment should match open parenthesis"

---
 drivers/staging/iio/impedance-analyzer/ad5933.c | 34 ++++++++++++-------------
 1 file changed, 17 insertions(+), 17 deletions(-)
drivers/staging/iio/impedance-analyzer/ad5933.c +17 -18
index 24c348d..2307b4d 100644
@@ -157,7 +157,7 @@ static const struct iio_chan_spec ad5933_channels[] = {
 };
 
 static int ad5933_i2c_write(struct i2c_client *client,
-			      u8 reg, u8 len, u8 *data)
+			    u8 reg, u8 len, u8 *data)
 {
 	int ret;
 
@@ -172,7 +172,7 @@ static int ad5933_i2c_write(struct i2c_client *client,
 }
 
 static int ad5933_i2c_read(struct i2c_client *client,
-			      u8 reg, u8 len, u8 *data)
+			   u8 reg, u8 len, u8 *data)
 {
 	int ret;
 
@@ -269,7 +269,7 @@ static int ad5933_setup(struct ad5933_state *st)
 	dat = cpu_to_be16(st->settling_cycles);
 
 	ret = ad5933_i2c_write(st->client,
-			AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
+			       AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
 	if (ret < 0)
 		return ret;
 
@@ -294,8 +294,8 @@ static void ad5933_calc_out_ranges(struct ad5933_state *st)
  */
 
 static ssize_t ad5933_show_frequency(struct device *dev,
-					struct device_attribute *attr,
-					char *buf)
+				     struct device_attribute *attr,
+				     char *buf)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
 	struct ad5933_state *st = iio_priv(indio_dev);
@@ -322,9 +322,9 @@ static ssize_t ad5933_show_frequency(struct device *dev,
 }
 
 static ssize_t ad5933_store_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 ad5933_state *st = iio_priv(indio_dev);
@@ -357,8 +357,8 @@ static IIO_DEVICE_ATTR(out_voltage0_freq_increment, S_IRUGO | S_IWUSR,
 			AD5933_REG_FREQ_INC);
 
 static ssize_t ad5933_show(struct device *dev,
-					struct device_attribute *attr,
-					char *buf)
+			   struct device_attribute *attr,
+			   char *buf)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
 	struct ad5933_state *st = iio_priv(indio_dev);
@@ -399,9 +399,9 @@ static ssize_t ad5933_show(struct device *dev,
 }
 
 static ssize_t ad5933_store(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 ad5933_state *st = iio_priv(indio_dev);
@@ -451,7 +451,7 @@ static ssize_t ad5933_store(struct device *dev,
 
 		dat = cpu_to_be16(val);
 		ret = ad5933_i2c_write(st->client,
-				AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
+				       AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
 		break;
 	case AD5933_FREQ_POINTS:
 		val = clamp(val, (u16)0, (u16)511);
@@ -545,8 +545,8 @@ static int ad5933_read_raw(struct iio_dev *indio_dev,
 			goto out;
 
 		ret = ad5933_i2c_read(st->client,
-				AD5933_REG_TEMP_DATA, 2,
-				(u8 *)&dat);
+				      AD5933_REG_TEMP_DATA, 2,
+				      (u8 *)&dat);
 		if (ret < 0)
 			goto out;
 		mutex_unlock(&indio_dev->mlock);
@@ -705,7 +705,7 @@ static void ad5933_work(struct work_struct *work)
 }
 
 static int ad5933_probe(struct i2c_client *client,
-				   const struct i2c_device_id *id)
+			const struct i2c_device_id *id)
 {
 	int ret, voltage_uv = 0;
 	struct ad5933_platform_data *pdata = dev_get_platdata(&client->dev);
--

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/20160914010414.GA441%40katie-Inspiron-5748.
For more options, visit https://groups.google.com/d/optout.