[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d14443fd-96ee-4d94-a149-d81990f64de6@fujitsu.com>
Date: Mon, 22 Jan 2024 03:29:01 +0000
From: "Zhijian Li (Fujitsu)" <lizhijian@...itsu.com>
To: Julia Lawall <julia.lawall@...ia.fr>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Nicolas
Palix <nicolas.palix@...g.fr>, "cocci@...ia.fr" <cocci@...ia.fr>
Subject: Re: [PATCH v2] coccinelle: device_attr_show: Adapt to the latest
Documentation/filesystems/sysfs.rst
On 21/01/2024 05:20, Julia Lawall wrote:
>> V2:
>> - changed title from coccinelle: device_attr_show.cocci: update description and warning message
>> - Fix MODE=patch
>> - Extract patch from the patch set[1] so that maintainer can accept it separately.
> Applied.
>
> I subsequently simplified the patch case to contain the following:
>
> - snprintf(BUF, SZ, FORMAT
> + sysfs_emit(BUF, FORMAT
> ,...);
Great, that was what i want. But i didn't get the correct syntax. I wrote it wrongly:
- snprintf(BUF, SZ, FORMAT, ...);
+ sysfs_emit(BUF, SZ, 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.
Powered by blists - more mailing lists