From: Will Deacon <will.deacon@arm.com>
To: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm_pmu: fix compiler warning in arm_pmu_device_probe
Date: Thu, 2 Aug 2018 11:57:05 +0100 [thread overview]
Message-ID: <20180802105705.GB14312@arm.com> (raw)
In-Reply-To: <20180801214526.24599-1-chris.packham@alliedtelesis.co.nz>
On Thu, Aug 02, 2018 at 09:45:26AM +1200, Chris Packham wrote:
> GCC warns
>
> arm_pmu_platform.c:234:5: error: 'err' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>
> This is because we rely on the for_each_cpu loop in armpmu_request_irqs
> to initialise err. The warning is a little bogus because we know if
> there were 0 CPUs this code would not be running.
>
> Initialise err to 0 to avoid the warning.
>
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
> This has been reported before in https://lkml.org/lkml/2018/3/5/508 I'm not
> sure if it was dismmissed as "meh, gcc is wrong" or if it was just wainting for
> someone with some round tuits.
Which version of GCC are you using? I don't see this warning locally.
Will
next prev parent reply other threads:[~2018-08-02 10:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-01 21:45 Chris Packham
2018-08-02 10:55 ` Robin Murphy
2018-08-02 10:57 ` Will Deacon [this message]
2018-08-02 21:21 ` Chris Packham
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=20180802105705.GB14312@arm.com \
--to=will.deacon@arm.com \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
/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
Powered by JetHome