[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9a6e628e-a6fc-9879-288b-eedc32151234@igalia.com>
Date: Fri, 7 Jan 2022 11:39:52 -0300
From: "Guilherme G. Piccoli" <gpiccoli@...lia.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: kexec@...ts.infradead.org, linux-kernel@...r.kernel.org,
dyoung@...hat.com, linux-doc@...r.kernel.org, bhe@...hat.com,
vgoyal@...hat.com, stern@...land.harvard.edu,
akpm@...ux-foundation.org, corbet@....net, halves@...onical.com,
kernel@...ccoli.net
Subject: Re: [PATCH V2] notifier/panic: Introduce panic_notifier_filter
On 07/01/2022 09:08, Andy Shevchenko wrote:
> [...]
>> + while (buf) {
>> + func = strsep(&buf, ",");
>
> Don't we have a parser of this format already?
> Anyway, you may reduce code by
>
> unsigned long addr;
> char *func = buf;
>
> while ((func = strsep(&func, ",")) {
>
Hi Andy, thanks for the review! Looking the kernel code for some similar
parameters, I couldn't see any better alternative (like a helper) to do
this parsing - checked for example the ftrace parameters (borrowed my
code from there, in fact heh), initcall_blacklist, module_blacklist,
usbcore.quirks, etc.
I'll try to follow your suggestion, to reduce a bit the code...though I
confess the original code reads more clearly for me.
Cheers,
Guilherme
Powered by blists - more mailing lists