Re: [PATCH] tty:hvc:Fix incorrect formatted output

From
Jiri Slaby <jirislaby@kernel.org>
Date
2024-11-07 07:11:31
Also in
linux-serial, lkml
Reply to
Jiri Slaby, 2024-11-07
Also please fix the subject. See:
git log --oneline drivers/tty/hvc/hvc_opal.c

On 07. 11. 24, 8:10, Jiri Slaby wrote:
On 07. 11. 24, 6:47, liujing wrote:
quoted
The termno parameter is defined as an unsigned int
in hvc_opal_probe function,
"The termno parameter is defined as an unsigned int in hvc_opal_probe()."

We place () after function names, then "function" is not needed.

 > So when it output should be modified to %u format.

I cannot parse this. Perhaps:
"So when it is output, a %u specifier should be used for formatting."
? But feel free to use your own words, but somehow spell (or chatgpt) check it.
quoted
Signed-off-by: liujing <redacted>
diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c
index 095c33ad10f8..1d2e7f2ce088 100644
--- a/drivers/tty/hvc/hvc_opal.c
+++ b/drivers/tty/hvc/hvc_opal.c
@@ -199,7 +199,7 @@ static int hvc_opal_probe(struct platform_device *dev)
          /* Instanciate now to establish a mapping index==vtermno */
          hvc_instantiate(termno, termno, ops);
      } else {
-        pr_err("hvc_opal: Device %pOF has duplicate terminal number #%d\n",
+        pr_err("hvc_opal: Device %pOF has duplicate terminal number #%u\n",
                 dev->dev.of_node, termno);
There are more occurrences of this. Care to fix them all?

thanks,
-- 
js
suse labs

Thread (3 messages) 3 messages, 2 authors, last reply 2024-11-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help