mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Li Zhijian <lizhijian@fujitsu.com>,
	Julia Lawall <julia.lawall@inria.fr>,
	cocci@inria.fr
Cc: 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 11:40:41 +0100	[thread overview]
Message-ID: <f34231dc-186b-4cb9-889b-b3be9224c5a9@web.de> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2401202217550.3267@hadrien>

> 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,
          ...
         );

Regards,
Markus

  reply	other threads:[~2024-01-21 10:54 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   ` Markus Elfring [this message]
2024-01-21 11:00     ` [cocci] [v2] " Julia Lawall
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=f34231dc-186b-4cb9-889b-b3be9224c5a9@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@inria.fr \
    --cc=julia.lawall@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®