Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1510735 > unrolled thread

linux-next: build warning in Linus' tree

Started byStephen Rothwell <sfr@canb.auug.org.au>
First post2016-10-28 00:30 +0200
Last post2016-10-29 23:30 +0200
Articles 7 — 4 participants

Back to article view | Back to linux.kernel


Contents

  linux-next: build warning in Linus' tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-10-28 00:30 +0200
    Re: linux-next: build warning in Linus' tree Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-28 00:50 +0200
      Re: linux-next: build warning in Linus' tree Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-28 01:10 +0200
        Re: linux-next: build warning in Linus' tree Alexander Potapenko <glider@google.com> - 2016-10-28 01:10 +0200
          Re: linux-next: build warning in Linus' tree Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-28 01:30 +0200
        Re: linux-next: build warning in Linus' tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-10-28 01:50 +0200
        Re: linux-next: build warning in Linus' tree Geert Uytterhoeven <geert@linux-m68k.org> - 2016-10-29 23:30 +0200

#1510735 — linux-next: build warning in Linus' tree

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2016-10-28 00:30 +0200
Subjectlinux-next: build warning in Linus' tree
Message-ID<sx1ln-7TN-5@gated-at.bofh.it>
Hi Linus,

Building your tree, today's linux-next build (powerpc ppc64_defconfig)
produced this warning:

mm/memory_hotplug.c: In function 'try_offline_node':
mm/memory_hotplug.c:2120:6: warning: unused variable 'i' [-Wunused-variable]
 int i;
     ^

Introduced by commit

  9dcb8b685fc3 ("mm: remove per-zone hashtable of bitlock waitqueues")

-- 
Cheers,
Stephen Rothwell

[toc] | [next] | [standalone]


#1510755

FromLinus Torvalds <torvalds@linux-foundation.org>
Date2016-10-28 00:50 +0200
Message-ID<sx1EK-80D-9@gated-at.bofh.it>
In reply to#1510735
On Thu, Oct 27, 2016 at 3:29 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Building your tree, today's linux-next build (powerpc ppc64_defconfig)
> produced this warning:
>
> mm/memory_hotplug.c: In function 'try_offline_node':
> mm/memory_hotplug.c:2120:6: warning: unused variable 'i' [-Wunused-variable]
>  int i;
>      ^
>
> Introduced by commit
>
>   9dcb8b685fc3 ("mm: remove per-zone hashtable of bitlock waitqueues")

Strange. I wonder why I didn't see that warning. Not with
allmodconfig, and not with my normal build.

[ Looks around ]

Hmm. Apparently "allmodconfig" doesn't actually enable memory hotplug.
And the reason is that allmodconfig enables KASAN, which then disables
MEMORY_HOTPLUG.

I wonder if we should make KASAN depend on !COMPILE_TEST, because it
does seem to disable a lot of build-time testing.

Oh well. I'll remove the stupid unused variable, thanks for the heads-up.

          Linus

[toc] | [prev] | [next] | [standalone]


#1510759

FromLinus Torvalds <torvalds@linux-foundation.org>
Date2016-10-28 01:10 +0200
Message-ID<sx1Y5-8mn-1@gated-at.bofh.it>
In reply to#1510755
On Thu, Oct 27, 2016 at 3:48 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> I wonder if we should make KASAN depend on !COMPILE_TEST, because it
> does seem to disable a lot of build-time testing.

Actually, we should probably just make the MEMORY_HOTPLUG dependency be

        depends on COMPILE_TEST || !KASAN

since the memory-hotplug code should still *build* with KASAN, it just
doesn't work. That's exactly what the COMPILE_TEST config option is
there for - to get build coverage even for things that aren't
necessarily sane to run.

I'll do that, to get my build coverage up. I really expected my
allmodconfig builds to verify that I had removed the per-zone
waitqueue code completely, and I'm happy that the breakage was
apparently limited to that unused variable..

