linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: David Laight <David.Laight@aculab.com>
Cc: Anton Blanchard <anton@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	"rric@kernel.org" <rric@kernel.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"oprofile-list@lists.sf.net" <oprofile-list@lists.sf.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: gcc trunk fails to build kernel on PowerPC64 due to oprofile warnings
Date: Thu, 26 Jan 2017 13:57:18 +0100	[thread overview]
Message-ID: <CAK8P3a2LuOfx-7Ypr4OPEn8r56f4zBdffPLn2wgwEmnM+zWW6g@mail.gmail.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DB026EBC6@AcuExch.aculab.com>

On Thu, Jan 26, 2017 at 12:00 PM, David Laight <David.Laight@aculab.com> wrote:
> From: Anton Blanchard
>> Sent: 25 January 2017 23:01
>> gcc trunk has failed to build PowerPC64 kernels for a month or so. The issue
>> is in oprofile, which is common code but ends up being sucked into
>> arch/powerpc and therefore subject to the -Werror applied to arch/powerpc:
> ...
>> linux/arch/powerpc/oprofile/../../../drivers/oprofile/oprofile_stats.c:55:25: error: %d directive
>> output may be truncated writing between 1 and 11 bytes into a region of size 7 [-Werror=format-
>> truncation=]
>>    snprintf(buf, 10, "cpu%d", i);
>
> FFS these warnings are getting OTT.
> The compiler needs to be able to track the domain of integers before applying
> some of these warnings.

gcc-7 introduces lots of new warnings, some better than others. I'm
trying to categorize
both the new warnings and any others added in the recent years that we
may have missed
to see whether we want to turn them on by default or only in
scripts/Makefile.extrawarn
when building with W=1, W=2 or W=3.

I made a spreadsheet with the warnings that we have available in each version,
and also the number of unique output lines for that warning, see

https://docs.google.com/spreadsheets/d/1QemrLyvzrSDfm_MO3-_pwdfsTp2uqwjOdRBxxj6oo5M/edit?usp=sharing

For this specific warning, an ARM allmodconfig build shows 360
distinct warnings from a
total of 243 files. It's probably a good idea to look over them once
to see if anything sticks
out, but otherwise I think we change it to the W=2 level.

     Arnd

  reply	other threads:[~2017-01-26 12:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 23:00 gcc trunk fails to build kernel on PowerPC64 due to oprofile warnings Anton Blanchard
2017-01-26 11:00 ` David Laight
2017-01-26 12:57   ` Arnd Bergmann [this message]
2017-01-26 15:46 ` William Cohen
2017-01-26 16:06   ` Robert Richter
2017-01-30 15:35     ` William Cohen
2017-02-02 17:21     ` William Cohen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK8P3a2LuOfx-7Ypr4OPEn8r56f4zBdffPLn2wgwEmnM+zWW6g@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=David.Laight@aculab.com \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=oprofile-list@lists.sf.net \
    --cc=paulus@samba.org \
    --cc=rric@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).