2018-10-29 20:12:14

by Sam Protsenko

[permalink] [raw]
Subject: [PATCH v2] kernel/SRCU: Fix ctags

ctags indexing ("make tags" command) throws this warning:

ctags: Warning: include/linux/notifier.h:125:
null expansion of name pattern "\1"

This is the result of DEFINE_PER_CPU() macro exapansion. Fix that by
getting rid of line break.

Similar fix was already done in commit 25528213fe9f ("tags: Fix
DEFINE_PER_CPU expansions"), but this one probably wasn't noticed.

Signed-off-by: Sam Protsenko <[email protected]>
---
include/linux/notifier.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index f35c7bf76143..0096a05395e3 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -122,8 +122,7 @@ extern void srcu_init_notifier_head(struct srcu_notifier_head *nh);

#ifdef CONFIG_TREE_SRCU
#define _SRCU_NOTIFIER_HEAD(name, mod) \
- static DEFINE_PER_CPU(struct srcu_data, \
- name##_head_srcu_data); \
+ static DEFINE_PER_CPU(struct srcu_data, name##_head_srcu_data); \
mod struct srcu_notifier_head name = \
SRCU_NOTIFIER_INIT(name, name##_head_srcu_data)

--
2.19.1



2018-10-29 20:12:28

by Sam Protsenko

[permalink] [raw]
Subject: Re: [PATCH v2] kernel/SRCU: Fix ctags

Hi Greg,

On Mon, Oct 29, 2018 at 10:09 PM, Sam Protsenko
<[email protected]> wrote:
> ctags indexing ("make tags" command) throws this warning:
>
> ctags: Warning: include/linux/notifier.h:125:
> null expansion of name pattern "\1"
>
> This is the result of DEFINE_PER_CPU() macro exapansion. Fix that by
> getting rid of line break.
>
> Similar fix was already done in commit 25528213fe9f ("tags: Fix
> DEFINE_PER_CPU expansions"), but this one probably wasn't noticed.
>
> Signed-off-by: Sam Protsenko <[email protected]>
> ---

This one was sent some time ago, but there wasn't any response. Can
you please review it and merge if applicable?

Thanks!

> include/linux/notifier.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/include/linux/notifier.h b/include/linux/notifier.h
> index f35c7bf76143..0096a05395e3 100644
> --- a/include/linux/notifier.h
> +++ b/include/linux/notifier.h
> @@ -122,8 +122,7 @@ extern void srcu_init_notifier_head(struct srcu_notifier_head *nh);
>
> #ifdef CONFIG_TREE_SRCU
> #define _SRCU_NOTIFIER_HEAD(name, mod) \
> - static DEFINE_PER_CPU(struct srcu_data, \
> - name##_head_srcu_data); \
> + static DEFINE_PER_CPU(struct srcu_data, name##_head_srcu_data); \
> mod struct srcu_notifier_head name = \
> SRCU_NOTIFIER_INIT(name, name##_head_srcu_data)
>
> --
> 2.19.1
>

2018-10-29 20:14:03

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2] kernel/SRCU: Fix ctags

On Mon, Oct 29, 2018 at 10:09 PM Sam Protsenko
<[email protected]> wrote:
>
> ctags indexing ("make tags" command) throws this warning:
>
> ctags: Warning: include/linux/notifier.h:125:
> null expansion of name pattern "\1"
>
> This is the result of DEFINE_PER_CPU() macro exapansion. Fix that by
> getting rid of line break.
>
> Similar fix was already done in commit 25528213fe9f ("tags: Fix
> DEFINE_PER_CPU expansions"), but this one probably wasn't noticed.

Why not to add Fixes tag here as well?

>
> Signed-off-by: Sam Protsenko <[email protected]>
> ---
> include/linux/notifier.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/include/linux/notifier.h b/include/linux/notifier.h
> index f35c7bf76143..0096a05395e3 100644
> --- a/include/linux/notifier.h
> +++ b/include/linux/notifier.h
> @@ -122,8 +122,7 @@ extern void srcu_init_notifier_head(struct srcu_notifier_head *nh);
>
> #ifdef CONFIG_TREE_SRCU
> #define _SRCU_NOTIFIER_HEAD(name, mod) \
> - static DEFINE_PER_CPU(struct srcu_data, \
> - name##_head_srcu_data); \
> + static DEFINE_PER_CPU(struct srcu_data, name##_head_srcu_data); \
> mod struct srcu_notifier_head name = \
> SRCU_NOTIFIER_INIT(name, name##_head_srcu_data)
>
> --
> 2.19.1
>


--
With Best Regards,
Andy Shevchenko

2018-10-30 06:35:30

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2] kernel/SRCU: Fix ctags

On Mon, Oct 29, 2018 at 10:11:36PM +0200, Sam Protsenko wrote:
> Hi Greg,
>
> On Mon, Oct 29, 2018 at 10:09 PM, Sam Protsenko
> <[email protected]> wrote:
> > ctags indexing ("make tags" command) throws this warning:
> >
> > ctags: Warning: include/linux/notifier.h:125:
> > null expansion of name pattern "\1"
> >
> > This is the result of DEFINE_PER_CPU() macro exapansion. Fix that by
> > getting rid of line break.
> >
> > Similar fix was already done in commit 25528213fe9f ("tags: Fix
> > DEFINE_PER_CPU expansions"), but this one probably wasn't noticed.
> >
> > Signed-off-by: Sam Protsenko <[email protected]>
> > ---
>
> This one was sent some time ago, but there wasn't any response. Can
> you please review it and merge if applicable?

As before, why ask me?

thanks,

greg k-h

2018-10-30 19:32:34

by Sam Protsenko

[permalink] [raw]
Subject: Re: [PATCH v2] kernel/SRCU: Fix ctags

On Mon, Oct 29, 2018 at 10:11 PM, Andy Shevchenko
<[email protected]> wrote:
> On Mon, Oct 29, 2018 at 10:09 PM Sam Protsenko
> <[email protected]> wrote:
>>
>> ctags indexing ("make tags" command) throws this warning:
>>
>> ctags: Warning: include/linux/notifier.h:125:
>> null expansion of name pattern "\1"
>>
>> This is the result of DEFINE_PER_CPU() macro exapansion. Fix that by
>> getting rid of line break.
>>
>> Similar fix was already done in commit 25528213fe9f ("tags: Fix
>> DEFINE_PER_CPU expansions"), but this one probably wasn't noticed.
>
> Why not to add Fixes tag here as well?
>

Will do, thanks, Andy!

>>
>> Signed-off-by: Sam Protsenko <[email protected]>
>> ---
>> include/linux/notifier.h | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/include/linux/notifier.h b/include/linux/notifier.h
>> index f35c7bf76143..0096a05395e3 100644
>> --- a/include/linux/notifier.h
>> +++ b/include/linux/notifier.h
>> @@ -122,8 +122,7 @@ extern void srcu_init_notifier_head(struct srcu_notifier_head *nh);
>>
>> #ifdef CONFIG_TREE_SRCU
>> #define _SRCU_NOTIFIER_HEAD(name, mod) \
>> - static DEFINE_PER_CPU(struct srcu_data, \
>> - name##_head_srcu_data); \
>> + static DEFINE_PER_CPU(struct srcu_data, name##_head_srcu_data); \
>> mod struct srcu_notifier_head name = \
>> SRCU_NOTIFIER_INIT(name, name##_head_srcu_data)
>>
>> --
>> 2.19.1
>>
>
>
> --
> With Best Regards,
> Andy Shevchenko