[PATCH] arm64: insn: Add return statements after BUG_ON()
Mark Brown
broonie at kernel.org
Thu Sep 18 10:21:47 PDT 2014
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>
More information about the linux-arm-kernel
mailing list