mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	dyoung@redhat.com, linux-doc@vger.kernel.org, bhe@redhat.com,
	vgoyal@redhat.com, stern@rowland.harvard.edu,
	akpm@linux-foundation.org, corbet@lwn.net, halves@canonical.com,
	kernel@gpiccoli.net
Subject: Re: [PATCH V2] notifier/panic: Introduce panic_notifier_filter
Date: Fri, 7 Jan 2022 11:39:52 -0300	[thread overview]
Message-ID: <9a6e628e-a6fc-9879-288b-eedc32151234@igalia.com> (raw)
In-Reply-To: <YdgtNvd68kWakErr@smile.fi.intel.com>

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

      reply	other threads:[~2022-01-07 14:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-06 20:00 Guilherme G. Piccoli
2022-01-06 20:25 ` Alan Stern
2022-01-06 21:05   ` Guilherme G. Piccoli
2022-01-07 12:08 ` Andy Shevchenko
2022-01-07 14:39   ` Guilherme G. Piccoli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9a6e628e-a6fc-9879-288b-eedc32151234@igalia.com \
    --to=gpiccoli@igalia.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bhe@redhat.com \
    --cc=corbet@lwn.net \
    --cc=dyoung@redhat.com \
    --cc=halves@canonical.com \
    --cc=kernel@gpiccoli.net \
    --cc=kexec@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®