public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: rts5208: Fix code indentation warning as detected by checkpatch.pl
@ 2015-08-03 11:18 Shah, Yash (Y.)
  2015-08-03 11:33 ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: Shah, Yash (Y.) @ 2015-08-03 11:18 UTC (permalink / raw)
  To: gregkh@linuxfoundation.org, roxanagabriela10@gmail.com,
	joe@perches.com, lambert.quentin@gmail.com,
	vatikaharlalka@gmail.com, fabio.falzoi84@gmail.com,
	contact@timothyleung.co, tinajohnson.1234@gmail.com
  Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org

From: Yash Shah <yshah1@visteon.com>

Fixed code indentation warning as detected by checkpatch.pl.

Signed-off-by: Yash Shah <yshah1@visteon.com>
---
 drivers/staging/rts5208/ms.c |  5 ++---
 drivers/staging/rts5208/sd.c | 10 ++++------
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c
index ee818b0..cdaa1ab 100644
--- a/drivers/staging/rts5208/ms.c
+++ b/drivers/staging/rts5208/ms.c
@@ -1121,11 +1121,10 @@ static int ms_read_attribute_info(struct rtsx_chip *chip)
 
 #ifdef SUPPORT_MSXC
 		if ((buf[cur_addr_off + 8] == 0x10) ||
-			(buf[cur_addr_off + 8] == 0x13))
+			(buf[cur_addr_off + 8] == 0x13)) {
 #else
-		if (buf[cur_addr_off + 8] == 0x10)
+		if (buf[cur_addr_off + 8] == 0x10) {
 #endif
-		{
 			sys_info_addr = ((u32)buf[cur_addr_off + 0] << 24) |
 				((u32)buf[cur_addr_off + 1] << 16) |
 				((u32)buf[cur_addr_off + 2] << 8) |
diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c
index cb41579..d6c4982 100644
--- a/drivers/staging/rts5208/sd.c
+++ b/drivers/staging/rts5208/sd.c
@@ -246,11 +246,10 @@ RTY_SEND_CMD:
 				}
 			}
 #ifdef SUPPORT_SD_LOCK
-			if (ptr[1] & 0x7D)
+			if (ptr[1] & 0x7D) {
 #else
-			if (ptr[1] & 0x7F)
+			if (ptr[1] & 0x7F) {
 #endif
-			{
 				dev_dbg(rtsx_dev(chip), "ptr[1]: 0x%02x\n",
 					ptr[1]);
 				rtsx_trace(chip);
@@ -4148,11 +4147,10 @@ RTY_SEND_CMD:
 			}
 		}
 #ifdef SUPPORT_SD_LOCK
-		if (ptr[1] & 0x7D)
+		if (ptr[1] & 0x7D) {
 #else
-		if (ptr[1] & 0x7F)
+		if (ptr[1] & 0x7F) {
 #endif
-		{
 			rtsx_trace(chip);
 			return STATUS_FAIL;
 		}
-- 
1.9.1

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

* Re: [PATCH] Staging: rts5208: Fix code indentation warning as detected by checkpatch.pl
  2015-08-03 11:18 [PATCH] Staging: rts5208: Fix code indentation warning as detected by checkpatch.pl Shah, Yash (Y.)
@ 2015-08-03 11:33 ` Dan Carpenter
  2015-08-03 11:41   ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2015-08-03 11:33 UTC (permalink / raw)
  To: Shah, Yash (Y.)
  Cc: gregkh@linuxfoundation.org, roxanagabriela10@gmail.com,
	joe@perches.com, lambert.quentin@gmail.com,
	vatikaharlalka@gmail.com, fabio.falzoi84@gmail.com,
	contact@timothyleung.co, tinajohnson.1234@gmail.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org

On Mon, Aug 03, 2015 at 11:18:31AM +0000, Shah, Yash (Y.) wrote:
> From: Yash Shah <yshah1@visteon.com>
> 
> Fixed code indentation warning as detected by checkpatch.pl.
> 
> Signed-off-by: Yash Shah <yshah1@visteon.com>

Defines aren't allowed in .c files anyway.

regards,
dan carpenter


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

* Re: [PATCH] Staging: rts5208: Fix code indentation warning as detected by checkpatch.pl
  2015-08-03 11:33 ` Dan Carpenter
@ 2015-08-03 11:41   ` Joe Perches
  2015-08-03 12:09     ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2015-08-03 11:41 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Shah, Yash (Y.), gregkh@linuxfoundation.org,
	roxanagabriela10@gmail.com, lambert.quentin@gmail.com,
	vatikaharlalka@gmail.com, fabio.falzoi84@gmail.com,
	contact@timothyleung.co, tinajohnson.1234@gmail.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org

On Mon, 2015-08-03 at 14:33 +0300, Dan Carpenter wrote:
> On Mon, Aug 03, 2015 at 11:18:31AM +0000, Shah, Yash (Y.) wrote:
> > From: Yash Shah <yshah1@visteon.com>
> > 
> > Fixed code indentation warning as detected by checkpatch.pl.
> > 
> > Signed-off-by: Yash Shah <yshah1@visteon.com>
> 
> Defines aren't allowed in .c files anyway.

The kernel source tree disagrees with you

$ git grep "^\s*#\s*define\b" -- "*.c" | wc -l
175830


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

* Re: [PATCH] Staging: rts5208: Fix code indentation warning as detected by checkpatch.pl
  2015-08-03 11:41   ` Joe Perches
@ 2015-08-03 12:09     ` Dan Carpenter
  2015-08-03 12:18       ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2015-08-03 12:09 UTC (permalink / raw)
  To: Joe Perches
  Cc: devel@driverdev.osuosl.org, tinajohnson.1234@gmail.com,
	gregkh@linuxfoundation.org, lambert.quentin@gmail.com,
	linux-kernel@vger.kernel.org, fabio.falzoi84@gmail.com,
	roxanagabriela10@gmail.com, vatikaharlalka@gmail.com,
	Shah, Yash (Y.), contact@timothyleung.co

On Mon, Aug 03, 2015 at 04:41:40AM -0700, Joe Perches wrote:
> On Mon, 2015-08-03 at 14:33 +0300, Dan Carpenter wrote:
> > On Mon, Aug 03, 2015 at 11:18:31AM +0000, Shah, Yash (Y.) wrote:
> > > From: Yash Shah <yshah1@visteon.com>
> > > 
> > > Fixed code indentation warning as detected by checkpatch.pl.
> > > 
> > > Signed-off-by: Yash Shah <yshah1@visteon.com>
> > 
> > Defines aren't allowed in .c files anyway.
> 
> The kernel source tree disagrees with you
> 
> $ git grep "^\s*#\s*define\b" -- "*.c" | wc -l
> 175830

Duh.  Sorry.  I meant ifdefs.  I'm sure you can find lots of examples
of those too, but this code would be cleaner without the ifdefs.

regards,
dan carpenter


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

* Re: [PATCH] Staging: rts5208: Fix code indentation warning as detected by checkpatch.pl
  2015-08-03 12:09     ` Dan Carpenter
@ 2015-08-03 12:18       ` Joe Perches
  0 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2015-08-03 12:18 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: devel@driverdev.osuosl.org, tinajohnson.1234@gmail.com,
	gregkh@linuxfoundation.org, lambert.quentin@gmail.com,
	linux-kernel@vger.kernel.org, fabio.falzoi84@gmail.com,
	roxanagabriela10@gmail.com, vatikaharlalka@gmail.com,
	Shah, Yash (Y.), contact@timothyleung.co

On Mon, 2015-08-03 at 15:09 +0300, Dan Carpenter wrote:
> On Mon, Aug 03, 2015 at 04:41:40AM -0700, Joe Perches wrote:
> > On Mon, 2015-08-03 at 14:33 +0300, Dan Carpenter wrote:
> > > On Mon, Aug 03, 2015 at 11:18:31AM +0000, Shah, Yash (Y.) wrote:
> > > > From: Yash Shah <yshah1@visteon.com>
> > > > 
> > > > Fixed code indentation warning as detected by checkpatch.pl.
> > > > 
> > > > Signed-off-by: Yash Shah <yshah1@visteon.com>
> > > 
> > > Defines aren't allowed in .c files anyway.
> > 
> > The kernel source tree disagrees with you
> > 
> > $ git grep "^\s*#\s*define\b" -- "*.c" | wc -l
> > 175830
> 
> Duh.  Sorry.  I meant ifdefs.  I'm sure you can find lots of examples
> of those too,

Yeah, no worries, only about 30k of those.

>  but this code would be cleaner without the ifdefs.

Very true.  Removing these would be good.

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

end of thread, other threads:[~2015-08-03 12:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-03 11:18 [PATCH] Staging: rts5208: Fix code indentation warning as detected by checkpatch.pl Shah, Yash (Y.)
2015-08-03 11:33 ` Dan Carpenter
2015-08-03 11:41   ` Joe Perches
2015-08-03 12:09     ` Dan Carpenter
2015-08-03 12:18       ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox