lkml.org 
[lkml]   [2022]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V2] notifier/panic: Introduce panic_notifier_filter
From
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

\
 
 \ /
  Last update: 2022-01-07 15:41    [W:0.132 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site