mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Li Zhijian <lizhijian@fujitsu.com>,
	cocci@inria.fr,  LKML <linux-kernel@vger.kernel.org>,
	Nicolas Palix <nicolas.palix@imag.fr>
Subject: Re: [cocci] [v2] coccinelle: device_attr_show: Adapt to the latest Documentation/filesystems/sysfs.rst
Date: Sun, 21 Jan 2024 12:00:00 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2401211159350.3743@hadrien> (raw)
In-Reply-To: <f34231dc-186b-4cb9-889b-b3be9224c5a9@web.de>



On Sun, 21 Jan 2024, Markus Elfring wrote:

> > I subsequently simplified the patch case to contain the following:
> >
> > -              snprintf(BUF, SZ, FORMAT
> > +              sysfs_emit(BUF, FORMAT
> >                                ,...);
> >
> > This also works for the case where there are only three arguments.
> > It has the benefit that the change is recognized as a line replacement, so
> > no extra {} are added when the call is in an if branch.
>
> Would you like to consider the application of the following SmPL code variant?
>
> -snprintf
> +sysfs_emit
>          (BUF,
> -         SZ,
>           FORMAT,
>           ...
>          );

It's ok too.

julia

>
> Regards,
> Markus
>

  reply	other threads:[~2024-01-21 11:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19  6:20 [PATCH v2] " Li Zhijian
2024-01-20 21:20 ` Julia Lawall
2024-01-21 10:40   ` [cocci] [v2] " Markus Elfring
2024-01-21 11:00     ` Julia Lawall [this message]
2024-01-21 11:04       ` Markus Elfring
2024-01-21 11:21         ` Julia Lawall
2024-01-21 12:03           ` Markus Elfring
2024-01-22  9:16           ` Markus Elfring
2024-01-22  3:29   ` [PATCH v2] " Zhijian Li (Fujitsu)

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=alpine.DEB.2.22.394.2401211159350.3743@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@inria.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizhijian@fujitsu.com \
    --cc=nicolas.palix@imag.fr \
    /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®