linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/staging/iio: braces {} are not necessary for single statement blocks
@ 2017-04-10  4:38 Pushkar Jambhlekar
  2017-04-14  8:17 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Pushkar Jambhlekar @ 2017-04-10  4:38 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Hartmut Knaack, Peter Meerwald-Stadler, Greg Kroah-Hartman
  Cc: linux-iio, devel, linux-kernel, Pushkar Jambhlekar

Handling checkpatch.pl warning for if block. For single if statement block, braces are not neccessary. Making code consistent with linux kernel coding guidelines.

Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com>
---
 drivers/staging/iio/accel/adis16203.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/accel/adis16203.c b/drivers/staging/iio/accel/adis16203.c
index faa2869..401386a 100644
--- a/drivers/staging/iio/accel/adis16203.c
+++ b/drivers/staging/iio/accel/adis16203.c
@@ -205,9 +205,9 @@ static int adis16203_read_raw(struct iio_dev *indio_dev,
 		bits = 14;
 		addr = adis16203_addresses[chan->scan_index];
 		ret = adis_read_reg_16(st, addr, &val16);
-		if (ret) {
+		if (ret)
 			return ret;
-		}
+
 		val16 &= (1 << bits) - 1;
 		val16 = (s16)(val16 << (16 - bits)) >> (16 - bits);
 		*val = val16;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drivers/staging/iio: braces {} are not necessary for single statement blocks
  2017-04-10  4:38 [PATCH] drivers/staging/iio: braces {} are not necessary for single statement blocks Pushkar Jambhlekar
@ 2017-04-14  8:17 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2017-04-14  8:17 UTC (permalink / raw)
  To: Pushkar Jambhlekar
  Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Hartmut Knaack, Peter Meerwald-Stadler, linux-iio, devel,
	linux-kernel

On Mon, Apr 10, 2017 at 10:08:07AM +0530, Pushkar Jambhlekar wrote:
> Handling checkpatch.pl warning for if block. For single if statement block, braces are not neccessary. Making code consistent with linux kernel coding guidelines.

Pleasse wrap your changelog comments at 72 columns like git asked you to
do.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-14  8:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10  4:38 [PATCH] drivers/staging/iio: braces {} are not necessary for single statement blocks Pushkar Jambhlekar
2017-04-14  8:17 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).