Linux-Next Archive on lore.kernel.org
 help / color / Atom feed
* linux-next: build warning after merge of the akpm-current tree
@ 2017-11-13  5:42 Stephen Rothwell
  2017-11-13  8:09 ` Michal Hocko
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2017-11-13  5:42 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Michal Hocko

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

In file included from include/linux/mmzone.h:17:0,
                 from include/linux/mempolicy.h:10,
                 from mm/mempolicy.c:70:
mm/mempolicy.c: In function 'mpol_to_str':
include/linux/nodemask.h:107:41: warning: the address of 'nodes' will always evaluate as 'true' [-Waddress]
 #define nodemask_pr_args(maskp) (maskp) ? MAX_NUMNODES : 0, (maskp) ? (maskp)->bits : NULL
                                         ^
mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
           nodemask_pr_args(&nodes));
           ^
include/linux/nodemask.h:107:69: warning: the address of 'nodes' will always evaluate as 'true' [-Waddress]
 #define nodemask_pr_args(maskp) (maskp) ? MAX_NUMNODES : 0, (maskp) ? (maskp)->bits : NULL
                                                                     ^
mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
           nodemask_pr_args(&nodes));
           ^

Introduced by commit

  b2c1ed23bdc1 ("mm: simplify nodemask printing")

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2017-11-13  5:42 linux-next: build warning after merge of the akpm-current tree Stephen Rothwell
@ 2017-11-13  8:09 ` Michal Hocko
  2017-11-13  8:23   ` Michal Hocko
  2017-11-13 11:43   ` Arnd Bergmann
  0 siblings, 2 replies; 87+ messages in thread
From: Michal Hocko @ 2017-11-13  8:09 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux-Next Mailing List, Linux Kernel Mailing List

On Mon 13-11-17 16:42:06, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm-current tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> In file included from include/linux/mmzone.h:17:0,
>                  from include/linux/mempolicy.h:10,
>                  from mm/mempolicy.c:70:
> mm/mempolicy.c: In function 'mpol_to_str':
> include/linux/nodemask.h:107:41: warning: the address of 'nodes' will always evaluate as 'true' [-Waddress]
>  #define nodemask_pr_args(maskp) (maskp) ? MAX_NUMNODES : 0, (maskp) ? (maskp)->bits : NULL
>                                          ^
> mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
>            nodemask_pr_args(&nodes));
>            ^

Hmm, this warning is quite surprising to me. Sure in this particular
case maskp will always be non-NULL so we always expand to
	MAX_NUMNODES, maskp->bits
which is what we want. But we have other users which may be NULL. Does
anybody understan why this warns at all?
-- 
Michal Hocko
SUSE Labs

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2017-11-13  8:09 ` Michal Hocko
@ 2017-11-13  8:23   ` Michal Hocko
  2017-11-13 11:43   ` Arnd Bergmann
  1 sibling, 0 replies; 87+ messages in thread
From: Michal Hocko @ 2017-11-13  8:23 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux-Next Mailing List, Linux Kernel Mailing List

On Mon 13-11-17 09:09:55, Michal Hocko wrote:
> On Mon 13-11-17 16:42:06, Stephen Rothwell wrote:
> > Hi Andrew,
> > 
> > After merging the akpm-current tree, today's linux-next build (powerpc
> > ppc64_defconfig) produced this warning:
> > 
> > In file included from include/linux/mmzone.h:17:0,
> >                  from include/linux/mempolicy.h:10,
> >                  from mm/mempolicy.c:70:
> > mm/mempolicy.c: In function 'mpol_to_str':
> > include/linux/nodemask.h:107:41: warning: the address of 'nodes' will always evaluate as 'true' [-Waddress]
> >  #define nodemask_pr_args(maskp) (maskp) ? MAX_NUMNODES : 0, (maskp) ? (maskp)->bits : NULL
> >                                          ^
> > mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
> >            nodemask_pr_args(&nodes));
> >            ^
> 
> Hmm, this warning is quite surprising to me. Sure in this particular
> case maskp will always be non-NULL so we always expand to
> 	MAX_NUMNODES, maskp->bits
> which is what we want. But we have other users which may be NULL. Does
> anybody understan why this warns at all?

Strange I played with the following minimal test case and it warns only
for the explicit &m use while n is clearly never null as well. This all
smells like -Waddress is just confused (at least with my gcc 7.2.0-12

#include <stdio.h>

#define MAX_NUMNODES 10
struct mask {
	void *bits;
};
#define nodemask_pr_args(maskp) (maskp) ? MAX_NUMNODES : 0, (maskp) ? (maskp)->bits : NULL

int foo(void)
{
	struct mask m;
	struct mask *n = &m;

	printf("%*p\n", nodemask_pr_args(&m));
	printf("%*p\n", nodemask_pr_args(n));

	return 0;
}
-- 
Michal Hocko
SUSE Labs

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2017-11-13  8:09 ` Michal Hocko
  2017-11-13  8:23   ` Michal Hocko
@ 2017-11-13 11:43   ` Arnd Bergmann
  2017-11-13 11:54     ` Michal Hocko
  2017-11-16 22:44     ` Stephen Rothwell
  1 sibling, 2 replies; 87+ messages in thread
From: Arnd Bergmann @ 2017-11-13 11:43 UTC (permalink / raw)
  To: Michal Hocko
  Cc: Stephen Rothwell, Andrew Morton, Linux-Next Mailing List,
	Linux Kernel Mailing List

On Mon, Nov 13, 2017 at 9:09 AM, Michal Hocko <mhocko@kernel.org> wrote:
> On Mon 13-11-17 16:42:06, Stephen Rothwell wrote:
>> Hi Andrew,
>>
>> After merging the akpm-current tree, today's linux-next build (powerpc
>> ppc64_defconfig) produced this warning:
>>
>> In file included from include/linux/mmzone.h:17:0,
>>                  from include/linux/mempolicy.h:10,
>>                  from mm/mempolicy.c:70:
>> mm/mempolicy.c: In function 'mpol_to_str':
>> include/linux/nodemask.h:107:41: warning: the address of 'nodes' will always evaluate as 'true' [-Waddress]
>>  #define nodemask_pr_args(maskp) (maskp) ? MAX_NUMNODES : 0, (maskp) ? (maskp)->bits : NULL
>>                                          ^
>> mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
>>            nodemask_pr_args(&nodes));
>>            ^
>
> Hmm, this warning is quite surprising to me. Sure in this particular
> case maskp will always be non-NULL so we always expand to
>         MAX_NUMNODES, maskp->bits
> which is what we want. But we have other users which may be NULL. Does
> anybody understan why this warns at all?

As I understand it, the warning tries to address a common typo of accidentally
testing the pointer to a stack object for being non-NULL, rather than the object
pointed to for being non-zero.

Adding an extra '!= NULL' comparison gets rid of the warning for me:

#define nodemask_pr_args(maskp)  \
   ((maskp) != NULL) ? MAX_NUMNODES : 0, \
   ((maskp) != NULL) ?(maskp)->bits : NULL

       Arnd

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2017-11-13 11:43   ` Arnd Bergmann
@ 2017-11-13 11:54     ` Michal Hocko
  2017-11-13 12:24       ` Arnd Bergmann
  2017-11-13 12:29       ` Michal Hocko
  2017-11-16 22:44     ` Stephen Rothwell
  1 sibling, 2 replies; 87+ messages in thread
From: Michal Hocko @ 2017-11-13 11:54 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Stephen Rothwell, Andrew Morton, Linux-Next Mailing List,
	Linux Kernel Mailing List

On Mon 13-11-17 12:43:08, Arnd Bergmann wrote:
> On Mon, Nov 13, 2017 at 9:09 AM, Michal Hocko <mhocko@kernel.org> wrote:
> > On Mon 13-11-17 16:42:06, Stephen Rothwell wrote:
> >> Hi Andrew,
> >>
> >> After merging the akpm-current tree, today's linux-next build (powerpc
> >> ppc64_defconfig) produced this warning:
> >>
> >> In file included from include/linux/mmzone.h:17:0,
> >>                  from include/linux/mempolicy.h:10,
> >>                  from mm/mempolicy.c:70:
> >> mm/mempolicy.c: In function 'mpol_to_str':
> >> include/linux/nodemask.h:107:41: warning: the address of 'nodes' will always evaluate as 'true' [-Waddress]
> >>  #define nodemask_pr_args(maskp) (maskp) ? MAX_NUMNODES : 0, (maskp) ? (maskp)->bits : NULL
> >>                                          ^
> >> mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
> >>            nodemask_pr_args(&nodes));
> >>            ^
> >
> > Hmm, this warning is quite surprising to me. Sure in this particular
> > case maskp will always be non-NULL so we always expand to
> >         MAX_NUMNODES, maskp->bits
> > which is what we want. But we have other users which may be NULL. Does
> > anybody understan why this warns at all?
> 
> As I understand it, the warning tries to address a common typo of accidentally
> testing the pointer to a stack object for being non-NULL, rather than the object
> pointed to for being non-zero.
> 
> Adding an extra '!= NULL' comparison gets rid of the warning for me:
> 
> #define nodemask_pr_args(maskp)  \
>    ((maskp) != NULL) ? MAX_NUMNODES : 0, \
>    ((maskp) != NULL) ?(maskp)->bits : NULL

OK, that is a reasonable workaround. I was talking to our gcc guy and
he suggested to report a bug for this. Andrew, could you fold the
explicit != NULL check into the patch please?

-- 
Michal Hocko
SUSE Labs

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2017-11-13 11:54     ` Michal Hocko
@ 2017-11-13 12:24       ` Arnd Bergmann
  2017-11-13 12:29       ` Michal Hocko
  1 sibling, 0 replies; 87+ messages in thread
From: Arnd Bergmann @ 2017-11-13 12:24 UTC (permalink / raw)
  To: Michal Hocko
  Cc: Stephen Rothwell, Andrew Morton, Linux-Next Mailing List,
	Linux Kernel Mailing List

On Mon, Nov 13, 2017 at 12:54 PM, Michal Hocko <mhocko@kernel.org> wrote:
> On Mon 13-11-17 12:43:08, Arnd Bergmann wrote:
>> On Mon, Nov 13, 2017 at 9:09 AM, Michal Hocko <mhocko@kernel.org> wrote:
>> > On Mon 13-11-17 16:42:06, Stephen Rothwell wrote:
>> >> Hi Andrew,
>> >>
>> >> After merging the akpm-current tree, today's linux-next build (powerpc
>> >> ppc64_defconfig) produced this warning:
>> >>
>> >> In file included from include/linux/mmzone.h:17:0,
>> >>                  from include/linux/mempolicy.h:10,
>> >>                  from mm/mempolicy.c:70:
>> >> mm/mempolicy.c: In function 'mpol_to_str':
>> >> include/linux/nodemask.h:107:41: warning: the address of 'nodes' will always evaluate as 'true' [-Waddress]
>> >>  #define nodemask_pr_args(maskp) (maskp) ? MAX_NUMNODES : 0, (maskp) ? (maskp)->bits : NULL
>> >>                                          ^
>> >> mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
>> >>            nodemask_pr_args(&nodes));
>> >>            ^
>> >
>> > Hmm, this warning is quite surprising to me. Sure in this particular
>> > case maskp will always be non-NULL so we always expand to
>> >         MAX_NUMNODES, maskp->bits
>> > which is what we want. But we have other users which may be NULL. Does
>> > anybody understan why this warns at all?
>>
>> As I understand it, the warning tries to address a common typo of accidentally
>> testing the pointer to a stack object for being non-NULL, rather than the object
>> pointed to for being non-zero.
>>
>> Adding an extra '!= NULL' comparison gets rid of the warning for me:
>>
>> #define nodemask_pr_args(maskp)  \
>>    ((maskp) != NULL) ? MAX_NUMNODES : 0, \
>>    ((maskp) != NULL) ?(maskp)->bits : NULL
>
> OK, that is a reasonable workaround. I was talking to our gcc guy and
> he suggested to report a bug for this.

That might also be useful. Some warnings in gcc get disabled when
they show up inside of a macro, and that could presumably be done
here too.

      Arnd

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2017-11-13 11:54     ` Michal Hocko
  2017-11-13 12:24       ` Arnd Bergmann
@ 2017-11-13 12:29       ` Michal Hocko
  1 sibling, 0 replies; 87+ messages in thread
From: Michal Hocko @ 2017-11-13 12:29 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Stephen Rothwell, Andrew Morton, Linux-Next Mailing List,
	Linux Kernel Mailing List

On Mon 13-11-17 12:54:30, Michal Hocko wrote:
> On Mon 13-11-17 12:43:08, Arnd Bergmann wrote:
> > On Mon, Nov 13, 2017 at 9:09 AM, Michal Hocko <mhocko@kernel.org> wrote:
> > > On Mon 13-11-17 16:42:06, Stephen Rothwell wrote:
> > >> Hi Andrew,
> > >>
> > >> After merging the akpm-current tree, today's linux-next build (powerpc
> > >> ppc64_defconfig) produced this warning:
> > >>
> > >> In file included from include/linux/mmzone.h:17:0,
> > >>                  from include/linux/mempolicy.h:10,
> > >>                  from mm/mempolicy.c:70:
> > >> mm/mempolicy.c: In function 'mpol_to_str':
> > >> include/linux/nodemask.h:107:41: warning: the address of 'nodes' will always evaluate as 'true' [-Waddress]
> > >>  #define nodemask_pr_args(maskp) (maskp) ? MAX_NUMNODES : 0, (maskp) ? (maskp)->bits : NULL
> > >>                                          ^
> > >> mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
> > >>            nodemask_pr_args(&nodes));
> > >>            ^
> > >
> > > Hmm, this warning is quite surprising to me. Sure in this particular
> > > case maskp will always be non-NULL so we always expand to
> > >         MAX_NUMNODES, maskp->bits
> > > which is what we want. But we have other users which may be NULL. Does
> > > anybody understan why this warns at all?
> > 
> > As I understand it, the warning tries to address a common typo of accidentally
> > testing the pointer to a stack object for being non-NULL, rather than the object
> > pointed to for being non-zero.
> > 
> > Adding an extra '!= NULL' comparison gets rid of the warning for me:
> > 
> > #define nodemask_pr_args(maskp)  \
> >    ((maskp) != NULL) ? MAX_NUMNODES : 0, \
> >    ((maskp) != NULL) ?(maskp)->bits : NULL
> 
> OK, that is a reasonable workaround. I was talking to our gcc guy and
> he suggested to report a bug for this.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82963

-- 
Michal Hocko
SUSE Labs

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2017-11-13 11:43   ` Arnd Bergmann
  2017-11-13 11:54     ` Michal Hocko
@ 2017-11-16 22:44     ` Stephen Rothwell
  2017-11-17  3:53       ` Stephen Rothwell
  1 sibling, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2017-11-16 22:44 UTC (permalink / raw)
  To: Michal Hocko, Andrew Morton
  Cc: Arnd Bergmann, Linux-Next Mailing List, Linux Kernel Mailing List

Hi all,

On Mon, 13 Nov 2017 12:43:08 +0100 Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Mon, Nov 13, 2017 at 9:09 AM, Michal Hocko <mhocko@kernel.org> wrote:
> > On Mon 13-11-17 16:42:06, Stephen Rothwell wrote:  
> >>
> >> After merging the akpm-current tree, today's linux-next build (powerpc
> >> ppc64_defconfig) produced this warning:
> >>
> >> In file included from include/linux/mmzone.h:17:0,
> >>                  from include/linux/mempolicy.h:10,
> >>                  from mm/mempolicy.c:70:
> >> mm/mempolicy.c: In function 'mpol_to_str':
> >> include/linux/nodemask.h:107:41: warning: the address of 'nodes' will always evaluate as 'true' [-Waddress]
> >>  #define nodemask_pr_args(maskp) (maskp) ? MAX_NUMNODES : 0, (maskp) ? (maskp)->bits : NULL
> >>                                          ^
> >> mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
> >>            nodemask_pr_args(&nodes));
> >>            ^  
> >
> > Hmm, this warning is quite surprising to me. Sure in this particular
> > case maskp will always be non-NULL so we always expand to
> >         MAX_NUMNODES, maskp->bits
> > which is what we want. But we have other users which may be NULL. Does
> > anybody understan why this warns at all?  
> 
> As I understand it, the warning tries to address a common typo of accidentally
> testing the pointer to a stack object for being non-NULL, rather than the object
> pointed to for being non-zero.
> 
> Adding an extra '!= NULL' comparison gets rid of the warning for me:
> 
> #define nodemask_pr_args(maskp)  \
>    ((maskp) != NULL) ? MAX_NUMNODES : 0, \
>    ((maskp) != NULL) ?(maskp)->bits : NULL
> 
>        Arnd

This warning now exists in Linus' tree :-(

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2017-11-16 22:44     ` Stephen Rothwell
@ 2017-11-17  3:53       ` Stephen Rothwell
  2017-11-17  9:36         ` Zhangshaokun
  2017-11-17  9:56         ` Arnd Bergmann
  0 siblings, 2 replies; 87+ messages in thread
From: Stephen Rothwell @ 2017-11-17  3:53 UTC (permalink / raw)
  To: Michal Hocko, Andrew Morton
  Cc: Arnd Bergmann, Linux-Next Mailing List, Linux Kernel Mailing List

Hi all,

On Fri, 17 Nov 2017 09:44:39 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Mon, 13 Nov 2017 12:43:08 +0100 Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > On Mon, Nov 13, 2017 at 9:09 AM, Michal Hocko <mhocko@kernel.org> wrote:  
> > > On Mon 13-11-17 16:42:06, Stephen Rothwell wrote:    
> > >>
> > >> After merging the akpm-current tree, today's linux-next build (powerpc
> > >> ppc64_defconfig) produced this warning:
> > >>
> > >> In file included from include/linux/mmzone.h:17:0,
> > >>                  from include/linux/mempolicy.h:10,
> > >>                  from mm/mempolicy.c:70:
> > >> mm/mempolicy.c: In function 'mpol_to_str':
> > >> include/linux/nodemask.h:107:41: warning: the address of 'nodes' will always evaluate as 'true' [-Waddress]
> > >>  #define nodemask_pr_args(maskp) (maskp) ? MAX_NUMNODES : 0, (maskp) ? (maskp)->bits : NULL
> > >>                                          ^
> > >> mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
> > >>            nodemask_pr_args(&nodes));
> > >>            ^    
> > >
> > > Hmm, this warning is quite surprising to me. Sure in this particular
> > > case maskp will always be non-NULL so we always expand to
> > >         MAX_NUMNODES, maskp->bits
> > > which is what we want. But we have other users which may be NULL. Does
> > > anybody understan why this warns at all?    
> > 
> > As I understand it, the warning tries to address a common typo of accidentally
> > testing the pointer to a stack object for being non-NULL, rather than the object
> > pointed to for being non-zero.
> > 
> > Adding an extra '!= NULL' comparison gets rid of the warning for me:
> > 
> > #define nodemask_pr_args(maskp)  \
> >    ((maskp) != NULL) ? MAX_NUMNODES : 0, \
> >    ((maskp) != NULL) ?(maskp)->bits : NULL
> > 
> >        Arnd  
> 
> This warning now exists in Linus' tree :-(

Looking closer, it seems that the above workaround doesn't work for my
compiler (gcc v5.2.0):

In file included from include/linux/mmzone.h:17:0,
                 from include/linux/mempolicy.h:10,
                 from mm/mempolicy.c:70:
mm/mempolicy.c: In function 'mpol_to_str':
include/linux/nodemask.h:108:11: warning: the comparison will always evaluate as 'true' for the address of 'nodes' will never be NULL [-Waddress]
  ((maskp) != NULL) ? MAX_NUMNODES : 0,  \
           ^
mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
           nodemask_pr_args(&nodes));
           ^
include/linux/nodemask.h:109:11: warning: the comparison will always evaluate as 'true' for the address of 'nodes' will never be NULL [-Waddress]
  ((maskp) != NULL) ? (maskp)->bits : NULL
           ^
mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
           nodemask_pr_args(&nodes));
           ^

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2017-11-17  3:53       ` Stephen Rothwell
@ 2017-11-17  9:36         ` Zhangshaokun
  2017-11-17  9:56         ` Arnd Bergmann
  1 sibling, 0 replies; 87+ messages in thread
