Skip to contentSkip to conversation

staging:dgnc: Fixed checkpatch warning

PATCH In review Cristina Moraru 2 participants 2 messages Sep 29, 2015 – Sep 30, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging:dgnc: Fixed checkpatch warning

Fixed 'suspect code indent for conditional statements (8, 24)' Warning

---
 drivers/staging/dgnc/dgnc_cls.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/staging/dgnc/dgnc_cls.c +3 -2
index a629a78..a2cfe35 100644
@@ -632,9 +632,10 @@ static void cls_param(struct tty_struct *tty)
 		(ch->ch_c_cflag & CRTSCTS) ||
 		!(ch->ch_digi.digi_flags & DIGI_FORCEDCD) ||
 		!(ch->ch_c_cflag & CLOCAL))
-			ier |= UART_IER_MSI;
+
+		ier |= UART_IER_MSI;
 	else
-			ier &= ~UART_IER_MSI;
+		ier &= ~UART_IER_MSI;
 
 	ier |= UART_IER_THRI;
 
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 12 lines · Cristina Moraru

Fixed 'suspect code indent for conditional statements (8, 24)' Warning

---
 drivers/staging/dgnc/dgnc_cls.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/staging/dgnc/dgnc_cls.c +0 -0
index a629a78..a2cfe35 100644

drivers/staging/dgnc/dgnc_cls.c static void cls_param(struct tty_struct *tty) · line 638

Quoted 9 lines
drivers/staging/dgnc/dgnc_cls.c +3 -2
@@ -632,9 +632,10 @@ static void cls_param(struct tty_struct *tty)
 		(ch->ch_c_cflag & CRTSCTS) ||
 		!(ch->ch_digi.digi_flags & DIGI_FORCEDCD) ||
 		!(ch->ch_c_cflag & CLOCAL))
-			ier |= UART_IER_MSI;
+
+		ier |= UART_IER_MSI;
 	else
-			ier &= ~UART_IER_MSI;
+		ier &= ~UART_IER_MSI;

Technically your change is correct, but ugh, the code is ugly now and it's not obvious at all that the assignment of ier is what happens here due to the indentation of the lines above it, right?

Can you please fix this to move the if statement lines to the left correctly, so that the tab indentation of the ier line is now obvious?

Just do it all in one patch, I don't want to take this patch as-is.

thanks,

greg k-h