Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1634279 > unrolled thread

[PATCH 3/9] pinctrl: Combine five seq_printf() calls into one call in pinconf_dbg_config_print()

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2017-05-02 11:30 +0200
Last post2017-05-03 19:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/9] pinctrl: Combine five seq_printf() calls into one call in  pinconf_dbg_config_print() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-02 11:30 +0200
    Re: [PATCH 3/9] pinctrl: Combine five seq_printf() calls into one  call in pinconf_dbg_config_print() Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-03 19:50 +0200

#1634279 — [PATCH 3/9] pinctrl: Combine five seq_printf() calls into one call in pinconf_dbg_config_print()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-05-02 11:30 +0200
Subject[PATCH 3/9] pinctrl: Combine five seq_printf() calls into one call in pinconf_dbg_config_print()
Message-ID<tCCi6-4Jn-9@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 1 May 2017 22:52:29 +0200

Some data were put into a sequence by five separate function calls.
Print the same data by a single function call instead.

This issue was detected by using the Coccinelle software.

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

diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c
index a14ae8601b39..d37f98aafb4b 100644
--- a/drivers/pinctrl/pinconf.c
+++ b/drivers/pinctrl/pinconf.c
@@ -441,12 +441,15 @@ static int pinconf_dbg_config_print(struct seq_file *s, void *d)
 	}
 
 	if (!found) {
-		seq_printf(s, "No config found for dev/state/pin, expected:\n");
-		seq_printf(s, "Searched dev:%s\n", dbg->dev_name);
-		seq_printf(s, "Searched state:%s\n", dbg->state_name);
-		seq_printf(s, "Searched pin:%s\n", dbg->pin_name);
-		seq_printf(s, "Use: modify config_pin <devname> "\
-				"<state> <pinname> <value>\n");
+		seq_printf(s,
+			   "No config found for dev/state/pin, expected:\n"
+			   "Searched dev:%s\n"
+			   "Searched state:%s\n"
+			   "Searched pin:%s\n"
+			   "Use: modify config_pin <devname> <state> <pinname> <value>\n",
+			   dbg->dev_name,
+			   dbg->state_name,
+			   dbg->pin_name);
 		goto exit;
 	}
 
-- 
2.12.2

[toc] | [next] | [standalone]


#1635175 — Re: [PATCH 3/9] pinctrl: Combine five seq_printf() calls into one call in pinconf_dbg_config_print()

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2017-05-03 19:50 +0200
SubjectRe: [PATCH 3/9] pinctrl: Combine five seq_printf() calls into one call in pinconf_dbg_config_print()
Message-ID<tD6zw-8vy-13@gated-at.bofh.it>
In reply to#1634279
On Tue, May 2, 2017 at 12:23 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 1 May 2017 22:52:29 +0200
>
> Some data were put into a sequence by five separate function calls.
> Print the same data by a single function call instead.

> -               seq_printf(s, "No config found for dev/state/pin, expected:\n");
> -               seq_printf(s, "Searched dev:%s\n", dbg->dev_name);
> -               seq_printf(s, "Searched state:%s\n", dbg->state_name);
> -               seq_printf(s, "Searched pin:%s\n", dbg->pin_name);
> -               seq_printf(s, "Use: modify config_pin <devname> "\
> -                               "<state> <pinname> <value>\n");
> +               seq_printf(s,
> +                          "No config found for dev/state/pin, expected:\n"
> +                          "Searched dev:%s\n"
> +                          "Searched state:%s\n"
> +                          "Searched pin:%s\n"
> +                          "Use: modify config_pin <devname> <state> <pinname> <value>\n",
> +                          dbg->dev_name,
> +                          dbg->state_name,
> +                          dbg->pin_name);

Please, no.

-- 
With Best Regards,
Andy Shevchenko

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web