From: Zhangshaokun @ 2017-11-17  9:36 UTC (permalink / raw)
  To: Stephen Rothwell, Michal Hocko, Andrew Morton
  Cc: Arnd Bergmann, Linux-Next Mailing List, Linux Kernel Mailing List

Hi,

On 2017/11/17 11:53, Stephen Rothwell wrote:
> Hi all,
> 
> On Fri, 17 Nov 2017 09:44:39 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> On Mon, 13 Nov 2017 12:43:08 +0100 Arnd Bergmann <arnd@arndb.de> wrote:
>>>
>>> On Mon, Nov 13, 2017 at 9:09 AM, Michal Hocko <mhocko@kernel.org> wrote:  
>>>> On Mon 13-11-17 16:42:06, Stephen Rothwell wrote:    
>>>>>
>>>>> After merging the akpm-current tree, today's linux-next build (powerpc
>>>>> ppc64_defconfig) produced this warning:
>>>>>
>>>>> In file included from include/linux/mmzone.h:17:0,
>>>>>                  from include/linux/mempolicy.h:10,
>>>>>                  from mm/mempolicy.c:70:
>>>>> mm/mempolicy.c: In function 'mpol_to_str':
>>>>> include/linux/nodemask.h:107:41: warning: the address of 'nodes' will always evaluate as 'true' [-Waddress]
>>>>>  #define nodemask_pr_args(maskp) (maskp) ? MAX_NUMNODES : 0, (maskp) ? (maskp)->bits : NULL
>>>>>                                          ^
>>>>> mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
>>>>>            nodemask_pr_args(&nodes));
>>>>>            ^    
>>>>
>>>> Hmm, this warning is quite surprising to me. Sure in this particular
>>>> case maskp will always be non-NULL so we always expand to
>>>>         MAX_NUMNODES, maskp->bits
>>>> which is what we want. But we have other users which may be NULL. Does
>>>> anybody understan why this warns at all?    
>>>
>>> As I understand it, the warning tries to address a common typo of accidentally
>>> testing the pointer to a stack object for being non-NULL, rather than the object
>>> pointed to for being non-zero.
>>>
>>> Adding an extra '!= NULL' comparison gets rid of the warning for me:
>>>
>>> #define nodemask_pr_args(maskp)  \
>>>    ((maskp) != NULL) ? MAX_NUMNODES : 0, \
>>>    ((maskp) != NULL) ?(maskp)->bits : NULL
>>>
>>>        Arnd  
>>
>> This warning now exists in Linus' tree :-(
> 
> Looking closer, it seems that the above workaround doesn't work for my
> compiler (gcc v5.2.0):
> 

I also came across this issue using Linus' tree and my gcc is gcc version 5.4.0 20160609
 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.5).

  CC      drivers/clk/renesas/rcar-gen3-cpg.o
In file included from ./include/linux/mmzone.h:17:0,
                 from ./include/linux/mempolicy.h:10,
                 from mm/mempolicy.c:70:
mm/mempolicy.c: In function ‘mpol_to_str’:
./include/linux/nodemask.h:108:11: warning: the comparison will always evaluate as ‘true’ for the address of ‘nodes’ will never be NULL [-Waddress]
  ((maskp) != NULL) ? MAX_NUMNODES : 0,  \
           ^
mm/mempolicy.c:2817:11: note: in expansion of macro ‘nodemask_pr_args’
           nodemask_pr_args(&nodes));
           ^
./include/linux/nodemask.h:109:11: warning: the comparison will always evaluate as ‘true’ for the address of ‘nodes’ will never be NULL [-Waddress]
  ((maskp) != NULL) ? (maskp)->bits : NULL
           ^
mm/mempolicy.c:2817:11: note: in expansion of macro ‘nodemask_pr_args’
           nodemask_pr_args(&nodes));
           ^
  CC      drivers/clk/renesas/renesas-cpg-mssr.o

Thanks,
Shaokun

> In file included from include/linux/mmzone.h:17:0,
>                  from include/linux/mempolicy.h:10,
>                  from mm/mempolicy.c:70:
> mm/mempolicy.c: In function 'mpol_to_str':
> include/linux/nodemask.h:108:11: warning: the comparison will always evaluate as 'true' for the address of 'nodes' will never be NULL [-Waddress]
>   ((maskp) != NULL) ? MAX_NUMNODES : 0,  \
>            ^
> mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
>            nodemask_pr_args(&nodes));
>            ^
> include/linux/nodemask.h:109:11: warning: the comparison will always evaluate as 'true' for the address of 'nodes' will never be NULL [-Waddress]
>   ((maskp) != NULL) ? (maskp)->bits : NULL
>            ^
> mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
>            nodemask_pr_args(&nodes));
>            ^
> 

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2017-11-17  3:53       ` Stephen Rothwell
  2017-11-17  9:36         ` Zhangshaokun
@ 2017-11-17  9:56         ` Arnd Bergmann
  2017-11-17 10:15           ` [PATCH] mm: fix nodemask printing Arnd Bergmann
  1 sibling, 1 reply; 87+ messages in thread
From: Arnd Bergmann @ 2017-11-17  9:56 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Michal Hocko, Andrew Morton, Linux-Next Mailing List,
	Linux Kernel Mailing List

On Fri, Nov 17, 2017 at 4:53 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> On Fri, 17 Nov 2017 09:44:39 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> On Mon, 13 Nov 2017 12:43:08 +0100 Arnd Bergmann <arnd@arndb.de> wrote:
>> >
>> > On Mon, Nov 13, 2017 at 9:09 AM, Michal Hocko <mhocko@kernel.org> wrote:
>> > > On Mon 13-11-17 16:42:06, Stephen Rothwell wrote:
>> > >>
>> > >> After merging the akpm-current tree, today's linux-next build (powerpc
>> > >> ppc64_defconfig) produced this warning:
>> > >>
>> > >> In file included from include/linux/mmzone.h:17:0,
>> > >>                  from include/linux/mempolicy.h:10,
>> > >>                  from mm/mempolicy.c:70:
>> > >> mm/mempolicy.c: In function 'mpol_to_str':
>> > >> include/linux/nodemask.h:107:41: warning: the address of 'nodes' will always evaluate as 'true' [-Waddress]
>> > >>  #define nodemask_pr_args(maskp) (maskp) ? MAX_NUMNODES : 0, (maskp) ? (maskp)->bits : NULL
>> > >>                                          ^
>> > >> mm/mempolicy.c:2817:11: note: in expansion of macro 'nodemask_pr_args'
>> > >>            nodemask_pr_args(&nodes));
>> > >>            ^
>> > >
>> > > Hmm, this warning is quite surprising to me. Sure in this particular
>> > > case maskp will always be non-NULL so we always expand to
>> > >         MAX_NUMNODES, maskp->bits
>> > > which is what we want. But we have other users which may be NULL. Does
>> > > anybody understan why this warns at all?
>> >
>> > As I understand it, the warning tries to address a common typo of accidentally
>> > testing the pointer to a stack object for being non-NULL, rather than the object
>> > pointed to for being non-zero.
>> >
>> > Adding an extra '!= NULL' comparison gets rid of the warning for me:
>> >
>> > #define nodemask_pr_args(maskp)  \
>> >    ((maskp) != NULL) ? MAX_NUMNODES : 0, \
>> >    ((maskp) != NULL) ?(maskp)->bits : NULL
>> >
>> >        Arnd
>>
>> This warning now exists in Linus' tree :-(
>
> Looking closer, it seems that the above workaround doesn't work for my
> compiler (gcc v5.2.0):

Right, I see now that all versions from gcc-4.6 to gcc-6 are affected
by this, while 4.5 and
earlier as well as 7 and 8 are not.

I'll try to come up with an alternative workaround, it will probably
be even uglier.

       Arnd

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

* [PATCH] mm: fix nodemask printing
  2017-11-17  9:56         ` Arnd Bergmann
@ 2017-11-17 10:15           ` Arnd Bergmann
  2017-11-20  8:22             ` Michal Hocko
  0 siblings, 1 reply; 87+ messages in thread
From: Arnd Bergmann @ 2017-11-17 10:15 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Michal Hocko, Stephen Rothwell, linux-next, linux-kernel,
	Zhangshaokun, Arnd Bergmann

The cleanup caused build warnings for constant mask pointers:

mm/mempolicy.c: In function ‘mpol_to_str’:
./include/linux/nodemask.h:108:11: warning: the comparison will always evaluate as ‘true’ for the address of ‘nodes’ will never be NULL [-Waddress]

An earlier workaround I suggested was incorporated in the version that
got merged, but that only solved the problem for gcc-7 and higher, while
gcc-4.6 through gcc-6.x still warn.

This changes the printing again to use inline functions that make it
clear to the compiler that the line that does the NULL check has no
idea whether the argument is a constant NULL.

Fixes: 0205f75571e3 ("mm: simplify nodemask printing")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I've done only minimal build testing on this, but did check it with
all compiler versions this time.
---
 include/linux/nodemask.h | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
index 15cab3967d6d..1fbde8a880d9 100644
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@ -104,9 +104,16 @@ extern nodemask_t _unused_nodemask_arg_;
  *
  * Can be used to provide arguments for '%*pb[l]' when printing a nodemask.
  */
-#define nodemask_pr_args(maskp)				\
-	((maskp) != NULL) ? MAX_NUMNODES : 0,		\
-	((maskp) != NULL) ? (maskp)->bits : NULL
+#define nodemask_pr_args(maskp)	__nodemask_pr_numnodes(maskp), \
+				__nodemask_pr_bits(maskp)
+static inline unsigned int __nodemask_pr_numnodes(const nodemask_t *m)
+{
+	return m ? MAX_NUMNODES : 0;
+}
+static inline const unsigned long *__nodemask_pr_bits(const nodemask_t *m)
+{
+	return m ? m->bits : NULL;
+}
 
 /*
  * The inline keyword gives the compiler room to decide to inline, or
-- 
2.9.0

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

* Re: [PATCH] mm: fix nodemask printing
  2017-11-17 10:15           ` [PATCH] mm: fix nodemask printing Arnd Bergmann
@ 2017-11-20  8:22             ` Michal Hocko
  2017-11-20 11:33               ` Arnd Bergmann
  0 siblings, 1 reply; 87+ messages in thread
From: Michal Hocko @ 2017-11-20  8:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Andrew Morton, Stephen Rothwell, linux-next, linux-kernel, Zhangshaokun

On Fri 17-11-17 11:15:45, Arnd Bergmann wrote:
> The cleanup caused build warnings for constant mask pointers:
> 
> mm/mempolicy.c: In function ‘mpol_to_str’:
> ./include/linux/nodemask.h:108:11: warning: the comparison will always evaluate as ‘true’ for the address of ‘nodes’ will never be NULL [-Waddress]
> 
> An earlier workaround I suggested was incorporated in the version that
> got merged, but that only solved the problem for gcc-7 and higher, while
> gcc-4.6 through gcc-6.x still warn.
> 
> This changes the printing again to use inline functions that make it
> clear to the compiler that the line that does the NULL check has no
> idea whether the argument is a constant NULL.
> 
> Fixes: 0205f75571e3 ("mm: simplify nodemask printing")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks for the fixup. It is sad how a questionable warning makes the
code worse... Does it make sense to have the warning enabled?
Gcc bug  [1] suggests there is no great interest into fixing it.

Anyway to the patch
Acked-by: Michal Hocko <mhocko@suse.com>

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82963

