workqueue: format pr_warn exceeds line length in wq_numa_init
PATCH 1/1 workqueue: format pr_warn exceeds line length in wq_numa_init
Format this long line which would potentially let checkpatch complain "WARNING: line length of 103 exceeds 100 columns".
--- kernel/workqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/workqueue.c +2 -1
@@ -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 ; } }
Signature · 1 line
2.17.1
Lai Jiangshan
reviewerQuoted 3 lines · tiozhang
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
Quoted 23 lines
Signed-off-by tiozhang <[email protected]>--- kernel/workqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)kernel/workqueue.c +2
-2@@ -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
Quoted 4 lines · Lai Jiangshan
Quoted 3 lines · tiozhang
Format this long line which would potentially let checkpatch complain "WARNING: line length of 103 exceeds 100 columns".
[]
Quoted 2 lines
This patch hurts the readability actually. A few extra characters exceeding is Okay for me.
[]
Quoted 1 line
kernel/workqueue.c
Quoted 1 line
kernel/workqueue.c +0
-0
[]
Quoted 7 lines
kernel/workqueue.c static void __init wq_numa_init(void) · line 5963
Quoted 7 lines
kernel/workqueue.c +2
-1@@ -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.
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”<[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> 写入:
Quoted 4 lines · Lai Jiangshan
Quoted 3 lines · On Fri, Jun 16, 2023 at 3:00 PM tiozhang <[email protected]…
Format this long line which would potentially let checkpatch complain "WARNING: line length of 103 exceeds 100 columns".
[]
Quoted 2 lines
This patch hurts the readability actually. A few extra characters exceeding is Okay for me.
[]
Quoted 1 line
kernel/workqueue.c
Quoted 1 line
kernel/workqueue.c +0
-0
[]
Quoted 7 lines
kernel/workqueue.c static void __init wq_numa_init(void) · line 5963
Quoted 7 lines
kernel/workqueue.c +2
-1@@ -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.