linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] workqueue: format pr_warn exceeds line length in wq_numa_init
@ 2023-06-16  7:00 tiozhang
  2023-06-18  1:19 ` Lai Jiangshan
  0 siblings, 1 reply; 4+ messages in thread
From: tiozhang @ 2023-06-16  7:00 UTC (permalink / raw)
  To: tj, jiangshanlai; +Cc: linux-kernel, tiozhang, zyhtheonly, zyhtheonly

Format this long line which would potentially let checkpatch complain
"WARNING: line length of 103 exceeds 100 columns".

Signed-off-by: tiozhang <tiozhang@didiglobal.com>
---
 kernel/workqueue.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 47e7b29df5fe..4375c7190353 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5959,7 +5959,8 @@ static void __init wq_numa_init(void)
 
 	for_each_possible_cpu(cpu) {
 		if (WARN_ON(cpu_to_node(cpu) == NUMA_NO_NODE)) {
-			pr_warn("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n", cpu);
+			pr_warn("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n",
+				cpu);
 			return;
 		}
 	}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] workqueue: format pr_warn exceeds line length in wq_numa_init
  2023-06-16  7:00 [PATCH] workqueue: format pr_warn exceeds line length in wq_numa_init tiozhang
@ 2023-06-18  1:19 ` Lai Jiangshan
  2023-06-18 14:54   ` Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: Lai Jiangshan @ 2023-06-18  1:19 UTC (permalink / raw)
  To: tj, jiangshanlai, linux-kernel, zyhtheonly, zyhtheonly; +Cc: tiozhang

On Fri, Jun 16, 2023 at 3:00 PM tiozhang <tiozhang@didiglobal.com> wrote:
>
> Format this long line which would potentially let checkpatch complain
> "WARNING: line length of 103 exceeds 100 columns".

Hello

This patch hurts the readability actually. A few extra characters exceeding
is Okay for me.

Thanks
Lai

>
> Signed-off-by: tiozhang <tiozhang@didiglobal.com>
> ---
>  kernel/workqueue.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index 47e7b29df5fe..4375c7190353 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -5959,7 +5959,8 @@ static void __init wq_numa_init(void)
>
>         for_each_possible_cpu(cpu) {
>                 if (WARN_ON(cpu_to_node(cpu) == NUMA_NO_NODE)) {
> -                       pr_warn("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n", cpu);
> +                       pr_warn("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n",
> +                               cpu);
>                         return;
>                 }
>         }
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] workqueue: format pr_warn exceeds line length in wq_numa_init
  2023-06-18  1:19 ` Lai Jiangshan
@ 2023-06-18 14:54   ` Joe Perches
  2023-06-20  9:56     ` 张元瀚 Tio Zhang
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2023-06-18 14:54 UTC (permalink / raw)
  To: Lai Jiangshan, tj, linux-kernel, zyhtheonly, zyhtheonly; +Cc: tiozhang

On Sun, 2023-06-18 at 09:19 +0800, Lai Jiangshan wrote:
> On Fri, Jun 16, 2023 at 3:00 PM tiozhang <tiozhang@didiglobal.com> wrote:
> > 
> > Format this long line which would potentially let checkpatch complain
> > "WARNING: line length of 103 exceeds 100 columns".
[]
> This patch hurts the readability actually. A few extra characters exceeding
> is Okay for me.
[]
> > diff --git a/kernel/workqueue.c b/kernel/workqueue.c
[]
> > @@ -5959,7 +5959,8 @@ static void __init wq_numa_init(void)
> > 
> >         for_each_possible_cpu(cpu) {
> >                 if (WARN_ON(cpu_to_node(cpu) == NUMA_NO_NODE)) {
> > -                       pr_warn("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n", cpu);
> > +                       pr_warn("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n",
> > +                               cpu);

What _might_ work reasonably well is to add

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

before any include and remove "workqueue: " from
all pr_<foo> uses.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] workqueue: format pr_warn exceeds line length in wq_numa_init
  2023-06-18 14:54   ` Joe Perches
@ 2023-06-20  9:56     ` 张元瀚 Tio Zhang
  0 siblings, 0 replies; 4+ messages in thread
From: 张元瀚 Tio Zhang @ 2023-06-20  9:56 UTC (permalink / raw)
  To: Joe Perches, Lai Jiangshan, tj, linux-kernel, zyhtheonly, zyhtheonly

Hi Joe, 

Thanks for your advice.

IMHO, in workqueue, some prints start with "workqueue %s:" which means the workqueue_struct, not the workqueue module. Since we could not remove those, starting with "workqueue: workqueue %s" might be confusing sometimes I guess.

So maybe
#define pr_fmt(fmt) "WORKQUEUE: " fmt 
might work?



在 2023/6/19 10:41,“Joe Perches”<joe@perches.com <mailto:joe@perches.com> <mailto:joe@perches.com <mailto:joe@perches.com>>> 写入:




On Sun, 2023-06-18 at 09:19 +0800, Lai Jiangshan wrote:
> On Fri, Jun 16, 2023 at 3:00 PM tiozhang <tiozhang@didiglobal.com <mailto:tiozhang@didiglobal.com> <mailto:tiozhang@didiglobal.com <mailto:tiozhang@didiglobal.com>>> wrote:
> > 
> > Format this long line which would potentially let checkpatch complain
> > "WARNING: line length of 103 exceeds 100 columns".
[]
> This patch hurts the readability actually. A few extra characters exceeding
> is Okay for me.
[]
> > diff --git a/kernel/workqueue.c b/kernel/workqueue.c
[]
> > @@ -5959,7 +5959,8 @@ static void __init wq_numa_init(void)
> > 
> > for_each_possible_cpu(cpu) {
> > if (WARN_ON(cpu_to_node(cpu) == NUMA_NO_NODE)) {
> > - pr_warn("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n", cpu);
> > + pr_warn("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n",
> > + cpu);




What _might_ work reasonably well is to add




#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt




before any include and remove "workqueue: " from
all pr_<foo> uses.












^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-20 10:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-16  7:00 [PATCH] workqueue: format pr_warn exceeds line length in wq_numa_init tiozhang
2023-06-18  1:19 ` Lai Jiangshan
2023-06-18 14:54   ` Joe Perches
2023-06-20  9:56     ` 张元瀚 Tio Zhang

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).