[3/3] pinctrl: mcp23s08: Combine two function calls in mcp23s08_dbg_show()

Message ID 0510a811-e653-6310-5c7f-8d6434efca2a@users.sourceforge.net
State New
Headers show
Series
  • pinctrl-mcp23s08: Fine-tuning for two function implementations
Related show

Commit Message

SF Markus Elfring Oct. 30, 2017, 3:49 p.m.
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 30 Oct 2017 16:34:44 +0100

* Print a line break together with other data in a single function call.

* Adjust indentation.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/pinctrl/pinctrl-mcp23s08.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

Comments

Linus Walleij Nov. 29, 2017, 12:56 p.m. | #1
On Mon, Oct 30, 2017 at 4:49 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 30 Oct 2017 16:34:44 +0100
>
> * Print a line break together with other data in a single function call.
>
> * Adjust indentation.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

This does not apply.
Possibly depends on 2/3.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
SF Markus Elfring Nov. 29, 2017, 2:04 p.m. | #2
>> * Print a line break together with other data in a single function call.
>>
>> * Adjust indentation.> 
> This does not apply.
> Possibly depends on 2/3.

Partly, yes.


How do you think about the following possibilities?

* Omit two context lines at the end from this update step.
  or
* Refer to the jump label “done” (instead of renaming it to “unlock” before).


Would you try once more to integrate the shown small change?

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/pinctrl/pinctrl-mcp23s08.c b/drivers/pinctrl/pinctrl-mcp23s08.c
index d1a7c627dbb9..79b585d46289 100644
--- a/drivers/pinctrl/pinctrl-mcp23s08.c
+++ b/drivers/pinctrl/pinctrl-mcp23s08.c
@@ -745,13 +745,12 @@  static void mcp23s08_dbg_show(struct seq_file *s, struct gpio_chip *chip)
 		if (!label)
 			continue;
 
-		seq_printf(s, " gpio-%-3d P%c.%d (%-12s) %s %s %s",
-			chip->base + t, bank, t, label,
-			(iodir & mask) ? "in " : "out",
-			(gpio & mask) ? "hi" : "lo",
-			(gppu & mask) ? "up" : "  ");
+		seq_printf(s, " gpio-%-3d P%c.%d (%-12s) %s %s %s\n",
+			   chip->base + t, bank, t, label,
+			   (iodir & mask) ? "in " : "out",
+			   (gpio & mask) ? "hi" : "lo",
+			   (gppu & mask) ? "up" : "  ");
 		/* NOTE:  ignoring the irq-related registers */
-		seq_puts(s, "\n");
 	}
 unlock:
 	mutex_unlock(&mcp->lock);