[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <B84468F3-390F-4B0C-AD8C-5541E6891842@didiglobal.com>
Date: Tue, 20 Jun 2023 09:56:19 +0000
From: 张元瀚 Tio Zhang <tiozhang@...iglobal.com>
To: Joe Perches <joe@...ches.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
"tj@...nel.org" <tj@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"zyhtheonly@...il.com" <zyhtheonly@...il.com>,
"zyhtheonly@...h.net" <zyhtheonly@...h.net>
Subject: Re: [PATCH] workqueue: format pr_warn exceeds line length in
wq_numa_init
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@...ches.com <mailto:joe@...ches.com> <mailto:joe@...ches.com <mailto:joe@...ches.com>>> 写入:
On Sun, 2023-06-18 at 09:19 +0800, Lai Jiangshan wrote:
> On Fri, Jun 16, 2023 at 3:00 PM tiozhang <tiozhang@...iglobal.com <mailto:tiozhang@...iglobal.com> <mailto:tiozhang@...iglobal.com <mailto:tiozhang@...iglobal.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.
Powered by blists - more mailing lists