* [PATCH] tty:hvc:Fix incorrect formatted output
@ 2024-11-07 5:47 liujing
2024-11-07 7:10 ` Jiri Slaby
0 siblings, 1 reply; 6+ messages in thread
From: liujing @ 2024-11-07 5:47 UTC (permalink / raw)
To: mpe
Cc: npiggin, christophe.leroy, naveen, maddy, gregkh, jirislaby,
linuxppc-dev, linux-kernel, linux-serial, liujing
The termno parameter is defined as an unsigned int
in hvc_opal_probe function,So when it output should
be modified to %u format.
Signed-off-by: liujing <liujing@cmss.chinamobile.com>
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);
return -ENXIO;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] tty:hvc:Fix incorrect formatted output
2024-11-07 5:47 [PATCH] tty:hvc:Fix incorrect formatted output liujing
@ 2024-11-07 7:10 ` Jiri Slaby
2024-11-07 7:11 ` Jiri Slaby
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2024-11-07 7:10 UTC (permalink / raw)
To: liujing, mpe
Cc: npiggin, christophe.leroy, naveen, maddy, gregkh, linuxppc-dev,
linux-kernel, linux-serial
On 07. 11. 24, 6:47, liujing wrote:
> 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.
> Signed-off-by: liujing <liujing@cmss.chinamobile.com>
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] tty:hvc:Fix incorrect formatted output
2024-11-07 7:10 ` Jiri Slaby
@ 2024-11-07 7:11 ` Jiri Slaby
0 siblings, 0 replies; 6+ messages in thread
From: Jiri Slaby @ 2024-11-07 7:11 UTC (permalink / raw)
To: liujing, mpe
Cc: npiggin, christophe.leroy, naveen, maddy, gregkh, linuxppc-dev,
linux-kernel, linux-serial
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:
>> 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.
>
>> Signed-off-by: liujing <liujing@cmss.chinamobile.com>
>>
>> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] tty: hvc: Fix incorrect formatted output
@ 2024-11-07 7:33 liujing
2024-11-07 7:47 ` Jiri Slaby
0 siblings, 1 reply; 6+ messages in thread
From: liujing @ 2024-11-07 7:33 UTC (permalink / raw)
To: mpe
Cc: npiggin, christophe.leroy, naveen, maddy, gregkh, jirislaby,
linuxppc-dev, linux-kernel, linux-serial, liujing
The termno parameter is defined as an unsigned int
in hvc_opal_probe(), So the output format should be %u instead of %d.
Signed-off-by: liujing <liujing@cmss.chinamobile.com>
---
v1 -> V2: Modified the description of commit.
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);
return -ENXIO;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] tty: hvc: Fix incorrect formatted output
2024-11-07 7:33 [PATCH] tty: hvc: Fix " liujing
@ 2024-11-07 7:47 ` Jiri Slaby
2024-11-07 7:47 ` Jiri Slaby
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2024-11-07 7:47 UTC (permalink / raw)
To: liujing, mpe
Cc: npiggin, christophe.leroy, naveen, maddy, gregkh, linuxppc-dev,
linux-kernel, linux-serial
On 07. 11. 24, 8:33, liujing wrote:
> The termno parameter is defined as an unsigned int
> in hvc_opal_probe(), So the output format should be %u instead of %d.
>
> Signed-off-by: liujing <liujing@cmss.chinamobile.com>
>
> ---
> v1 -> V2: Modified the description of commit.
>
> 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",
Please re-read my _whole_ previous e-mail.
--
js
suse labs
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] tty: hvc: Fix incorrect formatted output
2024-11-07 7:47 ` Jiri Slaby
@ 2024-11-07 7:47 ` Jiri Slaby
0 siblings, 0 replies; 6+ messages in thread
From: Jiri Slaby @ 2024-11-07 7:47 UTC (permalink / raw)
To: liujing, mpe
Cc: npiggin, christophe.leroy, naveen, maddy, gregkh, linuxppc-dev,
linux-kernel, linux-serial
On 07. 11. 24, 8:47, Jiri Slaby wrote:
> On 07. 11. 24, 8:33, liujing wrote:
>> The termno parameter is defined as an unsigned int
>> in hvc_opal_probe(), So the output format should be %u instead of %d.
>>
>> Signed-off-by: liujing <liujing@cmss.chinamobile.com>
>>
>> ---
>> v1 -> V2: Modified the description of commit.
Yet, this is a v2, but the subject does not say so.
--
js
suse labs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-11-07 7:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-07 5:47 [PATCH] tty:hvc:Fix incorrect formatted output liujing
2024-11-07 7:10 ` Jiri Slaby
2024-11-07 7:11 ` Jiri Slaby
-- strict thread matches above, loose matches on Subject: below --
2024-11-07 7:33 [PATCH] tty: hvc: Fix " liujing
2024-11-07 7:47 ` Jiri Slaby
2024-11-07 7:47 ` Jiri Slaby
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).