All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Maennich <maennich@google.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Coccinelle <cocci@systeme.lip6.fr>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jessica Yu <jeyu@kernel.org>
Subject: Re: [Cocci] Warning message from 'make nsdeps' when namespace is lower cases
Date: Tue, 29 Oct 2019 14:37:22 +0000	[thread overview]
Message-ID: <20191029143722.GB33177@google.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1910291437450.2179@hadrien>

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

WARNING: multiple messages have this Message-ID (diff)
From: Matthias Maennich <maennich@google.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Jessica Yu <jeyu@kernel.org>, Coccinelle <cocci@systeme.lip6.fr>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Warning message from 'make nsdeps' when namespace is lower cases
Date: Tue, 29 Oct 2019 14:37:22 +0000	[thread overview]
Message-ID: <20191029143722.GB33177@google.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1910291437450.2179@hadrien>

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
>>

  reply	other threads:[~2019-10-29 14:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29 13:12 [Cocci] Warning message from 'make nsdeps' when namespace is lower cases Masahiro Yamada
2019-10-29 13:12 ` Masahiro Yamada
2019-10-29 13:38 ` [Cocci] " Julia Lawall
2019-10-29 13:38   ` Julia Lawall
2019-10-29 14:37   ` Matthias Maennich [this message]
2019-10-29 14:37     ` Matthias Maennich
2019-10-29 14:45     ` [Cocci] " Julia Lawall
2019-10-29 14:45       ` Julia Lawall

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=20191029143722.GB33177@google.com \
    --to=maennich@google.com \
    --cc=cocci@systeme.lip6.fr \
    --cc=jeyu@kernel.org \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.