> ---
> I've done only minimal build testing on this, but did check it with
> all compiler versions this time.
> ---
>  include/linux/nodemask.h | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
> index 15cab3967d6d..1fbde8a880d9 100644
> --- a/include/linux/nodemask.h
> +++ b/include/linux/nodemask.h
> @@ -104,9 +104,16 @@ extern nodemask_t _unused_nodemask_arg_;
>   *
>   * Can be used to provide arguments for '%*pb[l]' when printing a nodemask.
>   */
> -#define nodemask_pr_args(maskp)				\
> -	((maskp) != NULL) ? MAX_NUMNODES : 0,		\
> -	((maskp) != NULL) ? (maskp)->bits : NULL
> +#define nodemask_pr_args(maskp)	__nodemask_pr_numnodes(maskp), \
> +				__nodemask_pr_bits(maskp)
> +static inline unsigned int __nodemask_pr_numnodes(const nodemask_t *m)
> +{
> +	return m ? MAX_NUMNODES : 0;
> +}
> +static inline const unsigned long *__nodemask_pr_bits(const nodemask_t *m)
> +{
> +	return m ? m->bits : NULL;
> +}
>  
>  /*
>   * The inline keyword gives the compiler room to decide to inline, or
> -- 
> 2.9.0

-- 
Michal Hocko
SUSE Labs

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

* Re: [PATCH] mm: fix nodemask printing
  2017-11-20  8:22             ` Michal Hocko
@ 2017-11-20 11:33               ` Arnd Bergmann
  0 siblings, 0 replies; 87+ messages in thread
From: Arnd Bergmann @ 2017-11-20 11:33 UTC (permalink / raw)
  To: Michal Hocko
  Cc: Andrew Morton, Stephen Rothwell, Linux-Next Mailing List,
	Linux Kernel Mailing List, Zhangshaokun

On Mon, Nov 20, 2017 at 9:22 AM, Michal Hocko <mhocko@kernel.org> wrote:
> On Fri 17-11-17 11:15:45, Arnd Bergmann wrote:
>> The cleanup caused build warnings for constant mask pointers:
>>
>> mm/mempolicy.c: In function ‘mpol_to_str’:
>> ./include/linux/nodemask.h:108:11: warning: the comparison will always evaluate as ‘true’ for the address of ‘nodes’ will never be NULL [-Waddress]
>>
>> An earlier workaround I suggested was incorporated in the version that
>> got merged, but that only solved the problem for gcc-7 and higher, while
>> gcc-4.6 through gcc-6.x still warn.
>>
>> This changes the printing again to use inline functions that make it
>> clear to the compiler that the line that does the NULL check has no
>> idea whether the argument is a constant NULL.
>>
>> Fixes: 0205f75571e3 ("mm: simplify nodemask printing")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Thanks for the fixup. It is sad how a questionable warning makes the
> code worse... Does it make sense to have the warning enabled?
> Gcc bug  [1] suggests there is no great interest into fixing it.
>
> Anyway to the patch
> Acked-by: Michal Hocko <mhocko@suse.com>
>
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82963

I think I found some real bugs when I started seeing that warning elsewhere,
so I'd rather keep it enabled in general. I'd still agree that the gcc behavior
in macros is questionable though, in particular since they decided to
stop warning for the "!= NULL" case. I've found the commit that changed
gcc-7 behavior and commented again in the bugzilla, but did not reopen.

The inline function was mentioned in bugzilla there[2] as the preferred
workaround.

       Arnd

[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48778

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2019-11-06  7:05 linux-next: build warning after merge of the akpm-current tree Stephen Rothwell
@ 2019-11-06  7:52 ` Shaokun Zhang
  0 siblings, 0 replies; 87+ messages in thread
From: Shaokun Zhang @ 2019-11-06  7:52 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, yuqi jin,
	Michal Hocko

Hi Stephen,

On 2019/11/6 15:05, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the akpm-current tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> lib/cpumask.c: In function 'cpumask_local_spread':
> lib/cpumask.c:302:1: warning: the frame size of 5472 bytes is larger than 2048 bytes [-Wframe-larger-than=]
>   302 | }
>       | ^
> 
> Introduced by commit
> 
>   3d591f2836cf ("lib: optimize cpumask_local_spread()")
> 
> MAX_NUMNODES == (1 << NODES_SHIFT) and NODES_SHIFT == CONFIG_NODES_SHIFT== 10,
> so MAX_NUMNODES == 1024 and there is an int array and a bool array of that
> size declared here :-(

Thanks for the report and sorry for the warning, Michal has pointed this[1].
We are preparing the new solution and will post it soon.

[1] https://lkml.org/lkml/2019/11/5/66

Thanks,
Shaokun

> 


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

* linux-next: build warning after merge of the akpm-current tree
@ 2019-11-06  7:05 Stephen Rothwell
  2019-11-06  7:52 ` Shaokun Zhang
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2019-11-06  7:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, yuqi jin,
	Shaokun Zhang

[-- Attachment #1: Type: text/plain, Size: 604 bytes --]

Hi all,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

lib/cpumask.c: In function 'cpumask_local_spread':
lib/cpumask.c:302:1: warning: the frame size of 5472 bytes is larger than 2048 bytes [-Wframe-larger-than=]
  302 | }
      | ^

Introduced by commit

  3d591f2836cf ("lib: optimize cpumask_local_spread()")

MAX_NUMNODES == (1 << NODES_SHIFT) and NODES_SHIFT == CONFIG_NODES_SHIFT== 10,
so MAX_NUMNODES == 1024 and there is an int array and a bool array of that
size declared here :-(

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the akpm-current tree
@ 2019-11-06  6:54 Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2019-11-06  6:54 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Joel Fernandes (Google)

[-- Attachment #1: Type: text/plain, Size: 492 bytes --]

Hi all,

After merging the akpm-current tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

lib/vsprintf.c: In function 'ptr_to_hashval':
lib/vsprintf.c:766:14: warning: unused variable 'str' [-Wunused-variable]
  766 |  const char *str = sizeof(ptr) == 8 ? "(____ptrval____)" : "(ptrval)";
      |              ^~~

Introduced by commit

  aea87b9b95b9 ("rss_stat: add support to detect RSS updates of external mm")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2019-08-07 11:29 ` Rikard Falkeborn
@ 2019-08-07 23:31   ` Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2019-08-07 23:31 UTC (permalink / raw)
  To: Rikard Falkeborn
  Cc: Andrew Morton, Linux Next Mailing List, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1199 bytes --]

Hi Rikard,

On Wed, 7 Aug 2019 13:29:17 +0200 Rikard Falkeborn <rikard.falkeborn@gmail.com> wrote:
>
> Hi Stephen, Andrew
> 
> On Wed, Aug 07, 2019 at 06:00:41PM +1000, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the akpm-current tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> > 
> > In file included from include/linux/bits.h:22,
> >                  from arch/x86/include/asm/msr-index.h:5,
> >                  from arch/x86/boot/cpucheck.c:28:
> > include/linux/build_bug.h:49: warning: "BUILD_BUG_ON" redefined
> >  #define BUILD_BUG_ON(condition) \
> >  
> > In file included from arch/x86/boot/cpucheck.c:22:
> > arch/x86/boot/boot.h:31: note: this is the location of the previous definition
> >  #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
> > 
> > Caused by commit
> > 
> >   d72f2a993607 ("linux/bits.h: add compile time sanity check of GENMASK inputs")
> > 
> > -- 
> > Cheers,
> > Stephen Rothwell  
> 
> Please drop this patch, it has additional issues that needs to be fixed
> in another revision.

I have removed it from linux-next for today.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2019-08-07  8:00 Stephen Rothwell
@ 2019-08-07 11:29 ` Rikard Falkeborn
  2019-08-07 23:31   ` Stephen Rothwell
  0 siblings, 1 reply; 87+ messages in thread
From: Rikard Falkeborn @ 2019-08-07 11:29 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, Rikard Falkeborn

Hi Stephen, Andrew

On Wed, Aug 07, 2019 at 06:00:41PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the akpm-current tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> In file included from include/linux/bits.h:22,
>                  from arch/x86/include/asm/msr-index.h:5,
>                  from arch/x86/boot/cpucheck.c:28:
> include/linux/build_bug.h:49: warning: "BUILD_BUG_ON" redefined
>  #define BUILD_BUG_ON(condition) \
>  
> In file included from arch/x86/boot/cpucheck.c:22:
> arch/x86/boot/boot.h:31: note: this is the location of the previous definition
>  #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
> 
> Caused by commit
> 
>   d72f2a993607 ("linux/bits.h: add compile time sanity check of GENMASK inputs")
> 
> -- 
> Cheers,
> Stephen Rothwell

Please drop this patch, it has additional issues that needs to be fixed
in another revision.

Rikard

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

* linux-next: build warning after merge of the akpm-current tree
@ 2019-08-07  8:00 Stephen Rothwell
  2019-08-07 11:29 ` Rikard Falkeborn
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2019-08-07  8:00 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Rikard Falkeborn

[-- Attachment #1: Type: text/plain, Size: 726 bytes --]

Hi all,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from include/linux/bits.h:22,
                 from arch/x86/include/asm/msr-index.h:5,
                 from arch/x86/boot/cpucheck.c:28:
include/linux/build_bug.h:49: warning: "BUILD_BUG_ON" redefined
 #define BUILD_BUG_ON(condition) \
 
In file included from arch/x86/boot/cpucheck.c:22:
arch/x86/boot/boot.h:31: note: this is the location of the previous definition
 #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))

Caused by commit

  d72f2a993607 ("linux/bits.h: add compile time sanity check of GENMASK inputs")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2019-08-01  6:39         ` Stephen Rothwell
@ 2019-08-01  6:42           ` Miles Chen
  0 siblings, 0 replies; 87+ messages in thread
From: Miles Chen @ 2019-08-01  6:42 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Michal Hocko, Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, Qian Cai

On Thu, 2019-08-01 at 16:39 +1000, Stephen Rothwell wrote:
> Hi Miles,
> 
> On Thu, 1 Aug 2019 14:30:03 +0800 Miles Chen <miles.chen@mediatek.com> wrote:
> >
> > It's the first time that I receive a build warning after the patch has
> > been merged to -mm tree. The build warning had been fixed by Qian,
> > should I send another change for this?
> 
> No, that will do.

got it. thanks


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

* Re: linux-next: build warning after merge of the akpm-current tree
  2019-08-01  6:30       ` Miles Chen
  2019-08-01  6:38         ` Michal Hocko
@ 2019-08-01  6:39         ` Stephen Rothwell
  2019-08-01  6:42           ` Miles Chen
  1 sibling, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2019-08-01  6:39 UTC (permalink / raw)
  To: Miles Chen
  Cc: Michal Hocko, Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, Qian Cai

[-- Attachment #1: Type: text/plain, Size: 336 bytes --]

Hi Miles,

On Thu, 1 Aug 2019 14:30:03 +0800 Miles Chen <miles.chen@mediatek.com> wrote:
>
> It's the first time that I receive a build warning after the patch has
> been merged to -mm tree. The build warning had been fixed by Qian,
> should I send another change for this?

No, that will do.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2019-08-01  6:30       ` Miles Chen
@ 2019-08-01  6:38         ` Michal Hocko
  2019-08-01  6:39         ` Stephen Rothwell
  1 sibling, 0 replies; 87+ messages in thread
From: Michal Hocko @ 2019-08-01  6:38 UTC (permalink / raw)
  To: Miles Chen
  Cc: Stephen Rothwell, Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, Qian Cai

On Thu 01-08-19 14:30:03, Miles Chen wrote:
[...]
> It's the first time that I receive a build warning after the patch has
> been merged to -mm tree. The build warning had been fixed by Qian,
> should I send another change for this?
 
No need. Andrew has already picked up the fix for mmotm tree and it
should show up in linux-next soon.

Thanks!
-- 
Michal Hocko
SUSE Labs

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2019-08-01  6:15     ` Michal Hocko
@ 2019-08-01  6:30       ` Miles Chen
  2019-08-01  6:38         ` Michal Hocko
  2019-08-01  6:39         ` Stephen Rothwell
  0 siblings, 2 replies; 87+ messages in thread
From: Miles Chen @ 2019-08-01  6:30 UTC (permalink / raw)
  To: Michal Hocko
  Cc: Stephen Rothwell, Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, Qian Cai

On Thu, 2019-08-01 at 08:15 +0200, Michal Hocko wrote:
> On Thu 01-08-19 15:51:30, Stephen Rothwell wrote:
> > Hi Miles,
> > 
> > On Wed, 31 Jul 2019 14:28:04 +0800 Miles Chen <miles.chen@mediatek.com> wrote:
> > >
> > > On Wed, 2019-07-31 at 16:11 +1000, Stephen Rothwell wrote:
> > > > 
> > > > After merging the akpm-current tree, today's linux-next build (powerpc
> > > > ppc64_defconfig) produced this warning:
> > > > 
> > > > mm/memcontrol.c: In function 'invalidate_reclaim_iterators':
> > > > mm/memcontrol.c:1160:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
> > > >   } while (memcg = parent_mem_cgroup(memcg));
> > > >            ^~~~~
> > > >   
> > > 
> > > Hi Stephen,
> > > 
> > > Thanks for the telling me this. Sorry for the build warning. 
> > > Should I send patch v5 to the mailing list to fix this? 
> > 
> > You might as well (cc'ing Andrew, of course).
> > 
> > I would suggest finishing that loop like this:
> > 
> > 		memcg = parent_mem_cgroup(memcg);
> > 	} while (memcg);
> > 
> > rather than adding a set of parentheses.

thanks for the advise
> 
> Qian has already posted a patch http://lkml.kernel.org/r/1564580753-17531-1-git-send-email-cai@lca.pw

Thanks Qian's quick fix.

It's the first time that I receive a build warning after the patch has
been merged to -mm tree. The build warning had been fixed by Qian,
should I send another change for this?



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

* Re: linux-next: build warning after merge of the akpm-current tree
  2019-08-01  5:51   ` Stephen Rothwell
@ 2019-08-01  6:15     ` Michal Hocko
  2019-08-01  6:30       ` Miles Chen
  0 siblings, 1 reply; 87+ messages in thread
From: Michal Hocko @ 2019-08-01  6:15 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Miles Chen, Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, Qian Cai

On Thu 01-08-19 15:51:30, Stephen Rothwell wrote:
> Hi Miles,
> 
> On Wed, 31 Jul 2019 14:28:04 +0800 Miles Chen <miles.chen@mediatek.com> wrote:
> >
> > On Wed, 2019-07-31 at 16:11 +1000, Stephen Rothwell wrote:
> > > 
> > > After merging the akpm-current tree, today's linux-next build (powerpc
> > > ppc64_defconfig) produced this warning:
> > > 
> > > mm/memcontrol.c: In function 'invalidate_reclaim_iterators':
> > > mm/memcontrol.c:1160:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
> > >   } while (memcg = parent_mem_cgroup(memcg));
> > >            ^~~~~
> > >   
> > 
> > Hi Stephen,
> > 
> > Thanks for the telling me this. Sorry for the build warning. 
> > Should I send patch v5 to the mailing list to fix this? 
> 
> You might as well (cc'ing Andrew, of course).
> 
> I would suggest finishing that loop like this:
> 
> 		memcg = parent_mem_cgroup(memcg);
> 	} while (memcg);
> 
> rather than adding a set of parentheses.

Qian has already posted a patch http://lkml.kernel.org/r/1564580753-17531-1-git-send-email-cai@lca.pw
-- 
Michal Hocko
SUSE Labs

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2019-07-31  6:28 ` Miles Chen
@ 2019-08-01  5:51   ` Stephen Rothwell
  2019-08-01  6:15     ` Michal Hocko
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2019-08-01  5:51 UTC (permalink / raw)
  To: Miles Chen
  Cc: Andrew Morton, Linux Next Mailing List, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 934 bytes --]

Hi Miles,

On Wed, 31 Jul 2019 14:28:04 +0800 Miles Chen <miles.chen@mediatek.com> wrote:
>
> On Wed, 2019-07-31 at 16:11 +1000, Stephen Rothwell wrote:
> > 
> > After merging the akpm-current tree, today's linux-next build (powerpc
> > ppc64_defconfig) produced this warning:
> > 
> > mm/memcontrol.c: In function 'invalidate_reclaim_iterators':
> > mm/memcontrol.c:1160:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
> >   } while (memcg = parent_mem_cgroup(memcg));
> >            ^~~~~
> >   
> 
> Hi Stephen,
> 
> Thanks for the telling me this. Sorry for the build warning. 
> Should I send patch v5 to the mailing list to fix this? 

You might as well (cc'ing Andrew, of course).

I would suggest finishing that loop like this:

		memcg = parent_mem_cgroup(memcg);
	} while (memcg);

rather than adding a set of parentheses.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2019-07-31  6:16 Stephen Rothwell
@ 2019-07-31 12:01 ` Jia-Ju Bai
  0 siblings, 0 replies; 87+ messages in thread
From: Jia-Ju Bai @ 2019-07-31 12:01 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Joseph Qi



On 2019/7/31 14:16, Stephen Rothwell wrote:
> Hi all,
>
> After merging the akpm-current tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> fs/ocfs2/xattr.c:1493:13: warning: 'ocfs2_xa_add_entry' defined but not used [-Wunused-function]
>   static void ocfs2_xa_add_entry(struct ocfs2_xa_loc *loc, u32 name_hash)
>               ^~~~~~~~~~~~~~~~~~
>
> Introduced by commit
>
>    45d9aa3d263d ("fs: ocfs2: fix possible null-pointer dereferences in ocfs2_xa_prepare_entry()")
>

I look at the code again.
The function ocfs2_xa_add_entry() is never called when using this patch.
Thus, I think the definition of ocfs2_xa_add_entry() could be removed.
If it is okay, I can send a new patch (v3).


Best wishes,
Jia-Ju Bai

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2019-07-31  6:11 Stephen Rothwell
@ 2019-07-31  6:28 ` Miles Chen
  2019-08-01  5:51   ` Stephen Rothwell
  0 siblings, 1 reply; 87+ messages in thread
From: Miles Chen @ 2019-07-31  6:28 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Next Mailing List, Linux Kernel Mailing List

On Wed, 2019-07-31 at 16:11 +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the akpm-current tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> mm/memcontrol.c: In function 'invalidate_reclaim_iterators':
> mm/memcontrol.c:1160:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
>   } while (memcg = parent_mem_cgroup(memcg));
>            ^~~~~
> 

Hi Stephen,

Thanks for the telling me this. Sorry for the build warning. 
Should I send patch v5 to the mailing list to fix this? 


Miles

> Introduced by commit
> 
>   c48a2f5ce935 ("mm/memcontrol.c: fix use after free in mem_cgroup_iter()")
> 



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

* linux-next: build warning after merge of the akpm-current tree
@ 2019-07-31  6:16 Stephen Rothwell
  2019-07-31 12:01 ` Jia-Ju Bai
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2019-07-31  6:16 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Jia-Ju Bai,
	Joseph Qi

[-- Attachment #1: Type: text/plain, Size: 485 bytes --]

Hi all,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

fs/ocfs2/xattr.c:1493:13: warning: 'ocfs2_xa_add_entry' defined but not used [-Wunused-function]
 static void ocfs2_xa_add_entry(struct ocfs2_xa_loc *loc, u32 name_hash)
             ^~~~~~~~~~~~~~~~~~

Introduced by commit

  45d9aa3d263d ("fs: ocfs2: fix possible null-pointer dereferences in ocfs2_xa_prepare_entry()")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the akpm-current tree
@ 2019-07-31  6:11 Stephen Rothwell
  2019-07-31  6:28 ` Miles Chen
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2019-07-31  6:11 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Miles Chen

[-- Attachment #1: Type: text/plain, Size: 499 bytes --]

Hi all,

After merging the akpm-current tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

mm/memcontrol.c: In function 'invalidate_reclaim_iterators':
mm/memcontrol.c:1160:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  } while (memcg = parent_mem_cgroup(memcg));
           ^~~~~

Introduced by commit

  c48a2f5ce935 ("mm/memcontrol.c: fix use after free in mem_cgroup_iter()")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the akpm-current tree
@ 2019-07-29  3:48 Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2019-07-29  3:48 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, John Hubbard

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

Hi all,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/infiniband/sw/siw/siw_mem.c: In function 'siw_free_plist':
drivers/infiniband/sw/siw/siw_mem.c:66:16: warning: unused variable 'p' [-Wunused-variable]
  struct page **p = chunk->plist;
                ^

Introduced by commit

  63630f9a8d72 ("mm/gup: add make_dirty arg to put_user_pages_dirty_lock()")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the akpm-current tree
@ 2019-07-29  3:44 Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2019-07-29  3:44 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Next Mailing List, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 437 bytes --]

Hi all,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

lib/rbtree_test.c: In function 'check_augmented':
lib/rbtree_test.c:220:18: warning: unused variable 'rb' [-Wunused-variable]
  struct rb_node *rb;
                  ^~

Introduced by commit

  33a64f781816 ("augmented-rbtree-add-new-rb_declare_callbacks_max-macro-fix-2")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2019-05-30  4:55 Stephen Rothwell
@ 2019-05-30  9:02 ` Matteo Croce
  0 siblings, 0 replies; 87+ messages in thread
From: Matteo Croce @ 2019-05-30  9:02 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Next Mailing List, Linux Kernel Mailing List

On Thu, May 30, 2019 at 6:55 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the akpm-current tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> net/tipc/sysctl.c:42:12: warning: 'one' defined but not used [-Wunused-variable]
>  static int one = 1;
>             ^~~
> net/tipc/sysctl.c:41:12: warning: 'zero' defined but not used [-Wunused-variable]
>  static int zero;
>             ^~~~
>
> Introduced by commit
>
>   6a33853c5773 ("proc/sysctl: add shared variables for range check")
>
> --
> Cheers,
> Stephen Rothwell

Hi,

this is due the merge of:

commit 4bcd4ec1017205644a2697bccbc3b5143f522f5f
Author: Jie Liu <liujie165@huawei.com>
Date:   Tue Apr 16 13:10:09 2019 +0800

    tipc: set sysctl_tipc_rmem and named_timeout right range

I'm making a patch to suppress the warning.

Regards,
-- 
Matteo Croce
per aspera ad upstream

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

* linux-next: build warning after merge of the akpm-current tree
@ 2019-05-30  4:55 Stephen Rothwell
  2019-05-30  9:02 ` Matteo Croce
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2019-05-30  4:55 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Matteo Croce

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]

Hi all,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

net/tipc/sysctl.c:42:12: warning: 'one' defined but not used [-Wunused-variable]
 static int one = 1;
            ^~~
net/tipc/sysctl.c:41:12: warning: 'zero' defined but not used [-Wunused-variable]
 static int zero;
            ^~~~

Introduced by commit

  6a33853c5773 ("proc/sysctl: add shared variables for range check")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2019-04-16  6:52 ` Stephen Rothwell
@ 2019-04-16 22:45   ` Andrew Morton
  0 siblings, 0 replies; 87+ messages in thread
From: Andrew Morton @ 2019-04-16 22:45 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: George Spelvin, Linux Next Mailing List, Linux Kernel Mailing List

On Tue, 16 Apr 2019 16:52:56 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> On Fri, 29 Mar 2019 13:39:14 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the akpm-current tree, today's linux-next build (arm
> > multi_v7_defconfig) produced this warning:
> > 
> > lib/list_sort.c:17:36: warning: 'pure' attribute ignored [-Wattributes]
> >    struct list_head const *, struct list_head const *);
> >                                     ^~~~~~~~~
> > 
> > Introduced by commit
> > 
> >   820c81be5237 ("lib/list_sort: simplify and remove MAX_LIST_LENGTH_BITS")
> 
> I am still getting that warning :-(

Me too and I can't figure it out.

Shrug, I guess we take a pass on it until someone has time/inclination
to revisit it.

--- a/lib/list_sort.c~lib-list_sort-simplify-and-remove-max_list_length_bits-fix
+++ a/lib/list_sort.c
@@ -7,13 +7,7 @@
 #include <linux/list_sort.h>
 #include <linux/list.h>
 
-/*
- * By declaring the compare function with the __pure attribute, we give
- * the compiler more opportunity to optimize.  Ideally, we'd use this in
- * the prototype of list_sort(), but that would involve a lot of churn
- * at all call sites, so just cast the function pointer passed in.
- */
-typedef int __pure __attribute__((nonnull(2,3))) (*cmp_func)(void *,
+typedef int __attribute__((nonnull(2,3))) (*cmp_func)(void *,
 		struct list_head const *, struct list_head const *);
 
 /*
_

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2019-03-29  2:39 Stephen Rothwell
@ 2019-04-16  6:52 ` Stephen Rothwell
  2019-04-16 22:45   ` Andrew Morton
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2019-04-16  6:52 UTC (permalink / raw)
  To: Andrew Morton, George Spelvin
  Cc: Linux Next Mailing List, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 583 bytes --]

Hi all,

On Fri, 29 Mar 2019 13:39:14 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the akpm-current tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
> 
> lib/list_sort.c:17:36: warning: 'pure' attribute ignored [-Wattributes]
>    struct list_head const *, struct list_head const *);
>                                     ^~~~~~~~~
> 
> Introduced by commit
> 
>   820c81be5237 ("lib/list_sort: simplify and remove MAX_LIST_LENGTH_BITS")

I am still getting that warning :-(

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the akpm-current tree
@ 2019-03-29  2:39 Stephen Rothwell
  2019-04-16  6:52 ` Stephen Rothwell
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2019-03-29  2:39 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, George Spelvin

[-- Attachment #1: Type: text/plain, Size: 438 bytes --]

Hi all,

After merging the akpm-current tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

lib/list_sort.c:17:36: warning: 'pure' attribute ignored [-Wattributes]
   struct list_head const *, struct list_head const *);
                                    ^~~~~~~~~

Introduced by commit

  820c81be5237 ("lib/list_sort: simplify and remove MAX_LIST_LENGTH_BITS")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the akpm-current tree
@ 2019-01-31  5:01 Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2019-01-31  5:01 UTC (permalink / raw)
  To: Andrew Morton, James Morris
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Alexey Dobriyan, Casey Schaufler, Kees Cook

[-- Attachment #1: Type: text/plain, Size: 2278 bytes --]

Hi all,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

In file included from arch/x86/include/asm/percpu.h:45,
                 from arch/x86/include/asm/current.h:6,
                 from include/linux/sched.h:12,
                 from include/linux/uaccess.h:5,
                 from fs/proc/base.c:51:
fs/proc/base.c: In function 'proc_smack_attr_dir_lookup':
include/linux/kernel.h:73:25: warning: passing argument 4 of 'proc_pident_lookup' makes pointer from integer without a cast [-Wint-conversion]
 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/proc/base.c:2602:7: note: in expansion of macro 'ARRAY_SIZE'
       ARRAY_SIZE(LSM##_attr_dir_stuff)); \
       ^~~~~~~~~~
fs/proc/base.c:2615:1: note: in expansion of macro 'LSM_DIR_OPS'
 LSM_DIR_OPS(smack);
 ^~~~~~~~~~~
fs/proc/base.c:2454:31: note: expected 'const struct pid_entry *' but argument is of type 'long unsigned int'
       const struct pid_entry *end)
       ~~~~~~~~~~~~~~~~~~~~~~~~^~~

Introduced by commit

  f6e3521a4c5b ("proc: calculate end pointer for /proc/*/* lookup at compile time")

interacting with commit

  6d9c939dbe4d ("procfs: add smack subdir to attrs")

from the security tree.

I have applied the following merge fix patch

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 31 Jan 2019 15:56:56 +1100
Subject: [PATCH] proc: merge fix for proc_pident_lookup() API change

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/proc/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index 4ac7f32c1929..3daca4367d29 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2599,7 +2599,7 @@ static struct dentry *proc_##LSM##_attr_dir_lookup(struct inode *dir, \
 { \
 	return proc_pident_lookup(dir, dentry, \
 				  LSM##_attr_dir_stuff, \
-				  ARRAY_SIZE(LSM##_attr_dir_stuff)); \
+				  LSM##_attr_dir_stuff + ARRAY_SIZE(LSM##_attr_dir_stuff)); \
 } \
 \
 static const struct inode_operations proc_##LSM##_attr_dir_inode_ops = { \
-- 
2.20.1

---
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the akpm-current tree
@ 2018-06-08  4:45 Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2018-06-08  4:45 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, OGAWA Hirofumi

[-- Attachment #1: Type: text/plain, Size: 730 bytes --]

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

In file included from fs/fat/inode.c:24:0:
fs/fat/inode.c: In function '__fat_get_block':
fs/fat/inode.c:163:9: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'sector_t {aka long long unsigned int}' [-Wformat=]
         "invalid FAT chain (i_pos %lld, last_block %ld)",
         ^
fs/fat/fat.h:397:24: note: in definition of macro 'fat_fs_error'
  __fat_fs_error(sb, 1, fmt , ## args)
                        ^~~

Introduced by commit

  3bdac70a1921 ("fat: use fat_fs_error() instead of BUG_ON() in __fat_get_block()")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2018-05-07 16:47     ` Randy Dunlap
@ 2018-05-08 10:48       ` Minchan Kim
  0 siblings, 0 replies; 87+ messages in thread
From: Minchan Kim @ 2018-05-08 10:48 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Stephen Rothwell, Andrew Morton, Linux-Next Mailing List,
	Linux Kernel Mailing List, Greg Kroah-Hartman,
	Sergey Senozhatsky

On Mon, May 07, 2018 at 09:47:54AM -0700, Randy Dunlap wrote:
> On 05/07/2018 07:10 AM, Minchan Kim wrote:
> > On Fri, May 04, 2018 at 08:39:43AM -0700, Randy Dunlap wrote:
> >> On 05/03/2018 09:17 PM, Stephen Rothwell wrote:
> >>> Hi Andrew,
> >>>
> >>> After merging the akpm-current tree, today's linux-next build
> >>> (x86_64_allmodconfig) produced this warning:
> >>>
> >>> drivers/block/zram/zram_drv.c: In function 'read_block_state':
> >>> drivers/block/zram/zram_drv.c:674:16: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 5 has type '__kernel_time_t {aka long int}' [-Wformat=]
> >>>     "%12lu %12llu.%06lu %c%c%c\n",
> >>>            ~~~~~^
> >>>            %12lu
> >>>     (unsigned long)index, ts.tv_sec,
> >>>                           ~~~~~~~~~
> >>>
> >>> Introduced by commit
> >>>
> >>>   827c7dbda8eb ("zram-introduce-zram-memory-tracking-update-fix-fix")
> >>>
> >>
> >> typedef __s64 time64_t;
> >>
> >> struct timespec64 {
> >> 	time64_t	tv_sec;			/* seconds */
> >> 	long		tv_nsec;		/* nanoseconds */
> >> };
> >>
> >> time64_t is signed. Also, %lu on i386 et al is for 32-bit longs.
> >> I guess that "we" will need to cast ts.tv_sec to (s64) and use %lld to print it
> >> in order to satisfy other $arch.
> >>
> >> Andrew, want to add a fix-fix-fix patch?
> > 
> > Thanks for the fix during I am absent, Andrew and Randy.
> > Here goes fix.
> > Andrew please fold this patchset.
> > 
> > From 16569c7abb641930b4e4ec66b4dc2005e6c87be8 Mon Sep 17 00:00:00 2001
> > From: Minchan Kim <minchan@kernel.org>
> > Date: Mon, 7 May 2018 23:00:16 +0900
> > Subject: [PATCH] zram-introduce-zram-memory-tracking-update-fix-fix-fix
> > 
> > fix compile warning
> > 
> > drivers/block/zram/zram_drv.c: In function 'read_block_state':
> > drivers/block/zram/zram_drv.c:674:16: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 5 has type '__kernel_time_t {aka long int}' [-Wformat=]
> >     "%12lu %12llu.%06lu %c%c%c\n",
> >            ~~~~~^
> >            %12lu
> >     (unsigned long)index, ts.tv_sec,
> >                           ~~~~~~~~~
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: Randy Dunlap <rdunlap@infradead.org>
> > Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> > Signed-off-by: Minchan Kim <minchan@kernel.org>
> > ---
> >  drivers/block/zram/zram_drv.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> > index f2f3104b2b48..635307e3238b 100644
> > --- a/drivers/block/zram/zram_drv.c
> > +++ b/drivers/block/zram/zram_drv.c
> > @@ -671,8 +671,8 @@ static ssize_t read_block_state(struct file *file, char __user *buf,
> >  
> >  		ts = ktime_to_timespec64(zram->table[index].ac_time);
> >  		copied = snprintf(kbuf + written, count,
> > -			"%12lu %12llu.%06lu %c%c%c\n",
> > -			(unsigned long)index, ts.tv_sec,
> > +			"%12lu %12lld.%06ld %c%c%c\n",
> > +			(unsigned long)index, (s64)ts.tv_sec,
> >  			ts.tv_nsec / NSEC_PER_USEC,
> >  			zram_test_flag(zram, index, ZRAM_SAME) ? 's' : '.',
> >  			zram_test_flag(zram, index, ZRAM_WB) ? 'w' : '.',
> > 
> 
> 	ssize_t index,
> 
> 	so why not print it with %zd (or %12zd) and skip the cast?

Thanks for the suggestion.
Resend.

Andrew, Could you pick up this?

>From 8af033804a8a7a0538629545957728c48d14d261 Mon Sep 17 00:00:00 2001
From: Minchan Kim <minchan@kernel.org>
Date: Mon, 7 May 2018 23:00:16 +0900
Subject: [PATCH] zram-introduce-zram-memory-tracking-update-fix-fix-fix

fix compile warning and use zd for ssize_t by Randy's suggestion.

drivers/block/zram/zram_drv.c: In function 'read_block_state':
drivers/block/zram/zram_drv.c:674:16: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 5 has type '__kernel_time_t {aka long int}' [-Wformat=]
    "%12lu %12llu.%06lu %c%c%c\n",
           ~~~~~^
           %12lu
    (unsigned long)index, ts.tv_sec,
                          ~~~~~~~~~
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Minchan Kim <minchan@kernel.org>
---
 drivers/block/zram/zram_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index f2f3104b2b48..ceadcd1245b3 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -671,8 +671,8 @@ static ssize_t read_block_state(struct file *file, char __user *buf,
 
 		ts = ktime_to_timespec64(zram->table[index].ac_time);
 		copied = snprintf(kbuf + written, count,
-			"%12lu %12llu.%06lu %c%c%c\n",
-			(unsigned long)index, ts.tv_sec,
+			"%12zd %12lld.%06ld %c%c%c\n",
+			index, (s64)ts.tv_sec,
 			ts.tv_nsec / NSEC_PER_USEC,
 			zram_test_flag(zram, index, ZRAM_SAME) ? 's' : '.',
 			zram_test_flag(zram, index, ZRAM_WB) ? 'w' : '.',
-- 
2.17.0.441.gb46fe60e1d-goog

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

* linux-next: build warning after merge of the akpm-current tree
  2018-05-07 14:10   ` Minchan Kim
@ 2018-05-07 16:47     ` Randy Dunlap
  2018-05-08 10:48       ` Minchan Kim
  0 siblings, 1 reply; 87+ messages in thread
From: Randy Dunlap @ 2018-05-07 16:47 UTC (permalink / raw)
  To: Minchan Kim
  Cc: Stephen Rothwell, Andrew Morton, Linux-Next Mailing List,
	Linux Kernel Mailing List, Greg Kroah-Hartman,
	Sergey Senozhatsky

On 05/07/2018 07:10 AM, Minchan Kim wrote:
> On Fri, May 04, 2018 at 08:39:43AM -0700, Randy Dunlap wrote:
>> On 05/03/2018 09:17 PM, Stephen Rothwell wrote:
>>> Hi Andrew,
>>>
>>> After merging the akpm-current tree, today's linux-next build
>>> (x86_64_allmodconfig) produced this warning:
>>>
>>> drivers/block/zram/zram_drv.c: In function 'read_block_state':
>>> drivers/block/zram/zram_drv.c:674:16: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 5 has type '__kernel_time_t {aka long int}' [-Wformat=]
>>>     "%12lu %12llu.%06lu %c%c%c\n",
>>>            ~~~~~^
>>>            %12lu
>>>     (unsigned long)index, ts.tv_sec,
>>>                           ~~~~~~~~~
>>>
>>> Introduced by commit
>>>
>>>   827c7dbda8eb ("zram-introduce-zram-memory-tracking-update-fix-fix")
>>>
>>
>> typedef __s64 time64_t;
>>
>> struct timespec64 {
>> 	time64_t	tv_sec;			/* seconds */
>> 	long		tv_nsec;		/* nanoseconds */
>> };
>>
>> time64_t is signed. Also, %lu on i386 et al is for 32-bit longs.
>> I guess that "we" will need to cast ts.tv_sec to (s64) and use %lld to print it
>> in order to satisfy other $arch.
>>
>> Andrew, want to add a fix-fix-fix patch?
> 
> Thanks for the fix during I am absent, Andrew and Randy.
> Here goes fix.
> Andrew please fold this patchset.
> 
> From 16569c7abb641930b4e4ec66b4dc2005e6c87be8 Mon Sep 17 00:00:00 2001
> From: Minchan Kim <minchan@kernel.org>
> Date: Mon, 7 May 2018 23:00:16 +0900
> Subject: [PATCH] zram-introduce-zram-memory-tracking-update-fix-fix-fix
> 
> fix compile warning
> 
> drivers/block/zram/zram_drv.c: In function 'read_block_state':
> drivers/block/zram/zram_drv.c:674:16: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 5 has type '__kernel_time_t {aka long int}' [-Wformat=]
>     "%12lu %12llu.%06lu %c%c%c\n",
>            ~~~~~^
>            %12lu
>     (unsigned long)index, ts.tv_sec,
>                           ~~~~~~~~~
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Minchan Kim <minchan@kernel.org>
> ---
>  drivers/block/zram/zram_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index f2f3104b2b48..635307e3238b 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -671,8 +671,8 @@ static ssize_t read_block_state(struct file *file, char __user *buf,
>  
>  		ts = ktime_to_timespec64(zram->table[index].ac_time);
>  		copied = snprintf(kbuf + written, count,
> -			"%12lu %12llu.%06lu %c%c%c\n",
> -			(unsigned long)index, ts.tv_sec,
> +			"%12lu %12lld.%06ld %c%c%c\n",
> +			(unsigned long)index, (s64)ts.tv_sec,
>  			ts.tv_nsec / NSEC_PER_USEC,
>  			zram_test_flag(zram, index, ZRAM_SAME) ? 's' : '.',
>  			zram_test_flag(zram, index, ZRAM_WB) ? 'w' : '.',
> 

	ssize_t index,

	so why not print it with %zd (or %12zd) and skip the cast?

-- 
~Randy

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2018-05-04 15:39 ` Randy Dunlap
@ 2018-05-07 14:10   ` Minchan Kim
  2018-05-07 16:47     ` Randy Dunlap
  0 siblings, 1 reply; 87+ messages in thread
From: Minchan Kim @ 2018-05-07 14:10 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Stephen Rothwell, Andrew Morton, Linux-Next Mailing List,
	Linux Kernel Mailing List, Greg Kroah-Hartman,
	Sergey Senozhatsky

On Fri, May 04, 2018 at 08:39:43AM -0700, Randy Dunlap wrote:
> On 05/03/2018 09:17 PM, Stephen Rothwell wrote:
> > Hi Andrew,
> > 
> > After merging the akpm-current tree, today's linux-next build
> > (x86_64_allmodconfig) produced this warning:
> > 
> > drivers/block/zram/zram_drv.c: In function 'read_block_state':
> > drivers/block/zram/zram_drv.c:674:16: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 5 has type '__kernel_time_t {aka long int}' [-Wformat=]
> >     "%12lu %12llu.%06lu %c%c%c\n",
> >            ~~~~~^
> >            %12lu
> >     (unsigned long)index, ts.tv_sec,
> >                           ~~~~~~~~~
> > 
> > Introduced by commit
> > 
> >   827c7dbda8eb ("zram-introduce-zram-memory-tracking-update-fix-fix")
> > 
> 
> typedef __s64 time64_t;
> 
> struct timespec64 {
> 	time64_t	tv_sec;			/* seconds */
> 	long		tv_nsec;		/* nanoseconds */
> };
> 
> time64_t is signed. Also, %lu on i386 et al is for 32-bit longs.
> I guess that "we" will need to cast ts.tv_sec to (s64) and use %lld to print it
> in order to satisfy other $arch.
> 
> Andrew, want to add a fix-fix-fix patch?

Thanks for the fix during I am absent, Andrew and Randy.
Here goes fix.
Andrew please fold this patchset.

>From 16569c7abb641930b4e4ec66b4dc2005e6c87be8 Mon Sep 17 00:00:00 2001
From: Minchan Kim <minchan@kernel.org>
Date: Mon, 7 May 2018 23:00:16 +0900
Subject: [PATCH] zram-introduce-zram-memory-tracking-update-fix-fix-fix

fix compile warning

drivers/block/zram/zram_drv.c: In function 'read_block_state':
drivers/block/zram/zram_drv.c:674:16: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 5 has type '__kernel_time_t {aka long int}' [-Wformat=]
    "%12lu %12llu.%06lu %c%c%c\n",
           ~~~~~^
           %12lu
    (unsigned long)index, ts.tv_sec,
                          ~~~~~~~~~
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Minchan Kim <minchan@kernel.org>
---
 drivers/block/zram/zram_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index f2f3104b2b48..635307e3238b 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -671,8 +671,8 @@ static ssize_t read_block_state(struct file *file, char __user *buf,
 
 		ts = ktime_to_timespec64(zram->table[index].ac_time);
 		copied = snprintf(kbuf + written, count,
-			"%12lu %12llu.%06lu %c%c%c\n",
-			(unsigned long)index, ts.tv_sec,
+			"%12lu %12lld.%06ld %c%c%c\n",
+			(unsigned long)index, (s64)ts.tv_sec,
 			ts.tv_nsec / NSEC_PER_USEC,
 			zram_test_flag(zram, index, ZRAM_SAME) ? 's' : '.',
 			zram_test_flag(zram, index, ZRAM_WB) ? 'w' : '.',
-- 
2.17.0.441.gb46fe60e1d-goog

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2018-05-04  4:17 Stephen Rothwell
@ 2018-05-04 15:39 ` Randy Dunlap
  2018-05-07 14:10   ` Minchan Kim
  0 siblings, 1 reply; 87+ messages in thread
From: Randy Dunlap @ 2018-05-04 15:39 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Greg Kroah-Hartman, Minchan Kim, Sergey Senozhatsky

On 05/03/2018 09:17 PM, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm-current tree, today's linux-next build
> (x86_64_allmodconfig) produced this warning:
> 
> drivers/block/zram/zram_drv.c: In function 'read_block_state':
> drivers/block/zram/zram_drv.c:674:16: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 5 has type '__kernel_time_t {aka long int}' [-Wformat=]
>     "%12lu %12llu.%06lu %c%c%c\n",
>            ~~~~~^
>            %12lu
>     (unsigned long)index, ts.tv_sec,
>                           ~~~~~~~~~
> 
> Introduced by commit
> 
>   827c7dbda8eb ("zram-introduce-zram-memory-tracking-update-fix-fix")
> 

typedef __s64 time64_t;

struct timespec64 {
	time64_t	tv_sec;			/* seconds */
	long		tv_nsec;		/* nanoseconds */
};

time64_t is signed. Also, %lu on i386 et al is for 32-bit longs.
I guess that "we" will need to cast ts.tv_sec to (s64) and use %lld to print it
in order to satisfy other $arch.

Andrew, want to add a fix-fix-fix patch?

-- 
~Randy

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

* linux-next: build warning after merge of the akpm-current tree
@ 2018-05-04  4:17 Stephen Rothwell
  2018-05-04 15:39 ` Randy Dunlap
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2018-05-04  4:17 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Greg Kroah-Hartman, Minchan Kim, Randy Dunlap,
	Sergey Senozhatsky

[-- Attachment #1: Type: text/plain, Size: 650 bytes --]

Hi Andrew,

After merging the akpm-current tree, today's linux-next build
(x86_64_allmodconfig) produced this warning:

drivers/block/zram/zram_drv.c: In function 'read_block_state':
drivers/block/zram/zram_drv.c:674:16: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 5 has type '__kernel_time_t {aka long int}' [-Wformat=]
    "%12lu %12llu.%06lu %c%c%c\n",
           ~~~~~^
           %12lu
    (unsigned long)index, ts.tv_sec,
                          ~~~~~~~~~

Introduced by commit

  827c7dbda8eb ("zram-introduce-zram-memory-tracking-update-fix-fix")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the akpm-current tree
@ 2018-04-06  4:53 Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2018-04-06  4:53 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Johannes Weiner

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

mm/memcontrol.c: In function 'memory_events_show':
mm/memcontrol.c:5453:23: warning: array subscript is above array bounds [-Warray-bounds]
      atomic_long_read(&memcg->memory_events[OOM_KILL]));
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Introduced by commit

  725844c87a0d ("mm: memcg: make sure memory.events is uptodate when waking pollers")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the akpm-current tree
@ 2018-01-02  7:04 Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2018-01-02  7:04 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux-Next Mailing List, Linux Kernel Mailing List

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

WARNING: vmlinux: 'abort' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'abort' exported twice. Previous export was in vmlinux

Introduced by commit

  3ff677e9abdf ("kernel/exit.c: export abort() to modules")

EXPORT_SYMBOL(abort) already exists in

arch/arc/kernel/traps.c
arch/arm/kernel/traps.c
arch/m32r/kernel/traps.c
arch/unicore32/kernel/traps.c

-- 
Cheers,
Stephen Rothwell

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

* linux-next: build warning after merge of the akpm-current tree
@ 2017-12-15  2:48 Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2017-12-15  2:48 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Yang Shi

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

mm/khugepaged.c: In function 'khugepaged':
mm/khugepaged.c:1757:31: warning: 'vma' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (khugepaged_test_exit(mm) || !vma) {
                               ^
mm/khugepaged.c:1659:25: note: 'vma' was declared here
  struct vm_area_struct *vma;
                         ^

Introduced by commit

  0951b59acf3a ("mm: thp: use down_read_trylock() in khugepaged to avoid long block")

-- 
Cheers,
Stephen Rothwell

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

* linux-next: build warning after merge of the akpm-current tree
@ 2017-11-23  2:01 Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2017-11-23  2:01 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Tetsuo Handa

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

fs/super.c: In function 'sget_userns':
fs/super.c:521:2: warning: ignoring return value of 'register_shrinker', declared with attribute warn_unused_result [-Wunused-result]
  register_shrinker(&s->s_shrink);
  ^
drivers/gpu/drm/ttm/ttm_page_alloc.c: In function 'ttm_pool_mm_shrink_init':
drivers/gpu/drm/ttm/ttm_page_alloc.c:451:2: warning: ignoring return value of 'register_shrinker', declared with attribute warn_unused_result [-Wunused-result]
  register_shrinker(&manager->mm_shrink);
  ^
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c: In function 'ttm_dma_pool_mm_shrink_init':
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c:1185:2: warning: ignoring return value of 'register_shrinker', declared with attribute warn_unused_result [-Wunused-result]
  register_shrinker(&manager->mm_shrink);
  ^

Introduced by commit

  488251e1e892 ("mm,vmscan: mark register_shrinker() as __must_check")

Yes, I realise that it is meant to flush the users out ...

-- 
Cheers,
Stephen Rothwell

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

* linux-next: build warning after merge of the akpm-current tree
@ 2017-11-13  5:54 Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2017-11-13  5:54 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Yury Norov

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

In file included from include/linux/printk.h:7:0,
                 from include/linux/kernel.h:14,
                 from lib/test_find_bit.c:28:
lib/test_find_bit.c: In function 'test_find_first_bit':
include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'cycles_t {aka long long unsigned int}' [-Wformat=]
 #define KERN_SOH "\001"  /* ASCII Start Of Header */
                  ^
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
 #define KERN_ERR KERN_SOH "3" /* error conditions */
                  ^
include/linux/printk.h:300:9: note: in expansion of macro 'KERN_ERR'
  printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         ^
lib/test_find_bit.c:54:2: note: in expansion of macro 'pr_err'
  pr_err("find_first_bit:\t\t%ld cycles,\t%ld iterations\n", cycles, cnt);
  ^
lib/test_find_bit.c: In function 'test_find_next_bit':
include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'cycles_t {aka long long unsigned int}' [-Wformat=]
 #define KERN_SOH "\001"  /* ASCII Start Of Header */
                  ^
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
 #define KERN_ERR KERN_SOH "3" /* error conditions */
                  ^
include/linux/printk.h:300:9: note: in expansion of macro 'KERN_ERR'
  printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         ^
lib/test_find_bit.c:68:2: note: in expansion of macro 'pr_err'
  pr_err("find_next_bit:\t\t%ld cycles,\t%ld iterations\n", cycles, cnt);
  ^
lib/test_find_bit.c: In function 'test_find_next_zero_bit':
include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'cycles_t {aka long long unsigned int}' [-Wformat=]
 #define KERN_SOH "\001"  /* ASCII Start Of Header */
                  ^
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
 #define KERN_ERR KERN_SOH "3" /* error conditions */
                  ^
include/linux/printk.h:300:9: note: in expansion of macro 'KERN_ERR'
  printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         ^
lib/test_find_bit.c:82:2: note: in expansion of macro 'pr_err'
  pr_err("find_next_zero_bit:\t%ld cycles,\t%ld iterations\n",
  ^
lib/test_find_bit.c: In function 'test_find_last_bit':
include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'cycles_t {aka long long unsigned int}' [-Wformat=]
 #define KERN_SOH "\001"  /* ASCII Start Of Header */
                  ^
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
 #define KERN_ERR KERN_SOH "3" /* error conditions */
                  ^
include/linux/printk.h:300:9: note: in expansion of macro 'KERN_ERR'
  printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         ^
lib/test_find_bit.c:102:2: note: in expansion of macro 'pr_err'
  pr_err("find_last_bit:\t\t%ld cycles,\t%ld iterations\n", cycles, cnt);
  ^

Introduced by commit

  09588b1f1d58 ("lib: test module for find_*_bit() functions")

-- 
Cheers,
Stephen Rothwell

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

* linux-next: build warning after merge of the akpm-current tree
@ 2017-08-01  5:22 Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2017-08-01  5:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Michal Hocko

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

fs/proc/task_mmu.c: In function 'show_map_vma':
fs/proc/task_mmu.c:285:28: warning: unused variable 'priv' [-Wunused-variable]
  struct proc_maps_private *priv = m->private;
                            ^

Introduced by commit

  14ccc3193225 ("fs, proc: remove priv argument from is_stack")

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2017-05-26 10:16 ` Jeff Layton
@ 2017-05-26 11:28   ` Dave Kleikamp
  0 siblings, 0 replies; 87+ messages in thread
From: Dave Kleikamp @ 2017-05-26 11:28 UTC (permalink / raw)
  To: Jeff Layton, Stephen Rothwell, Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Ross Zwisler,
	Jan Kara, Matthew Wilcox, Christoph Hellwig

On 05/26/2017 05:16 AM, Jeff Layton wrote:
> On Fri, 2017-05-26 at 12:43 +1000, Stephen Rothwell wrote:
>> Hi Andrew,
>>
>> After merging the akpm-current tree, today's linux-next build (powerpc
>> ppc64_defconfig) produced this warning:
>>
>> fs/jfs/jfs_metapage.c: In function 'force_metapage':
>> fs/jfs/jfs_metapage.c:714:2: warning: ignoring return value of 'write_one_page', declared with attribute warn_unused_result [-Wunused-result]
>>   write_one_page(page);
>>   ^
>> fs/jfs/jfs_metapage.c: In function 'release_metapage':
>> fs/jfs/jfs_metapage.c:759:4: warning: ignoring return value of 'write_one_page', declared with attribute warn_unused_result [-Wunused-result]
>>     write_one_page(page);
>>     ^
>>
>> Introduced by commit
>>
>>   f8652aebee02 ("mm: drop "wait" parameter from write_one_page()")
>>
>> These call sites were updated for the droppping of the argument, but
>> not for the addition of __must_check :-(
>>
> 
> (cc'ing Dave...)
> 
> Yeah, that's a known issue. When Willy reviewed the patch originally he
> asked me to add a __must_check there so that JFS would pick up some
> warnings for this.
> 
> JFS really ought to check the return code there and do something sane
> with it. Dave?

This is true. I promised to do something about it. I'll try to get a
patch out later today.

Dave

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2017-05-26  2:43 Stephen Rothwell
@ 2017-05-26 10:16 ` Jeff Layton
  2017-05-26 11:28   ` Dave Kleikamp
  0 siblings, 1 reply; 87+ messages in thread
From: Jeff Layton @ 2017-05-26 10:16 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton, Dave Kleikamp
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Ross Zwisler,
	Jan Kara, Matthew Wilcox, Christoph Hellwig

On Fri, 2017-05-26 at 12:43 +1000, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm-current tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> fs/jfs/jfs_metapage.c: In function 'force_metapage':
> fs/jfs/jfs_metapage.c:714:2: warning: ignoring return value of 'write_one_page', declared with attribute warn_unused_result [-Wunused-result]
>   write_one_page(page);
>   ^
> fs/jfs/jfs_metapage.c: In function 'release_metapage':
> fs/jfs/jfs_metapage.c:759:4: warning: ignoring return value of 'write_one_page', declared with attribute warn_unused_result [-Wunused-result]
>     write_one_page(page);
>     ^
> 
> Introduced by commit
> 
>   f8652aebee02 ("mm: drop "wait" parameter from write_one_page()")
> 
> These call sites were updated for the droppping of the argument, but
> not for the addition of __must_check :-(
> 

(cc'ing Dave...)

Yeah, that's a known issue. When Willy reviewed the patch originally he
asked me to add a __must_check there so that JFS would pick up some
warnings for this.

JFS really ought to check the return code there and do something sane
with it. Dave?

-- 
Jeff Layton <jlayton@redhat.com>

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

* linux-next: build warning after merge of the akpm-current tree
@ 2017-05-26  2:43 Stephen Rothwell
  2017-05-26 10:16 ` Jeff Layton
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2017-05-26  2:43 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Jeff Layton,
	Ross Zwisler, Jan Kara, Matthew Wilcox, Christoph Hellwig

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

fs/jfs/jfs_metapage.c: In function 'force_metapage':
fs/jfs/jfs_metapage.c:714:2: warning: ignoring return value of 'write_one_page', declared with attribute warn_unused_result [-Wunused-result]
  write_one_page(page);
  ^
fs/jfs/jfs_metapage.c: In function 'release_metapage':
fs/jfs/jfs_metapage.c:759:4: warning: ignoring return value of 'write_one_page', declared with attribute warn_unused_result [-Wunused-result]
    write_one_page(page);
    ^

Introduced by commit

  f8652aebee02 ("mm: drop "wait" parameter from write_one_page()")

These call sites were updated for the droppping of the argument, but
not for the addition of __must_check :-(

-- 
Cheers,
Stephen Rothwell

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

* linux-next: build warning after merge of the akpm-current tree
@ 2017-05-19  4:44 Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2017-05-19  4:44 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Michal Hocko

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

mm/vmstat.c: In function 'pagetypeinfo_showblockcount_print':
mm/vmstat.c:1230:8: warning: 'page' may be used uninitialized in this function [-Wmaybe-uninitialized]
   if (!memmap_valid_within(pfn, page, zone))
        ^

Introduced by commit

  36c7473b3c85 ("mm, vmstat: skip reporting offline pages in pagetypeinfo")

That really doesn't look good.

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2017-05-15  4:02 ` Xunlei Pang
@ 2017-05-15  5:07   ` Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2017-05-15  5:07 UTC (permalink / raw)
  To: Xunlei Pang
  Cc: xlpang, Andrew Morton, Linux-Next Mailing List,
	Linux Kernel Mailing List

Hi Xunlei,

On Mon, 15 May 2017 12:02:18 +0800 Xunlei Pang <xpang@redhat.com> wrote:
>
> The following patch will fix it, do you want to me to send it out separately? or help merge it into
> fc7d2b44367f ("powerpc/fadump: use the correct VMCOREINFO_NOTE_SIZE for phdr") directly?

Andrew normally takes these as separate patches and then merges them
before sending them on.

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2017-05-15  1:56 Stephen Rothwell
@ 2017-05-15  4:02 ` Xunlei Pang
  2017-05-15  5:07   ` Stephen Rothwell
  0 siblings, 1 reply; 87+ messages in thread
From: Xunlei Pang @ 2017-05-15  4:02 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Xunlei Pang

On 05/15/2017 at 09:56 AM, Stephen Rothwell wrote:
> Hi Andrew,
>
> After merging the akpm-current tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
>
> In file included from include/asm-generic/bug.h:15:0,
>                  from arch/arm/include/asm/bug.h:59,
>                  from include/linux/bug.h:4,
>                  from include/linux/elfcore.h:5,
>                  from include/linux/crash_core.h:5,
>                  from kernel/crash_core.c:9:
> kernel/crash_core.c: In function 'vmcoreinfo_append_str':
> include/linux/kernel.h:757:16: warning: comparison of distinct pointer types lacks a cast
>   (void) (&min1 == &min2);   \
>                 ^
> include/linux/kernel.h:760:2: note: in expansion of macro '__min'
>   __min(typeof(x), typeof(y),   \
>   ^
> kernel/crash_core.c:360:6: note: in expansion of macro 'min'
>   r = min(r, VMCOREINFO_BYTES - vmcoreinfo_size);
>       ^
>
> Introduced by commit
>
>   fc7d2b44367f ("powerpc/fadump: use the correct VMCOREINFO_NOTE_SIZE for phdr")
>

Hi Stephen/Andrew,

Sorry for the trouble.

The following patch will fix it, do you want to me to send it out separately? or help merge it into
fc7d2b44367f ("powerpc/fadump: use the correct VMCOREINFO_NOTE_SIZE for phdr") directly?

Thanks,
Xunlei

===========================================

From: Xunlei Pang <xlpang@redhat.com>
Subject: [PATCH] crash: Fix build warning

linux-next build (arm multi_v7_defconfig) produced this warning:

In file included from include/asm-generic/bug.h:15:0,
                 from arch/arm/include/asm/bug.h:59,
                 from include/linux/bug.h:4,
                 from include/linux/elfcore.h:5,
                 from include/linux/crash_core.h:5,
                 from kernel/crash_core.c:9:
kernel/crash_core.c: In function 'vmcoreinfo_append_str':
include/linux/kernel.h:757:16: warning: comparison of distinct pointer
types lacks a cast
  (void) (&min1 == &min2);   \
                ^
include/linux/kernel.h:760:2: note: in expansion of macro '__min'
  __min(typeof(x), typeof(y),   \
  ^
kernel/crash_core.c:360:6: note: in expansion of macro 'min'
  r = min(r, VMCOREINFO_BYTES - vmcoreinfo_size);
      ^

This patch fixes it.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
---
 kernel/crash_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/crash_core.c b/kernel/crash_core.c
index 4a4a4ba..6db80fc 100644
--- a/kernel/crash_core.c
+++ b/kernel/crash_core.c
@@ -357,7 +357,7 @@ void vmcoreinfo_append_str(const char *fmt, ...)
     r = vscnprintf(buf, sizeof(buf), fmt, args);
     va_end(args);
 
-    r = min(r, VMCOREINFO_BYTES - vmcoreinfo_size);
+    r = min(r, (size_t)VMCOREINFO_BYTES - vmcoreinfo_size);
 
     memcpy(&vmcoreinfo_data[vmcoreinfo_size], buf, r);
 
-- 
1.8.3.1

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

* linux-next: build warning after merge of the akpm-current tree
@ 2017-05-15  1:56 Stephen Rothwell
  2017-05-15  4:02 ` Xunlei Pang
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2017-05-15  1:56 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Xunlei Pang

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

In file included from include/asm-generic/bug.h:15:0,
                 from arch/arm/include/asm/bug.h:59,
                 from include/linux/bug.h:4,
                 from include/linux/elfcore.h:5,
                 from include/linux/crash_core.h:5,
                 from kernel/crash_core.c:9:
kernel/crash_core.c: In function 'vmcoreinfo_append_str':
include/linux/kernel.h:757:16: warning: comparison of distinct pointer types lacks a cast
  (void) (&min1 == &min2);   \
                ^
include/linux/kernel.h:760:2: note: in expansion of macro '__min'
  __min(typeof(x), typeof(y),   \
  ^
kernel/crash_core.c:360:6: note: in expansion of macro 'min'
  r = min(r, VMCOREINFO_BYTES - vmcoreinfo_size);
      ^

Introduced by commit

  fc7d2b44367f ("powerpc/fadump: use the correct VMCOREINFO_NOTE_SIZE for phdr")

-- 
Cheers,
Stephen Rothwell

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

* linux-next: build warning after merge of the akpm-current tree
@ 2017-02-02  6:49 Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2017-02-02  6:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Dave Jiang, Matthew Wilcox

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (powerpc
ppc64_defconfig and x86_64 allmodconfig) produced this warning:

fs/ext4/file.c:279:1: warning: 'ext4_dax_huge_fault' defined but not used [-Wunused-function]
 ext4_dax_huge_fault(struct vm_fault *vmf)
 ^

Introduced by commit

  80a841811260 ("mm,fs,dax: change ->pmd_fault to ->huge_fault")

Looks like the replacement in ext4_dax_vm_ops may be incorrect?

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2016-11-09 21:21   ` Andrew Morton
@ 2016-11-10  2:56     ` Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2016-11-10  2:56 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Huang Shijie, linux-next, linux-kernel, nd

Hi Andrew,

On Wed, 9 Nov 2016 13:21:53 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Wed, 9 Nov 2016 15:18:24 +0800 Huang Shijie <shijie.huang@arm.com> wrote:
> 
> > On Wed, Nov 09, 2016 at 03:10:06PM +1100, Stephen Rothwell wrote:
> > Hi Stephen,  
> > > Hi Andrew,
> > > 
> > > After merging the akpm-current tree, today's linux-next build (powerpc
> > > ppc64_defconfig) produced this warning:
> > > 
> > > mm/hugetlb.c:1166:21: warning: 'alloc_gigantic_page' defined but not used [-Wunused-function]
> > >  static struct page *alloc_gigantic_page(int nid, unsigned int order)  
> > The warning should be fixed by the patch (or next version of this patch):
> >   http://marc.info/?l=linux-mm&m=147867535926059&w=2	  
> 
> I'll drop "mm/hugetlb.c: rename some allocation functions" for now. 
> Please change it to fix this warning then add it to the surplus-page
> series when resending that.

I have dropped it from linux-next today.

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2016-11-09  7:18 ` Huang Shijie
@ 2016-11-09 21:21   ` Andrew Morton
  2016-11-10  2:56     ` Stephen Rothwell
  0 siblings, 1 reply; 87+ messages in thread
From: Andrew Morton @ 2016-11-09 21:21 UTC (permalink / raw)
  To: Huang Shijie; +Cc: Stephen Rothwell, linux-next, linux-kernel, nd

On Wed, 9 Nov 2016 15:18:24 +0800 Huang Shijie <shijie.huang@arm.com> wrote:

> On Wed, Nov 09, 2016 at 03:10:06PM +1100, Stephen Rothwell wrote:
> Hi Stephen,
> > Hi Andrew,
> > 
> > After merging the akpm-current tree, today's linux-next build (powerpc
> > ppc64_defconfig) produced this warning:
> > 
> > mm/hugetlb.c:1166:21: warning: 'alloc_gigantic_page' defined but not used [-Wunused-function]
> >  static struct page *alloc_gigantic_page(int nid, unsigned int order)
> The warning should be fixed by the patch (or next version of this patch):
>   http://marc.info/?l=linux-mm&m=147867535926059&w=2	

I'll drop "mm/hugetlb.c: rename some allocation functions" for now. 
Please change it to fix this warning then add it to the surplus-page
series when resending that.

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2016-11-09  4:10 Stephen Rothwell
@ 2016-11-09  7:18 ` Huang Shijie
  2016-11-09 21:21   ` Andrew Morton
  0 siblings, 1 reply; 87+ messages in thread
From: Huang Shijie @ 2016-11-09  7:18 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel, nd

On Wed, Nov 09, 2016 at 03:10:06PM +1100, Stephen Rothwell wrote:
Hi Stephen,
> Hi Andrew,
> 
> After merging the akpm-current tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> mm/hugetlb.c:1166:21: warning: 'alloc_gigantic_page' defined but not used [-Wunused-function]
>  static struct page *alloc_gigantic_page(int nid, unsigned int order)
The warning should be fixed by the patch (or next version of this patch):
  http://marc.info/?l=linux-mm&m=147867535926059&w=2	


Thanks
Huang Shijie

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

* linux-next: build warning after merge of the akpm-current tree
@ 2016-11-09  4:10 Stephen Rothwell
  2016-11-09  7:18 ` Huang Shijie
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2016-11-09  4:10 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Huang Shijie

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

mm/hugetlb.c:1166:21: warning: 'alloc_gigantic_page' defined but not used [-Wunused-function]
 static struct page *alloc_gigantic_page(int nid, unsigned int order)
                     ^

Introduced by commit

  4acc8ccc3c57 ("mm/hugetlb.c: rename some allocation functions")

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2016-06-23  6:53 Stephen Rothwell
@ 2016-06-23 14:00 ` Mel Gorman
  0 siblings, 0 replies; 87+ messages in thread
From: Mel Gorman @ 2016-06-23 14:00 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel

On Thu, Jun 23, 2016 at 04:53:21PM +1000, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm-current tree, today's linux-next build (powerpc
> ppc64_defconfig and x86_64 allmodconfig) produced this warning:
> 

I asked that Andrew drop the patch series that introduced this problem.
It's fixed in a private tree but it's not ready for reposting yet.

-- 
Mel Gorman
SUSE Labs

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

* linux-next: build warning after merge of the akpm-current tree
@ 2016-06-23  6:53 Stephen Rothwell
  2016-06-23 14:00 ` Mel Gorman
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2016-06-23  6:53 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Mel Gorman

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (powerpc
ppc64_defconfig and x86_64 allmodconfig) produced this warning:

drivers/base/node.c: In function 'node_read_meminfo':
drivers/base/node.c:127:31: warning: passing argument 1 of 'node_page_state' makes pointer from integer without a cast [-Wint-conversion]
          nid, node_page_state(nid, NR_KERNEL_STACK) *
                               ^
In file included from include/linux/mm.h:999:0,
                 from drivers/base/node.c:7:
include/linux/vmstat.h:200:22: note: expected 'struct pglist_data *' but argument is of type 'int'
 extern unsigned long node_page_state(struct pglist_data *pgdat,
                      ^

Introduced by commit

  2bfac6c1ec44 ("mm, vmstat: add infrastructure for per-node vmstats")

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2016-05-27  3:07 Stephen Rothwell
@ 2016-05-27 19:53 ` Andrew Morton
  0 siblings, 0 replies; 87+ messages in thread
From: Andrew Morton @ 2016-05-27 19:53 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Michal Hocko

On Fri, 27 May 2016 13:07:10 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> 
> After merging the akpm-current tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
> 
> mm/oom_kill.c: In function '__oom_reap_task':
> mm/oom_kill.c:537:2: warning: 'mm' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   mmput_async(mm);
>   ^
> 
> Introduced by commit
> 
>   df1e2f56632d ("oom_reaper: close race with exiting task")
> 
> This is real - the first "goto unlock_oom" is before "mm" has been
> assigned.

Yup, thanks.

From: Andrew Morton <akpm@linux-foundation.org>
Subject: oom_reaper-close-race-with-exiting-task-fix

fix use of unused `mm', Per Stephen

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/oom_kill.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff -puN mm/oom_kill.c~oom_reaper-close-race-with-exiting-task-fix mm/oom_kill.c
--- a/mm/oom_kill.c~oom_reaper-close-race-with-exiting-task-fix
+++ a/mm/oom_kill.c
@@ -443,7 +443,7 @@ static bool __oom_reap_task(struct task_
 {
 	struct mmu_gather tlb;
 	struct vm_area_struct *vma;
-	struct mm_struct *mm;
+	struct mm_struct *mm = NULL;
 	struct task_struct *p;
 	struct zap_details details = {.check_swap_entries = true,
 				      .ignore_dirty = true};
@@ -534,7 +534,8 @@ unlock_oom:
 	 * different context because we shouldn't risk we get stuck there and
 	 * put the oom_reaper out of the way.
 	 */
-	mmput_async(mm);
+	if (mm)
+		mmput_async(mm);
 	return ret;
 }
 
_

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

* linux-next: build warning after merge of the akpm-current tree
@ 2016-05-27  3:07 Stephen Rothwell
  2016-05-27 19:53 ` Andrew Morton
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2016-05-27  3:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Michal Hocko

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

mm/oom_kill.c: In function '__oom_reap_task':
mm/oom_kill.c:537:2: warning: 'mm' may be used uninitialized in this function [-Wmaybe-uninitialized]
  mmput_async(mm);
  ^

Introduced by commit

  df1e2f56632d ("oom_reaper: close race with exiting task")

This is real - the first "goto unlock_oom" is before "mm" has been
assigned.

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2016-04-29 14:03   ` Josh Poimboeuf
@ 2016-04-30  5:52     ` Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2016-04-30  5:52 UTC (permalink / raw)
  To: Josh Poimboeuf
  Cc: Andrew Morton, linux-next, linux-kernel, Arnd Bergmann, Quinn Tran

Hi Josh,

On Fri, 29 Apr 2016 09:03:42 -0500 Josh Poimboeuf <jpoimboe@redhat.com> wrote:
>
> On Fri, Apr 29, 2016 at 08:32:19AM -0500, Josh Poimboeuf wrote:
> > On Fri, Apr 29, 2016 at 04:45:43PM +1000, Stephen Rothwell wrote:  
> > > Hi Andrew,
> > > 
> > > After merging the akpm-current tree, today's linux-next build (x86_64
> > > allmodconfig) produced this warning:
> > > 
> > > drivers/scsi/ipr.c: In function 'ipr_show_device_id':
> > > drivers/scsi/ipr.c:4462:34: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
> > >    len = snprintf(buf, PAGE_SIZE, "0x%llx\n", be64_to_cpu(res->dev_id));
> > >                                   ^
> > > 
> > > Lots and lots like this :-(
> > > 
> > > Probably introduced by commit
> > > 
> > >   eef17fb79096 ("byteswap: try to avoid __builtin_constant_p gcc bug")
> > > 
> > > I guess __builtin_bswap64() has type "unsigned long int" :-(  
> > 
> > Hm, I suppose this is cross-compiled on a powerpc host?
> > 
> > We probably need to add a (__u64) cast to the return value of
> > __builtin_bswap64(), like:
> > 
> > diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h
> > index de56fd5..d737804 100644
> > --- a/include/uapi/linux/swab.h
> > +++ b/include/uapi/linux/swab.h
> > @@ -123,7 +123,7 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val)
> >   * @x: value to byteswap
> >   */
> >  #ifdef __HAVE_BUILTIN_BSWAP64__
> > -#define __swab64(x) __builtin_bswap64((__u64)(x))
> > +#define __swab64(x) (__u64)__builtin_bswap64((__u64)(x))
> >  #else
> >  #define __swab64(x)				\
> >  	(__builtin_constant_p((__u64)(x)) ?	\  
> 
> 
> Never mind about cross-compiling on powerpc, this has nothing to do with
> that.  But the above patch does seem to fix it.

Thanks.  I have added Andrew's tidied up version to linux-next to
replace the revert.

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2016-04-29 13:32 ` Josh Poimboeuf
@ 2016-04-29 14:03   ` Josh Poimboeuf
  2016-04-30  5:52     ` Stephen Rothwell
  0 siblings, 1 reply; 87+ messages in thread
From: Josh Poimboeuf @ 2016-04-29 14:03 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Arnd Bergmann, Quinn Tran

On Fri, Apr 29, 2016 at 08:32:19AM -0500, Josh Poimboeuf wrote:
> On Fri, Apr 29, 2016 at 04:45:43PM +1000, Stephen Rothwell wrote:
> > Hi Andrew,
> > 
> > After merging the akpm-current tree, today's linux-next build (x86_64
> > allmodconfig) produced this warning:
> > 
> > drivers/scsi/ipr.c: In function 'ipr_show_device_id':
> > drivers/scsi/ipr.c:4462:34: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
> >    len = snprintf(buf, PAGE_SIZE, "0x%llx\n", be64_to_cpu(res->dev_id));
> >                                   ^
> > 
> > Lots and lots like this :-(
> > 
> > Probably introduced by commit
> > 
> >   eef17fb79096 ("byteswap: try to avoid __builtin_constant_p gcc bug")
> > 
> > I guess __builtin_bswap64() has type "unsigned long int" :-(
> 
> Hm, I suppose this is cross-compiled on a powerpc host?
> 
> We probably need to add a (__u64) cast to the return value of
> __builtin_bswap64(), like:
> 
> diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h
> index de56fd5..d737804 100644
> --- a/include/uapi/linux/swab.h
> +++ b/include/uapi/linux/swab.h
> @@ -123,7 +123,7 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val)
>   * @x: value to byteswap
>   */
>  #ifdef __HAVE_BUILTIN_BSWAP64__
> -#define __swab64(x) __builtin_bswap64((__u64)(x))
> +#define __swab64(x) (__u64)__builtin_bswap64((__u64)(x))
>  #else
>  #define __swab64(x)				\
>  	(__builtin_constant_p((__u64)(x)) ?	\


Never mind about cross-compiling on powerpc, this has nothing to do with
that.  But the above patch does seem to fix it.

-- 
Josh

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2016-04-29  6:45 Stephen Rothwell
  2016-04-29  6:55 ` Stephen Rothwell
@ 2016-04-29 13:32 ` Josh Poimboeuf
  2016-04-29 14:03   ` Josh Poimboeuf
  1 sibling, 1 reply; 87+ messages in thread
From: Josh Poimboeuf @ 2016-04-29 13:32 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Arnd Bergmann, Quinn Tran

On Fri, Apr 29, 2016 at 04:45:43PM +1000, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm-current tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> drivers/scsi/ipr.c: In function 'ipr_show_device_id':
> drivers/scsi/ipr.c:4462:34: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
>    len = snprintf(buf, PAGE_SIZE, "0x%llx\n", be64_to_cpu(res->dev_id));
>                                   ^
> 
> Lots and lots like this :-(
> 
> Probably introduced by commit
> 
>   eef17fb79096 ("byteswap: try to avoid __builtin_constant_p gcc bug")
> 
> I guess __builtin_bswap64() has type "unsigned long int" :-(

Hm, I suppose this is cross-compiled on a powerpc host?

We probably need to add a (__u64) cast to the return value of
__builtin_bswap64(), like:

diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h
index de56fd5..d737804 100644
--- a/include/uapi/linux/swab.h
+++ b/include/uapi/linux/swab.h
@@ -123,7 +123,7 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val)
  * @x: value to byteswap
  */
 #ifdef __HAVE_BUILTIN_BSWAP64__
-#define __swab64(x) __builtin_bswap64((__u64)(x))
+#define __swab64(x) (__u64)__builtin_bswap64((__u64)(x))
 #else
 #define __swab64(x)				\
 	(__builtin_constant_p((__u64)(x)) ?	\

-- 
Josh

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2016-04-29  6:45 Stephen Rothwell
@ 2016-04-29  6:55 ` Stephen Rothwell
  2016-04-29 13:32 ` Josh Poimboeuf
  1 sibling, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2016-04-29  6:55 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Arnd Bergmann, Josh Poimboeuf, Quinn Tran

Hi All,

On Fri, 29 Apr 2016 16:45:43 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the akpm-current tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> drivers/scsi/ipr.c: In function 'ipr_show_device_id':
> drivers/scsi/ipr.c:4462:34: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
>    len = snprintf(buf, PAGE_SIZE, "0x%llx\n", be64_to_cpu(res->dev_id));
>                                   ^
> 
> Lots and lots like this :-(
> 
> Introduced by commit
> 
>   eef17fb79096 ("byteswap: try to avoid __builtin_constant_p gcc bug")
> 
> I guess __builtin_bswap64() has type "unsigned long int" :-(

So, I have reverted that commit for today ... it produces too many
warnings :-(

-- 
Cheers,
Stephen Rothwell

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

* linux-next: build warning after merge of the akpm-current tree
@ 2016-04-29  6:45 Stephen Rothwell
  2016-04-29  6:55 ` Stephen Rothwell
  2016-04-29 13:32 ` Josh Poimboeuf
  0 siblings, 2 replies; 87+ messages in thread
From: Stephen Rothwell @ 2016-04-29  6:45 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Arnd Bergmann, Josh Poimboeuf, Quinn Tran

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/scsi/ipr.c: In function 'ipr_show_device_id':
drivers/scsi/ipr.c:4462:34: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
   len = snprintf(buf, PAGE_SIZE, "0x%llx\n", be64_to_cpu(res->dev_id));
                                  ^

Lots and lots like this :-(

Probably introduced by commit

  eef17fb79096 ("byteswap: try to avoid __builtin_constant_p gcc bug")

I guess __builtin_bswap64() has type "unsigned long int" :-(

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2015-07-16  5:26 Stephen Rothwell
@ 2015-07-16 23:00 ` Andrew Morton
  0 siblings, 0 replies; 87+ messages in thread
From: Andrew Morton @ 2015-07-16 23:00 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Vladimir Zapolskiy, Greg Kroah-Hartman

On Thu, 16 Jul 2015 15:26:00 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> 
> After merging the akpm-current tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
> 
> lib/genalloc.c: In function 'gen_pool_get':
> /scratch/sfr/next/lib/genalloc.c:599:6: warning: passing argument 4 of 'devres_find' discards 'const' qualifier from pointer target type
>   p = devres_find(dev, devm_gen_pool_release, devm_gen_pool_match, name);
>       ^
> In file included from /scratch/sfr/next/include/linux/node.h:17:0,
>                  from /scratch/sfr/next/include/linux/cpu.h:16,
>                  from /scratch/sfr/next/include/linux/of_device.h:4,
>                  from /scratch/sfr/next/lib/genalloc.c:37:
> /scratch/sfr/next/include/linux/device.h:620:14: note: expected 'void *' but argument is of type 'const char *'
>  extern void *devres_find(struct device *dev, dr_release_t release,
>               ^
> 
> Caused by commit
> 
>   e89a70fd54f2 ("genalloc: add support of multiple gen_pools per device")

urgh.  devres_find()'s `void *match' argument should always have been const.

I started to fix that but the fix spreads like a virus - by the time I had a
700 line diff I gave up.

So I guess we cast away the constness at the caller, like all the other
callers do :(

--- a/lib/genalloc.c~genalloc-add-support-of-multiple-gen_pools-per-device-fix
+++ a/lib/genalloc.c
@@ -596,7 +596,8 @@ struct gen_pool *gen_pool_get(struct dev
 {
 	struct gen_pool **p;
 
-	p = devres_find(dev, devm_gen_pool_release, devm_gen_pool_match, name);
+	p = devres_find(dev, devm_gen_pool_release, devm_gen_pool_match,
+			(void *)name);
 	if (!p)
 		return NULL;
 	return *p;
_

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

* linux-next: build warning after merge of the akpm-current tree
@ 2015-07-16  5:26 Stephen Rothwell
  2015-07-16 23:00 ` Andrew Morton
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2015-07-16  5:26 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Vladimir Zapolskiy

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

lib/genalloc.c: In function 'gen_pool_get':
/scratch/sfr/next/lib/genalloc.c:599:6: warning: passing argument 4 of 'devres_find' discards 'const' qualifier from pointer target type
  p = devres_find(dev, devm_gen_pool_release, devm_gen_pool_match, name);
      ^
In file included from /scratch/sfr/next/include/linux/node.h:17:0,
                 from /scratch/sfr/next/include/linux/cpu.h:16,
                 from /scratch/sfr/next/include/linux/of_device.h:4,
                 from /scratch/sfr/next/lib/genalloc.c:37:
/scratch/sfr/next/include/linux/device.h:620:14: note: expected 'void *' but argument is of type 'const char *'
 extern void *devres_find(struct device *dev, dr_release_t release,
              ^

Caused by commit

  e89a70fd54f2 ("genalloc: add support of multiple gen_pools per device")

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2015-06-04 12:29 Stephen Rothwell
@ 2015-06-04 13:56 ` Andrea Arcangeli
  0 siblings, 0 replies; 87+ messages in thread
From: Andrea Arcangeli @ 2015-06-04 13:56 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel

Hello,

On Thu, Jun 04, 2015 at 10:29:28PM +1000, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm-current tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> ./usr/include/linux/userfaultfd.h:14: found __[us]{8,16,32,64} type without #include <linux/types.h>
> 
> Introduced by commit 2873f48b446c ("userfaultfd: uAPI").

Here's the fix:

===
>From 02b31b0a5e9dd5ddbcb4ad86f63fbcb0a2b5d8f2 Mon Sep 17 00:00:00 2001
From: Andrea Arcangeli <aarcange@redhat.com>
Date: Thu, 4 Jun 2015 14:54:40 +0200
Subject: [PATCH] userfaultfd: uAPI: add missing include/types.h

This will avoid the below warning:

./usr/include/linux/userfaultfd.h:14: found __[us]{8,16,32,64} type
without #include <linux/types.h>

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
---
 include/uapi/linux/userfaultfd.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/linux/userfaultfd.h b/include/uapi/linux/userfaultfd.h
index 9a8cd56..09c2e2a 100644
--- a/include/uapi/linux/userfaultfd.h
+++ b/include/uapi/linux/userfaultfd.h
@@ -9,6 +9,8 @@
 #ifndef _LINUX_USERFAULTFD_H
 #define _LINUX_USERFAULTFD_H
 
+#include <linux/types.h>
+
 #define UFFD_API ((__u64)0xAA)
 /* FIXME: add "|UFFD_BIT_WP" to UFFD_API_BITS after implementing it */
 #define UFFD_API_BITS (UFFD_BIT_WRITE)

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

* linux-next: build warning after merge of the akpm-current tree
@ 2015-06-04 12:29 Stephen Rothwell
  2015-06-04 13:56 ` Andrea Arcangeli
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2015-06-04 12:29 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Andrea Arcangeli

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

./usr/include/linux/userfaultfd.h:14: found __[us]{8,16,32,64} type without #include <linux/types.h>

Introduced by commit 2873f48b446c ("userfaultfd: uAPI").

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2015-02-04  7:48 Stephen Rothwell
@ 2015-02-04  7:53 ` Jan Kiszka
  0 siblings, 0 replies; 87+ messages in thread
From: Jan Kiszka @ 2015-02-04  7:53 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton; +Cc: linux-next, linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2015-02-04 08:48, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm-current tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> warning: (GDB_SCRIPTS) selects DEBUG_INFO which has unmet direct dependencies (DEBUG_KERNEL && !COMPILE_TEST)
> warning: (GDB_SCRIPTS) selects DEBUG_INFO which has unmet direct dependencies (DEBUG_KERNEL && !COMPILE_TEST)
> 
> Introduced by commit 3cf8bb219e44 ("scripts/gdb: add infrastructure").

I've posted a fix earlier today [1]. The Intel test robot informed me
already.

Jan

[1] http://thread.gmane.org/gmane.linux.kernel/1881832

- -- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlTRz/EACgkQitSsb3rl5xS3dQCg1ZPql+9XOcaC/hk7WSztRHDb
6JkAn1XATlgzopMoj9KgpbMApDnkKQYc
=Edbi
-----END PGP SIGNATURE-----

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

* linux-next: build warning after merge of the akpm-current tree
@ 2015-02-04  7:48 Stephen Rothwell
  2015-02-04  7:53 ` Jan Kiszka
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2015-02-04  7:48 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Jan Kiszka

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

warning: (GDB_SCRIPTS) selects DEBUG_INFO which has unmet direct dependencies (DEBUG_KERNEL && !COMPILE_TEST)
warning: (GDB_SCRIPTS) selects DEBUG_INFO which has unmet direct dependencies (DEBUG_KERNEL && !COMPILE_TEST)

Introduced by commit 3cf8bb219e44 ("scripts/gdb: add infrastructure").
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2015-01-19  7:45 Stephen Rothwell
@ 2015-01-19 15:50 ` Chris Mason
  0 siblings, 0 replies; 87+ messages in thread
From: Chris Mason @ 2015-01-19 15:50 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel



On Mon, Jan 19, 2015 at 2:45 AM, Stephen Rothwell 
<sfr@canb.auug.org.au> wrote:
> Hi Andrew,
> 
> After merging the akpm-current tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> fs/eventfd.c: In function 'eventfd_poll':
> fs/eventfd.c:121:16: warning: unused variable 'flags' 
> [-Wunused-variable]
>   unsigned long flags;
>                 ^
> 
> Introduced by commit a90de8a54127 ("eventfd: don't take the spinlock 
> in
> eventfd_poll").


Whoops, I'll send a v2.

-chris

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

* linux-next: build warning after merge of the akpm-current tree
@ 2015-01-19  7:45 Stephen Rothwell
  2015-01-19 15:50 ` Chris Mason
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2015-01-19  7:45 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Chris Mason

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

fs/eventfd.c: In function 'eventfd_poll':
fs/eventfd.c:121:16: warning: unused variable 'flags' [-Wunused-variable]
  unsigned long flags;
                ^

Introduced by commit a90de8a54127 ("eventfd: don't take the spinlock in
eventfd_poll").

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2014-10-30  5:19 Stephen Rothwell
@ 2014-10-30  9:00 ` Aneesh Kumar K.V
  0 siblings, 0 replies; 87+ messages in thread
From: Aneesh Kumar K.V @ 2014-10-30  9:00 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton; +Cc: linux-next, linux-kernel

Stephen Rothwell <sfr@canb.auug.org.au> writes:

> Hi Andrew,
>
> After merging the akpm tree, today's linux-next build (arm multi_v7_defconfig)
> produced this warning:
>
> In file included from include/linux/mm.h:52:0,
>                  from mm/gup.c:7:
> arch/arm/include/asm/pgtable.h:184:0: warning: "pgd_huge" redefined
>  #define pgd_huge(pgd)  (0)
>  ^
> In file included from mm/gup.c:6:0:
> include/linux/hugetlb.h:183:0: note: this is the location of the previous definition
>  #define pgd_huge(x) 0
>  ^
>
> Introduced by commit fee025d5dd4e ("mm: update generic gup
> implementation to handle hugepage directory").


Should be fixed by.
http://mid.gmane.org/1414570785-18966-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com
IIUC the changes are going via powerpc tree. So not sure how it gets updated.

-aneesh

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

* linux-next: build warning after merge of the akpm-current tree
@ 2014-10-30  5:19 Stephen Rothwell
  2014-10-30  9:00 ` Aneesh Kumar K.V
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2014-10-30  5:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Aneesh Kumar K.V

[-- Attachment #1: Type: text/plain, Size: 638 bytes --]

Hi Andrew,

After merging the akpm tree, today's linux-next build (arm multi_v7_defconfig)
produced this warning:

In file included from include/linux/mm.h:52:0,
                 from mm/gup.c:7:
arch/arm/include/asm/pgtable.h:184:0: warning: "pgd_huge" redefined
 #define pgd_huge(pgd)  (0)
 ^
In file included from mm/gup.c:6:0:
include/linux/hugetlb.h:183:0: note: this is the location of the previous definition
 #define pgd_huge(x) 0
 ^

Introduced by commit fee025d5dd4e ("mm: update generic gup
implementation to handle hugepage directory").
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2014-09-26 10:42 Stephen Rothwell
@ 2014-09-29 21:30 ` Andrew Morton
  0 siblings, 0 replies; 87+ messages in thread
From: Andrew Morton @ 2014-09-29 21:30 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Marek Szyprowski

On Fri, 26 Sep 2014 20:42:00 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> drivers/of/of_reserved_mem.c: In function 'of_reserved_mem_device_init':
> drivers/of/of_reserved_mem.c:253:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
>    return;
>    ^
> drivers/of/of_reserved_mem.c:259:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
>    return;
>    ^
> 
> Caused by commit 1a29544cc8c9 ("drivers: of: add return value to
> of_reserved_mem_device_init").  This patch changed the return type of a
> function but did not update any or the return statements in that
> function.

OK, thanks, I dropped it.  I could have fixed it but it doesn't appear
to be well tested.

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

* linux-next: build warning after merge of the akpm-current tree
@ 2014-09-26 10:42 Stephen Rothwell
  2014-09-29 21:30 ` Andrew Morton
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2014-09-26 10:42 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Marek Szyprowski

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

drivers/of/of_reserved_mem.c: In function 'of_reserved_mem_device_init':
drivers/of/of_reserved_mem.c:253:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
   return;
   ^
drivers/of/of_reserved_mem.c:259:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
   return;
   ^

Caused by commit 1a29544cc8c9 ("drivers: of: add return value to
of_reserved_mem_device_init").  This patch changed the return type of a
function but did not update any or the return statements in that
function.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* linux-next: build warning after merge of the akpm-current tree
@ 2014-09-08  8:57 Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2014-09-08  8:57 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Zhang Zhen

[-- Attachment #1: Type: text/plain, Size: 501 bytes --]

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

drivers/base/memory.c: In function 'show_valid_zones':
drivers/base/memory.c:384:22: warning: unused variable 'zone_prev' [-Wunused-variable]
  struct zone *zone, *zone_prev;
                      ^

Introduced by commit 46d9999e7374 ("memory-hotplug: fix not enough
check of valid zones").

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: build warning after merge of the akpm-current tree
  2014-06-20  5:27 Stephen Rothwell
@ 2014-06-20  5:29 ` Yinghai Lu
  0 siblings, 0 replies; 87+ messages in thread
From: Yinghai Lu @ 2014-06-20  5:29 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

On Thu, Jun 19, 2014 at 10:27 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Andrew,
>
> After merging the akpm-current tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> Introduced by commit 8d9dfa4b0125 ("initramfs: support initramfs that
> is more than 2G").  Grep is your friend :-(

Please check if attached patch fix the problem.

Yinghai

[-- Attachment #2: fix_uLong_print.patch --]
[-- Type: text/x-patch, Size: 2789 bytes --]

diff --git a/crypto/zlib.c b/crypto/zlib.c
index 06b62e5..c9ee681 100644
--- a/crypto/zlib.c
+++ b/crypto/zlib.c
@@ -168,7 +168,7 @@ static int zlib_compress_update(struct crypto_pcomp *tfm,
 	}
 
 	ret = req->avail_out - stream->avail_out;
-	pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
+	pr_debug("avail_in %lu, avail_out %lu (consumed %lu, produced %u)\n",
 		 stream->avail_in, stream->avail_out,
 		 req->avail_in - stream->avail_in, ret);
 	req->next_in = stream->next_in;
@@ -198,7 +198,7 @@ static int zlib_compress_final(struct crypto_pcomp *tfm,
 	}
 
 	ret = req->avail_out - stream->avail_out;
-	pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
+	pr_debug("avail_in %lu, avail_out %lu (consumed %lu, produced %u)\n",
 		 stream->avail_in, stream->avail_out,
 		 req->avail_in - stream->avail_in, ret);
 	req->next_in = stream->next_in;
@@ -283,7 +283,7 @@ static int zlib_decompress_update(struct crypto_pcomp *tfm,
 	}
 
 	ret = req->avail_out - stream->avail_out;
-	pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
+	pr_debug("avail_in %lu, avail_out %lu (consumed %lu, produced %u)\n",
 		 stream->avail_in, stream->avail_out,
 		 req->avail_in - stream->avail_in, ret);
 	req->next_in = stream->next_in;
@@ -331,7 +331,7 @@ static int zlib_decompress_final(struct crypto_pcomp *tfm,
 	}
 
 	ret = req->avail_out - stream->avail_out;
-	pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
+	pr_debug("avail_in %lu, avail_out %lu (consumed %lu, produced %u)\n",
 		 stream->avail_in, stream->avail_out,
 		 req->avail_in - stream->avail_in, ret);
 	req->next_in = stream->next_in;
diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c
index 0b9a1e4..11ea1ee 100644
--- a/fs/jffs2/compr_zlib.c
+++ b/fs/jffs2/compr_zlib.c
@@ -94,11 +94,11 @@ static int jffs2_zlib_compress(unsigned char *data_in,
 
 	while (def_strm.total_out < *dstlen - STREAM_END_SPACE && def_strm.total_in < *sourcelen) {
 		def_strm.avail_out = *dstlen - (def_strm.total_out + STREAM_END_SPACE);
-		def_strm.avail_in = min((unsigned)(*sourcelen-def_strm.total_in), def_strm.avail_out);
-		jffs2_dbg(1, "calling deflate with avail_in %d, avail_out %d\n",
+		def_strm.avail_in = min((unsigned long)(*sourcelen-def_strm.total_in), def_strm.avail_out);
+		jffs2_dbg(1, "calling deflate with avail_in %ld, avail_out %ld\n",
 			  def_strm.avail_in, def_strm.avail_out);
 		ret = zlib_deflate(&def_strm, Z_PARTIAL_FLUSH);
-		jffs2_dbg(1, "deflate returned with avail_in %d, avail_out %d, total_in %ld, total_out %ld\n",
+		jffs2_dbg(1, "deflate returned with avail_in %ld, avail_out %ld, total_in %ld, total_out %ld\n",
 			  def_strm.avail_in, def_strm.avail_out,
 			  def_strm.total_in, def_strm.total_out);
 		if (ret != Z_OK) {

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

* linux-next: build warning after merge of the akpm-current tree
@ 2014-06-20  5:27 Stephen Rothwell
  2014-06-20  5:29 ` Yinghai Lu
  0 siblings, 1 reply; 87+ messages in thread
From: Stephen Rothwell @ 2014-06-20  5:27 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Yinghai Lu

[-- Attachment #1: Type: text/plain, Size: 8538 bytes --]

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

In file included from include/linux/printk.h:257:0,
                 from include/linux/kernel.h:13,
                 from arch/x86/include/asm/percpu.h:44,
                 from arch/x86/include/asm/preempt.h:5,
                 from include/linux/preempt.h:18,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from crypto/zlib.c:26:
crypto/zlib.c: In function 'zlib_compress_update':
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uLong' [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
crypto/zlib.c:171:2: note: in expansion of macro 'pr_debug'
  pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
  ^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uLong' [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
crypto/zlib.c:171:2: note: in expansion of macro 'pr_debug'
  pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
  ^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uLong' [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
crypto/zlib.c:171:2: note: in expansion of macro 'pr_debug'
  pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
  ^
crypto/zlib.c: In function 'zlib_compress_final':
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uLong' [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
crypto/zlib.c:201:2: note: in expansion of macro 'pr_debug'
  pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
  ^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uLong' [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
crypto/zlib.c:201:2: note: in expansion of macro 'pr_debug'
  pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
  ^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uLong' [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
crypto/zlib.c:201:2: note: in expansion of macro 'pr_debug'
  pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
  ^
crypto/zlib.c: In function 'zlib_decompress_update':
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uLong' [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
crypto/zlib.c:286:2: note: in expansion of macro 'pr_debug'
  pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
  ^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uLong' [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
crypto/zlib.c:286:2: note: in expansion of macro 'pr_debug'
  pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
  ^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uLong' [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
crypto/zlib.c:286:2: note: in expansion of macro 'pr_debug'
  pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
  ^
crypto/zlib.c: In function 'zlib_decompress_final':
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uLong' [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
crypto/zlib.c:334:2: note: in expansion of macro 'pr_debug'
  pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
  ^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uLong' [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
crypto/zlib.c:334:2: note: in expansion of macro 'pr_debug'
  pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
  ^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uLong' [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
crypto/zlib.c:334:2: note: in expansion of macro 'pr_debug'
  pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
  ^


Introduced by commit 8d9dfa4b0125 ("initramfs: support initramfs that
is more than 2G").  Grep is your friend :-(

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* linux-next: build warning after merge of the akpm-current tree
@ 2014-06-16  1:57 Stephen Rothwell
  0 siblings, 0 replies; 87+ messages in thread
From: Stephen Rothwell @ 2014-06-16  1:57 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Naoya Horiguchi

[-- Attachment #1: Type: text/plain, Size: 1710 bytes --]

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

In file included from arch/powerpc/include/asm/mmu-hash64.h:23:0,
                 from arch/powerpc/include/asm/mmu.h:197,
                 from arch/powerpc/include/asm/lppaca.h:36,
                 from arch/powerpc/include/asm/paca.h:20,
                 from arch/powerpc/include/asm/hw_irq.h:41,
                 from arch/powerpc/include/asm/irqflags.h:11,
                 from include/linux/irqflags.h:15,
                 from include/linux/spinlock.h:53,
                 from include/linux/mmzone.h:7,
                 from include/linux/gfp.h:5,
                 from include/linux/mm.h:9,
                 from include/linux/mman.h:4,
                 from mm/madvise.c:8:
mm/madvise.c: In function 'swapin_walk_pte_entry':
arch/powerpc/include/asm/pgtable-ppc64.h:183:3: warning: statement with no effect [-Wunused-value]
   (((pte_t *) pmd_page_vaddr(*(dir))) + (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)))
   ^
arch/powerpc/include/asm/pgtable-ppc64.h:185:34: note: in expansion of macro 'pte_offset_kernel'
 #define pte_offset_map(dir,addr) pte_offset_kernel((dir), (addr))
                                  ^
mm/madvise.c:161:2: note: in expansion of macro 'pte_offset_map'
  pte_offset_map(walk->pmd, start & PMD_MASK);
  ^
mm/madvise.c:145:9: warning: unused variable 'orig_pte' [-Wunused-variable]
  pte_t *orig_pte = pte - ((start & (PMD_SIZE - 1)) >> PAGE_SHIFT);
         ^

Introduced by commit 17336ae3d58a ("madvise: cleanup swapin_walk_pmd_entry()")
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, back to index

Thread overview: 87+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-13  5:42 linux-next: build warning after merge of the akpm-current tree Stephen Rothwell
2017-11-13  8:09 ` Michal Hocko
2017-11-13  8:23   ` Michal Hocko
2017-11-13 11:43   ` Arnd Bergmann
2017-11-13 11:54     ` Michal Hocko
2017-11-13 12:24       ` Arnd Bergmann
2017-11-13 12:29       ` Michal Hocko
2017-11-16 22:44     ` Stephen Rothwell
2017-11-17  3:53       ` Stephen Rothwell
2017-11-17  9:36         ` Zhangshaokun
2017-11-17  9:56         ` Arnd Bergmann
2017-11-17 10:15           ` [PATCH] mm: fix nodemask printing Arnd Bergmann
2017-11-20  8:22             ` Michal Hocko
2017-11-20 11:33               ` Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2019-11-06  7:05 linux-next: build warning after merge of the akpm-current tree Stephen Rothwell
2019-11-06  7:52 ` Shaokun Zhang
2019-11-06  6:54 Stephen Rothwell
2019-08-07  8:00 Stephen Rothwell
2019-08-07 11:29 ` Rikard Falkeborn
2019-08-07 23:31   ` Stephen Rothwell
2019-07-31  6:16 Stephen Rothwell
2019-07-31 12:01 ` Jia-Ju Bai
2019-07-31  6:11 Stephen Rothwell
2019-07-31  6:28 ` Miles Chen
2019-08-01  5:51   ` Stephen Rothwell
2019-08-01  6:15     ` Michal Hocko
2019-08-01  6:30       ` Miles Chen
2019-08-01  6:38         ` Michal Hocko
2019-08-01  6:39         ` Stephen Rothwell
2019-08-01  6:42           ` Miles Chen
2019-07-29  3:48 Stephen Rothwell
2019-07-29  3:44 Stephen Rothwell
2019-05-30  4:55 Stephen Rothwell
2019-05-30  9:02 ` Matteo Croce
2019-03-29  2:39 Stephen Rothwell
2019-04-16  6:52 ` Stephen Rothwell
2019-04-16 22:45   ` Andrew Morton
2019-01-31  5:01 Stephen Rothwell
2018-06-08  4:45 Stephen Rothwell
2018-05-04  4:17 Stephen Rothwell
2018-05-04 15:39 ` Randy Dunlap
2018-05-07 14:10   ` Minchan Kim
2018-05-07 16:47     ` Randy Dunlap
2018-05-08 10:48       ` Minchan Kim
2018-04-06  4:53 Stephen Rothwell
2018-01-02  7:04 Stephen Rothwell
2017-12-15  2:48 Stephen Rothwell
2017-11-23  2:01 Stephen Rothwell
2017-11-13  5:54 Stephen Rothwell
2017-08-01  5:22 Stephen Rothwell
2017-05-26  2:43 Stephen Rothwell
2017-05-26 10:16 ` Jeff Layton
2017-05-26 11:28   ` Dave Kleikamp
2017-05-19  4:44 Stephen Rothwell
2017-05-15  1:56 Stephen Rothwell
2017-05-15  4:02 ` Xunlei Pang
2017-05-15  5:07   ` Stephen Rothwell
2017-02-02  6:49 Stephen Rothwell
2016-11-09  4:10 Stephen Rothwell
2016-11-09  7:18 ` Huang Shijie
2016-11-09 21:21   ` Andrew Morton
2016-11-10  2:56     ` Stephen Rothwell
2016-06-23  6:53 Stephen Rothwell
2016-06-23 14:00 ` Mel Gorman
2016-05-27  3:07 Stephen Rothwell
2016-05-27 19:53 ` Andrew Morton
2016-04-29  6:45 Stephen Rothwell
2016-04-29  6:55 ` Stephen Rothwell
2016-04-29 13:32 ` Josh Poimboeuf
2016-04-29 14:03   ` Josh Poimboeuf
2016-04-30  5:52     ` Stephen Rothwell
2015-07-16  5:26 Stephen Rothwell
2015-07-16 23:00 ` Andrew Morton
2015-06-04 12:29 Stephen Rothwell
2015-06-04 13:56 ` Andrea Arcangeli
2015-02-04  7:48 Stephen Rothwell
2015-02-04  7:53 ` Jan Kiszka
2015-01-19  7:45 Stephen Rothwell
2015-01-19 15:50 ` Chris Mason
2014-10-30  5:19 Stephen Rothwell
2014-10-30  9:00 ` Aneesh Kumar K.V
2014-09-26 10:42 Stephen Rothwell
2014-09-29 21:30 ` Andrew Morton
2014-09-08  8:57 Stephen Rothwell
2014-06-20  5:27 Stephen Rothwell
2014-06-20  5:29 ` Yinghai Lu
2014-06-16  1:57 Stephen Rothwell

Linux-Next Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
		linux-next@vger.kernel.org
	public-inbox-index linux-next

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git