From: broonie@kernel.org (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: insn: Add return statements after BUG_ON()
Date: Thu, 18 Sep 2014 10:21:47 -0700 [thread overview]
Message-ID: <20140918172147.GX7960@sirena.org.uk> (raw)
In-Reply-To: <20140918170205.GE25330@e104818-lin.cambridge.arm.com>
On Thu, Sep 18, 2014 at 06:02:06PM +0100, Catalin Marinas wrote:
> On Tue, Sep 16, 2014 at 05:42:33PM +0100, Mark Brown wrote:
> > default:
> > BUG_ON(1);
> > + return 0;
> > }
> Wouldn't there be less lines if we initialise insn to 0 in these
> functions?
In general that's bad practice since it means that you loose the benefit
of flow analysis on that variable throughout the function - it will shut
the warning up but if someone introduces a bug later on the compiler
won't be able to tell them about it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140918/b75f0cc9/attachment.sig>
prev parent reply other threads:[~2014-09-18 17:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 16:42 [PATCH] arm64: insn: Add return statements after BUG_ON() Mark Brown
2014-09-16 16:49 ` Will Deacon
2014-09-19 10:58 ` Catalin Marinas
2014-09-18 17:02 ` Catalin Marinas
2014-09-18 17:21 ` Mark Brown [this message]
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=20140918172147.GX7960@sirena.org.uk \
--to=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.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