mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] coccinelle: device_attr_show: Remove useless expression STR
@ 2024-01-22  3:28 Li Zhijian
  2024-01-22  6:33 ` Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Li Zhijian @ 2024-01-22  3:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: Li Zhijian, Julia Lawall, Nicolas Palix, cocci

Commit ff82e84e80fc ("coccinelle: device_attr_show: simplify patch case")
simplifies the patch case, as a result, STR is no longer needed.

CC: Julia Lawall <Julia.Lawall@inria.fr>
CC: Nicolas Palix <nicolas.palix@imag.fr>
CC: cocci@inria.fr
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
---
 scripts/coccinelle/api/device_attr_show.cocci | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/coccinelle/api/device_attr_show.cocci b/scripts/coccinelle/api/device_attr_show.cocci
index 550d1d2fc02a..dfcf9304195f 100644
--- a/scripts/coccinelle/api/device_attr_show.cocci
+++ b/scripts/coccinelle/api/device_attr_show.cocci
@@ -28,7 +28,7 @@ ssize_t show(struct device *dev, struct device_attribute *attr, char *buf)
 
 @rp depends on patch@
 identifier show, dev, attr, buf;
-expression BUF, SZ, FORMAT, STR;
+expression BUF, SZ, FORMAT;
 @@
 
 ssize_t show(struct device *dev, struct device_attribute *attr, char *buf)
-- 
2.29.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] coccinelle: device_attr_show: Remove useless expression STR
  2024-01-22  3:28 [PATCH] coccinelle: device_attr_show: Remove useless expression STR Li Zhijian
@ 2024-01-22  6:33 ` Julia Lawall
  2024-02-18  1:53   ` Zhijian Li (Fujitsu)
  0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2024-01-22  6:33 UTC (permalink / raw)
  To: Li Zhijian; +Cc: linux-kernel, Nicolas Palix, cocci



On Mon, 22 Jan 2024, Li Zhijian wrote:

> Commit ff82e84e80fc ("coccinelle: device_attr_show: simplify patch case")
> simplifies the patch case, as a result, STR is no longer needed.

Oops, yeah...

thanks,
julia

>
> CC: Julia Lawall <Julia.Lawall@inria.fr>
> CC: Nicolas Palix <nicolas.palix@imag.fr>
> CC: cocci@inria.fr
> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
> ---
>  scripts/coccinelle/api/device_attr_show.cocci | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/coccinelle/api/device_attr_show.cocci b/scripts/coccinelle/api/device_attr_show.cocci
> index 550d1d2fc02a..dfcf9304195f 100644
> --- a/scripts/coccinelle/api/device_attr_show.cocci
> +++ b/scripts/coccinelle/api/device_attr_show.cocci
> @@ -28,7 +28,7 @@ ssize_t show(struct device *dev, struct device_attribute *attr, char *buf)
>
>  @rp depends on patch@
>  identifier show, dev, attr, buf;
> -expression BUF, SZ, FORMAT, STR;
> +expression BUF, SZ, FORMAT;
>  @@
>
>  ssize_t show(struct device *dev, struct device_attribute *attr, char *buf)
> --
> 2.29.2
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] coccinelle: device_attr_show: Remove useless expression STR
  2024-01-22  6:33 ` Julia Lawall
@ 2024-02-18  1:53   ` Zhijian Li (Fujitsu)
  0 siblings, 0 replies; 3+ messages in thread
From: Zhijian Li (Fujitsu) @ 2024-02-18  1:53 UTC (permalink / raw)
  To: Julia Lawall; +Cc: linux-kernel, Nicolas Palix, cocci

Julia,

I would like to gently remind that we should consider applying this patch to v6.8
because it also helps to fix the newly introduced coccicheck warning in v6.8-rc1

> /usr/bin/spatch -D patch --very-quiet --cocci-file scripts/coccinelle/api/device_attr_show.cocci --no-includes --include-headers --patch . --dir arch/x86/events/intel -I ./arch/x86/include -I ./arch/x86/include/generated -I ./inclu
de -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi --include ./include/linux/compiler-version.h --include ./include/linux/kconfig.h --jobs 4 --chunksize 1
warning: rp: metavariable STR not used in the - or context code  <<< new warning
6 files match

Thanks
Zhijian


On 22/01/2024 14:33, Julia Lawall wrote:
> 
> 
> On Mon, 22 Jan 2024, Li Zhijian wrote:
> 
>> Commit ff82e84e80fc ("coccinelle: device_attr_show: simplify patch case")
>> simplifies the patch case, as a result, STR is no longer needed.
> 
> Oops, yeah...
> 
> thanks,
> julia
> 
>>
>> CC: Julia Lawall <Julia.Lawall@inria.fr>
>> CC: Nicolas Palix <nicolas.palix@imag.fr>
>> CC: cocci@inria.fr
>> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
>> ---
>>   scripts/coccinelle/api/device_attr_show.cocci | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/coccinelle/api/device_attr_show.cocci b/scripts/coccinelle/api/device_attr_show.cocci
>> index 550d1d2fc02a..dfcf9304195f 100644
>> --- a/scripts/coccinelle/api/device_attr_show.cocci
>> +++ b/scripts/coccinelle/api/device_attr_show.cocci
>> @@ -28,7 +28,7 @@ ssize_t show(struct device *dev, struct device_attribute *attr, char *buf)
>>
>>   @rp depends on patch@
>>   identifier show, dev, attr, buf;
>> -expression BUF, SZ, FORMAT, STR;
>> +expression BUF, SZ, FORMAT;
>>   @@
>>
>>   ssize_t show(struct device *dev, struct device_attribute *attr, char *buf)
>> --
>> 2.29.2
>>
>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-18  1:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-22  3:28 [PATCH] coccinelle: device_attr_show: Remove useless expression STR Li Zhijian
2024-01-22  6:33 ` Julia Lawall
2024-02-18  1:53   ` Zhijian Li (Fujitsu)

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®