* [Cocci] Warning message from 'make nsdeps' when namespace is lower cases
@ 2019-10-29 13:12 Masahiro Yamada
2019-10-29 13:38 ` Julia Lawall
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2019-10-29 13:12 UTC (permalink / raw)
To: Matthias Maennich, Jessica Yu, Julia Lawall
Cc: Coccinelle, Linux Kernel Mailing List
Hi.
When I was playing with 'make nsdeps',
I saw a new warning.
If I rename USB_STORAGE to usb_storage,
I see 'warning: line 15: should usb_storage be a metavariable?'
Why? I think it comes from spatch.
It should be technically OK to use either upper or lower cases
for the namespace name.
Just apply the following, and try 'make nsdeps'.
diff --git a/drivers/usb/storage/Makefile b/drivers/usb/storage/Makefile
index 46635fa4a340..6f817d65c26b 100644
--- a/drivers/usb/storage/Makefile
+++ b/drivers/usb/storage/Makefile
@@ -8,7 +8,7 @@
ccflags-y := -I $(srctree)/drivers/scsi
-ccflags-y += -DDEFAULT_SYMBOL_NAMESPACE=USB_STORAGE
+ccflags-y += -DDEFAULT_SYMBOL_NAMESPACE=usb_storage
obj-$(CONFIG_USB_UAS) += uas.o
obj-$(CONFIG_USB_STORAGE) += usb-storage.o
--
Best Regards
Masahiro Yamada
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Cocci] Warning message from 'make nsdeps' when namespace is lower cases
2019-10-29 13:12 [Cocci] Warning message from 'make nsdeps' when namespace is lower cases Masahiro Yamada
@ 2019-10-29 13:38 ` Julia Lawall
2019-10-29 14:37 ` Matthias Maennich
0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2019-10-29 13:38 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Linux Kernel Mailing List, Matthias Maennich, Coccinelle, Jessica Yu
On Tue, 29 Oct 2019, Masahiro Yamada wrote:
> Hi.
>
> When I was playing with 'make nsdeps',
> I saw a new warning.
>
> If I rename USB_STORAGE to usb_storage,
> I see 'warning: line 15: should usb_storage be a metavariable?'
> Why? I think it comes from spatch.
Yes, it would come from spatch.
> It should be technically OK to use either upper or lower cases
> for the namespace name.
What is normally wanted? Uppercase or lowercase?
julia
>
> Just apply the following, and try 'make nsdeps'.
>
>
> diff --git a/drivers/usb/storage/Makefile b/drivers/usb/storage/Makefile
> index 46635fa4a340..6f817d65c26b 100644
> --- a/drivers/usb/storage/Makefile
> +++ b/drivers/usb/storage/Makefile
> @@ -8,7 +8,7 @@
>
> ccflags-y := -I $(srctree)/drivers/scsi
>
> -ccflags-y += -DDEFAULT_SYMBOL_NAMESPACE=USB_STORAGE
> +ccflags-y += -DDEFAULT_SYMBOL_NAMESPACE=usb_storage
>
> obj-$(CONFIG_USB_UAS) += uas.o
> obj-$(CONFIG_USB_STORAGE) += usb-storage.o
>
>
>
>
>
>
>
>
>
>
> --
> Best Regards
> Masahiro Yamada
>
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Cocci] Warning message from 'make nsdeps' when namespace is lower cases
2019-10-29 13:38 ` Julia Lawall
@ 2019-10-29 14:37 ` Matthias Maennich
2019-10-29 14:45 ` Julia Lawall
0 siblings, 1 reply; 4+ messages in thread
From: Matthias Maennich @ 2019-10-29 14:37 UTC (permalink / raw)
To: Julia Lawall; +Cc: Coccinelle, Linux Kernel Mailing List, Jessica Yu
Hi!
On Tue, Oct 29, 2019 at 02:38:36PM +0100, Julia Lawall wrote:
>
>
>On Tue, 29 Oct 2019, Masahiro Yamada wrote:
>
>> Hi.
>>
>> When I was playing with 'make nsdeps',
>> I saw a new warning.
>>
>> If I rename USB_STORAGE to usb_storage,
>> I see 'warning: line 15: should usb_storage be a metavariable?'
>> Why? I think it comes from spatch.
>
>Yes, it would come from spatch.
>
>> It should be technically OK to use either upper or lower cases
>> for the namespace name.
>
>What is normally wanted? Uppercase or lowercase?
There is no (documented) preference or convention yet. The existing
namespaces (USB_STORAGE and MCB) use upper case. While technically both
should work, I have a personal preference for consistently using upper
case. Is there a way to suppress this warning as I agree that it might
be confusing?
Cheers,
Matthias
>
>julia
>
>>
>> Just apply the following, and try 'make nsdeps'.
>>
>>
>> diff --git a/drivers/usb/storage/Makefile b/drivers/usb/storage/Makefile
>> index 46635fa4a340..6f817d65c26b 100644
>> --- a/drivers/usb/storage/Makefile
>> +++ b/drivers/usb/storage/Makefile
>> @@ -8,7 +8,7 @@
>>
>> ccflags-y := -I $(srctree)/drivers/scsi
>>
>> -ccflags-y += -DDEFAULT_SYMBOL_NAMESPACE=USB_STORAGE
>> +ccflags-y += -DDEFAULT_SYMBOL_NAMESPACE=usb_storage
>>
>> obj-$(CONFIG_USB_UAS) += uas.o
>> obj-$(CONFIG_USB_STORAGE) += usb-storage.o
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> Best Regards
>> Masahiro Yamada
>>
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Cocci] Warning message from 'make nsdeps' when namespace is lower cases
2019-10-29 14:37 ` Matthias Maennich
@ 2019-10-29 14:45 ` Julia Lawall
0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2019-10-29 14:45 UTC (permalink / raw)
To: Matthias Maennich; +Cc: Coccinelle, Linux Kernel Mailing List, Jessica Yu
On Tue, 29 Oct 2019, Matthias Maennich wrote:
> Hi!
>
> On Tue, Oct 29, 2019 at 02:38:36PM +0100, Julia Lawall wrote:
> >
> >
> > On Tue, 29 Oct 2019, Masahiro Yamada wrote:
> >
> > > Hi.
> > >
> > > When I was playing with 'make nsdeps',
> > > I saw a new warning.
> > >
> > > If I rename USB_STORAGE to usb_storage,
> > > I see 'warning: line 15: should usb_storage be a metavariable?'
> > > Why? I think it comes from spatch.
> >
> > Yes, it would come from spatch.
> >
> > > It should be technically OK to use either upper or lower cases
> > > for the namespace name.
> >
> > What is normally wanted? Uppercase or lowercase?
>
> There is no (documented) preference or convention yet. The existing
> namespaces (USB_STORAGE and MCB) use upper case. While technically both
> should work, I have a personal preference for consistently using upper
> case. Is there a way to suppress this warning as I agree that it might
> be confusing?
The warning is not intentional in this case. I will have to fix
Coccinelle, but I can't do it until next week.
julia
>
> Cheers,
> Matthias
>
> >
> > julia
> >
> > >
> > > Just apply the following, and try 'make nsdeps'.
> > >
> > >
> > > diff --git a/drivers/usb/storage/Makefile b/drivers/usb/storage/Makefile
> > > index 46635fa4a340..6f817d65c26b 100644
> > > --- a/drivers/usb/storage/Makefile
> > > +++ b/drivers/usb/storage/Makefile
> > > @@ -8,7 +8,7 @@
> > >
> > > ccflags-y := -I $(srctree)/drivers/scsi
> > >
> > > -ccflags-y += -DDEFAULT_SYMBOL_NAMESPACE=USB_STORAGE
> > > +ccflags-y += -DDEFAULT_SYMBOL_NAMESPACE=usb_storage
> > >
> > > obj-$(CONFIG_USB_UAS) += uas.o
> > > obj-$(CONFIG_USB_STORAGE) += usb-storage.o
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Best Regards
> > > Masahiro Yamada
> > >
>
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-29 14:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29 13:12 [Cocci] Warning message from 'make nsdeps' when namespace is lower cases Masahiro Yamada
2019-10-29 13:38 ` Julia Lawall
2019-10-29 14:37 ` Matthias Maennich
2019-10-29 14:45 ` Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).