diff mbox

[5/7] signal: Silence nested-externs warnings

Message ID 1411140580-20909-6-git-send-email-jeffrey.t.kirsher@intel.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Kirsher, Jeffrey T Sept. 19, 2014, 3:29 p.m. UTC
From: Mark Rustad <mark.d.rustad@intel.com>

Silence nested-externs warnings for these, as these nested
externs are truly wanted.

CC: Oleg Nesterov <oleg@redhat.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Geert Uytterhoeven <geert@linux-m68k.org>
CC: Richard Weinberger <richard@nod.at>
CC: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 include/linux/signal.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Richard Weinberger Sept. 19, 2014, 3:35 p.m. UTC | #1
Am 19.09.2014 17:29, schrieb Jeff Kirsher:
> From: Mark Rustad <mark.d.rustad@intel.com>
> 
> Silence nested-externs warnings for these, as these nested
> externs are truly wanted.
> 
> CC: Oleg Nesterov <oleg@redhat.com>
> CC: Andrew Morton <akpm@linux-foundation.org>
> CC: Geert Uytterhoeven <geert@linux-m68k.org>
> CC: Richard Weinberger <richard@nod.at>
> CC: Brian Norris <computersforpeace@gmail.com>
> Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>  include/linux/signal.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/linux/signal.h b/include/linux/signal.h
> index 750196f..e68ae6b 100644
> --- a/include/linux/signal.h
> +++ b/include/linux/signal.h
> @@ -67,7 +67,9 @@ static inline int sigismember(sigset_t *set, int _sig)
>  
>  static inline int sigisemptyset(sigset_t *set)
>  {
> +	DIAG_PUSH DIAG_IGNORE(nested-externs)

Do we really want to clutter the source with such tags?
Does this even build? i.e. how does gcc know to ignore that?

rw@azrael:~/linux (ubi-wlcrash $)> git grep DIAG_PUSH | wc -l
0

Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kirsher, Jeffrey T Sept. 19, 2014, 3:37 p.m. UTC | #2
On Fri, 2014-09-19 at 17:35 +0200, Richard Weinberger wrote:
> Am 19.09.2014 17:29, schrieb Jeff Kirsher:
> > From: Mark Rustad <mark.d.rustad@intel.com>
> > 
> > Silence nested-externs warnings for these, as these nested
> > externs are truly wanted.
> > 
> > CC: Oleg Nesterov <oleg@redhat.com>
> > CC: Andrew Morton <akpm@linux-foundation.org>
> > CC: Geert Uytterhoeven <geert@linux-m68k.org>
> > CC: Richard Weinberger <richard@nod.at>
> > CC: Brian Norris <computersforpeace@gmail.com>
> > Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > ---
> >  include/linux/signal.h | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/include/linux/signal.h b/include/linux/signal.h
> > index 750196f..e68ae6b 100644
> > --- a/include/linux/signal.h
> > +++ b/include/linux/signal.h
> > @@ -67,7 +67,9 @@ static inline int sigismember(sigset_t *set, int _sig)
> >  
> >  static inline int sigisemptyset(sigset_t *set)
> >  {
> > +	DIAG_PUSH DIAG_IGNORE(nested-externs)
> 
> Do we really want to clutter the source with such tags?
> Does this even build? i.e. how does gcc know to ignore that?
> 
> rw@azrael:~/linux (ubi-wlcrash $)> git grep DIAG_PUSH | wc -l
> 0
> 
> Thanks,
> //richard

See patch 1 of the series.
Richard Weinberger Sept. 19, 2014, 3:39 p.m. UTC | #3
Am 19.09.2014 17:37, schrieb Jeff Kirsher:
> On Fri, 2014-09-19 at 17:35 +0200, Richard Weinberger wrote:
>> Am 19.09.2014 17:29, schrieb Jeff Kirsher:
>>> From: Mark Rustad <mark.d.rustad@intel.com>
>>>
>>> Silence nested-externs warnings for these, as these nested
>>> externs are truly wanted.
>>>
>>> CC: Oleg Nesterov <oleg@redhat.com>
>>> CC: Andrew Morton <akpm@linux-foundation.org>
>>> CC: Geert Uytterhoeven <geert@linux-m68k.org>
>>> CC: Richard Weinberger <richard@nod.at>
>>> CC: Brian Norris <computersforpeace@gmail.com>
>>> Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
>>> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>> ---
>>>  include/linux/signal.h | 6 ++++++
>>>  1 file changed, 6 insertions(+)
>>>
>>> diff --git a/include/linux/signal.h b/include/linux/signal.h
>>> index 750196f..e68ae6b 100644
>>> --- a/include/linux/signal.h
>>> +++ b/include/linux/signal.h
>>> @@ -67,7 +67,9 @@ static inline int sigismember(sigset_t *set, int _sig)
>>>  
>>>  static inline int sigisemptyset(sigset_t *set)
>>>  {
>>> +	DIAG_PUSH DIAG_IGNORE(nested-externs)
>>
>> Do we really want to clutter the source with such tags?
>> Does this even build? i.e. how does gcc know to ignore that?
>>
>> rw@azrael:~/linux (ubi-wlcrash $)> git grep DIAG_PUSH | wc -l
>> 0
>>
>> Thanks,
>> //richard
> 
> See patch 1 of the series.

I was not CC'ed...

Thanks,
//richard
diff mbox

Patch

diff --git a/include/linux/signal.h b/include/linux/signal.h
index 750196f..e68ae6b 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -67,7 +67,9 @@  static inline int sigismember(sigset_t *set, int _sig)
 
 static inline int sigisemptyset(sigset_t *set)
 {
+	DIAG_PUSH DIAG_IGNORE(nested-externs)
 	extern void _NSIG_WORDS_is_unsupported_size(void);
+	DIAG_POP
 	switch (_NSIG_WORDS) {
 	case 4:
 		return (set->sig[3] | set->sig[2] |
@@ -90,7 +92,9 @@  static inline int sigisemptyset(sigset_t *set)
 #define _SIG_SET_BINOP(name, op)					\
 static inline void name(sigset_t *r, const sigset_t *a, const sigset_t *b) \
 {									\
+	DIAG_PUSH DIAG_IGNORE(nested-externs)				\
 	extern void _NSIG_WORDS_is_unsupported_size(void);		\
+	DIAG_POP							\
 	unsigned long a0, a1, a2, a3, b0, b1, b2, b3;			\
 									\
 	switch (_NSIG_WORDS) {						\
@@ -128,7 +132,9 @@  _SIG_SET_BINOP(sigandnsets, _sig_andn)
 #define _SIG_SET_OP(name, op)						\
 static inline void name(sigset_t *set)					\
 {									\
+	DIAG_PUSH DIAG_IGNORE(nested-externs)				\
 	extern void _NSIG_WORDS_is_unsupported_size(void);		\
+	DIAG_POP							\
 									\
 	switch (_NSIG_WORDS) {						\
 	    case 4: set->sig[3] = op(set->sig[3]);			\