Re: [PATCH V2] notifier/panic: Introduce panic_notifier_filter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux