linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] pinctrl/amd: white space cleanups in amd_gpio_dbg_show()
@ 2017-01-07  6:32 Dan Carpenter
  2017-01-11 13:41 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-01-07  6:32 UTC (permalink / raw)
  To: Linus Walleij, Shah, Nehal-bakulchandra, Ken Xue
  Cc: linux-gpio, kernel-janitors

We accidentally deleted two tabs from the first line, but even with that
fixed the conditions were not really kernel style.  Put the && at the
end of the line so we can align the condition clauses.  Also add spaces
around the "+" operator.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index 7b95c1886f7b..249aa5e83419 100644
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -216,14 +216,14 @@ static void amd_gpio_dbg_show(struct seq_file *s, struct gpio_chip *gc)
 			if (pin_reg & BIT(INTERRUPT_ENABLE_OFF)) {
 				interrupt_enable = "interrupt is enabled|";
 
-		if (!(pin_reg & BIT(ACTIVE_LEVEL_OFF))
-				&& !(pin_reg & BIT(ACTIVE_LEVEL_OFF+1)))
+				if (!(pin_reg & BIT(ACTIVE_LEVEL_OFF)) &&
+				    !(pin_reg & BIT(ACTIVE_LEVEL_OFF + 1)))
 					active_level = "Active low|";
-				else if (pin_reg & BIT(ACTIVE_LEVEL_OFF)
-				&& !(pin_reg & BIT(ACTIVE_LEVEL_OFF+1)))
+				else if (pin_reg & BIT(ACTIVE_LEVEL_OFF) &&
+					 !(pin_reg & BIT(ACTIVE_LEVEL_OFF + 1)))
 					active_level = "Active high|";
-				else if (!(pin_reg & BIT(ACTIVE_LEVEL_OFF))
-					&& pin_reg & BIT(ACTIVE_LEVEL_OFF+1))
+				else if (!(pin_reg & BIT(ACTIVE_LEVEL_OFF)) &&
+					 pin_reg & BIT(ACTIVE_LEVEL_OFF + 1))
 					active_level = "Active on both|";
 				else
 					active_level = "Unknow Active level|";

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

* Re: [patch] pinctrl/amd: white space cleanups in amd_gpio_dbg_show()
  2017-01-07  6:32 [patch] pinctrl/amd: white space cleanups in amd_gpio_dbg_show() Dan Carpenter
@ 2017-01-11 13:41 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2017-01-11 13:41 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Shah, Nehal-bakulchandra, Ken Xue, linux-gpio@vger.kernel.org,
	kernel-janitors

On Sat, Jan 7, 2017 at 7:32 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:

> We accidentally deleted two tabs from the first line, but even with that
> fixed the conditions were not really kernel style.  Put the && at the
> end of the line so we can align the condition clauses.  Also add spaces
> around the "+" operator.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Patch applied.

Yours,
Linus Walleij

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

end of thread, other threads:[~2017-01-11 13:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-07  6:32 [patch] pinctrl/amd: white space cleanups in amd_gpio_dbg_show() Dan Carpenter
2017-01-11 13:41 ` Linus Walleij

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).