Re: [PATCH 5/7] pinctrl: mediatek: paris: Drop extra newline in mtk_pctrl_show_one_pin()

From: AngeloGioacchino Del Regno
Date: Tue Jan 11 2022 - 08:42:28 EST


Il 11/01/22 12:22, Chen-Yu Tsai ha scritto:
The caller of mtk_pctrl_show_one_pin() is responsible for printing the
full line. mtk_pctrl_show_one_pin(), called through mtk_pctrl_dbg_show(),
should only produce a string containing the extra information the driver
wants included.

Drop the extra newlines.

Fixes: 184d8e13f9b1 ("pinctrl: mediatek: Add support for pin configuration dump via debugfs.")
Fixes: fb34a9ae383a ("pinctrl: mediatek: support rsel feature")
Signed-off-by: Chen-Yu Tsai <wenst@xxxxxxxxxxxx>
---
drivers/pinctrl/mediatek/pinctrl-paris.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c
index d259f075c62d..1bacabfbc183 100644
--- a/drivers/pinctrl/mediatek/pinctrl-paris.c
+++ b/drivers/pinctrl/mediatek/pinctrl-paris.c
@@ -639,12 +639,10 @@ ssize_t mtk_pctrl_show_one_pin(struct mtk_pinctrl *hw,
pullup);
if (r1 != -1) {
- len += scnprintf(buf + len, buf_len - len, " (%1d %1d)\n",
+ len += scnprintf(buf + len, buf_len - len, " (%1d %1d)",
r1, r0);

Since you're doing also some nice cleanups, would you mind un-breaking the line
above? That'd be 82 columns, which is fine to have.

In any case:


Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>

} else if (rsel != -1) {
- len += scnprintf(buf + len, buf_len - len, " (%1d)\n", rsel);
- } else {
- len += scnprintf(buf + len, buf_len - len, "\n");
+ len += scnprintf(buf + len, buf_len - len, " (%1d)", rsel);
}
return len;