In the meantime, thanks for noticing and letting me know.

            Linus

[toc] | [prev] | [next] | [standalone]


#1510762

FromAlexander Potapenko <glider@google.com>
Date2016-10-28 01:10 +0200
Message-ID<sx1Y5-8mn-9@gated-at.bofh.it>
In reply to#1510759
On Thu, Oct 27, 2016 at 4:01 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Thu, Oct 27, 2016 at 3:48 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>>
>> I wonder if we should make KASAN depend on !COMPILE_TEST, because it
>> does seem to disable a lot of build-time testing.
>
> Actually, we should probably just make the MEMORY_HOTPLUG dependency be
>
>         depends on COMPILE_TEST || !KASAN

Maybe we could just reverse the MEMORY_HOTPLUG->!KASAN dependency to
make it KASAN->!MEMORY_HOTPLUG?

Is it at all correct that allmodconfig enables KASAN? If/when we have
other compiler-based tools, which of them will allmodconfig pick?
> since the memory-hotplug code should still *build* with KASAN, it just
> doesn't work. That's exactly what the COMPILE_TEST config option is
> there for - to get build coverage even for things that aren't
> necessarily sane to run.
>
> I'll do that, to get my build coverage up. I really expected my
> allmodconfig builds to verify that I had removed the per-zone
> waitqueue code completely, and I'm happy that the breakage was
> apparently limited to that unused variable..
>
> In the meantime, thanks for noticing and letting me know.
>
>             Linus



-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

[toc] | [prev] | [next] | [standalone]


#1510770

FromLinus Torvalds <torvalds@linux-foundation.org>
Date2016-10-28 01:30 +0200
Message-ID<sx2hr-4V-3@gated-at.bofh.it>
In reply to#1510762
On Thu, Oct 27, 2016 at 4:05 PM, Alexander Potapenko <glider@google.com> wrote:
>
> Maybe we could just reverse the MEMORY_HOTPLUG->!KASAN dependency to
> make it KASAN->!MEMORY_HOTPLUG?

Yes, that was my initial approach too, but then I decided that I'd
rather build-test both together anyway. Since I can. So that just gets
me the best of both worlds.

We've had issues like this before, and "make allmodconfig" will never
enable _everything_ (ie you always have to make some choices that will
disable other cases, if only for reasons like SLUB-vs-SLAB etc).

But in general the more coverage I get from build testing (without
having to do lots and lots of builds - that's what the build farms are
for after I have pushed things out), the better.

             Linus

[toc] | [prev] | [next] | [standalone]


#1510780

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2016-10-28 01:50 +0200
Message-ID<sx2AN-dA-1@gated-at.bofh.it>
In reply to#1510759
Hi Linus,

On Thu, 27 Oct 2016 16:01:22 -0700 Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> In the meantime, thanks for noticing and letting me know.

It was pointed out by the extra checking you asked me to add in order
to easier detect new warnings for code added to linux-next :-)

-- 
Cheers,
Stephen Rothwell

[toc] | [prev] | [next] | [standalone]


#1511911

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2016-10-29 23:30 +0200
Message-ID<sxJmq-3D9-29@gated-at.bofh.it>
In reply to#1510759
Hi Linus,

On Fri, Oct 28, 2016 at 1:01 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Thu, Oct 27, 2016 at 3:48 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>>
>> I wonder if we should make KASAN depend on !COMPILE_TEST, because it
>> does seem to disable a lot of build-time testing.
>
> Actually, we should probably just make the MEMORY_HOTPLUG dependency be
>
>         depends on COMPILE_TEST || !KASAN
>
> since the memory-hotplug code should still *build* with KASAN, it just
> doesn't work. That's exactly what the COMPILE_TEST config option is
> there for - to get build coverage even for things that aren't
> necessarily sane to run.

In what way does it not work? Does it crash?
People do run COMPILE_TEST=y/allmodconfig kernels.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web