From: Daniel Axtens <dja@axtens.net>
To: David Binderman <dcb314@hotmail.com>,
"benh\@kernel.crashing.org" <benh@kernel.crashing.org>,
"paulus\@samba.org" <paulus@samba.org>,
"mpe\@ellerman.id.au" <mpe@ellerman.id.au>,
"linuxppc-dev\@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: linux-4.5-rc4/arch/powerpc/boot/treeboot-akebono.c:90: possible bad test ?
Date: Wed, 17 Feb 2016 09:39:56 +1100 [thread overview]
Message-ID: <87fuwscm9v.fsf@gamma.ozlabs.ibm.com> (raw)
In-Reply-To: <DUB128-W3951FD832DE1C66D3A7C799CAD0@phx.gbl>
Hi David,
>
> [linux-4.5-rc4/arch/powerpc/boot/treeboot-akebono.c:90]: (style) A pointe=
r can not be negative so it is either pointless or an error to check if it =
is not.
>
> Source code is
>
> =C2=A0=C2=A0=C2=A0 emac =3D finddevice("/plb/opb/ethernet");
> =C2=A0=C2=A0=C2=A0 if (emac> 0) {
>
> but
>
> =C2=A0=C2=A0=C2=A0 void *emac;
>
> Suggest new code
>
> =C2=A0=C2=A0=C2=A0 emac =3D finddevice("/plb/opb/ethernet");
> =C2=A0=C2=A0=C2=A0 if (emac !=3D 0) {
>
>
That looks like a good suggestion: maybe make the test 'if (!emac)'
rather than explicitly comparing with zero.
Are you comfortable sending a patch to that effect? A patch generated by
git format-patch and sent with git send-email are usually the easiest.
If you have any difficulties, feel free to ping me off-list and I can
walk you through the process.
Regards,
Daniel
next prev parent reply other threads:[~2016-02-16 22:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 8:15 linux-4.5-rc4/arch/powerpc/boot/treeboot-akebono.c:90: possible bad test ? David Binderman
2016-02-16 22:39 ` Daniel Axtens [this message]
2016-02-17 7:34 ` David Binderman
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=87fuwscm9v.fsf@gamma.ozlabs.ibm.com \
--to=dja@axtens.net \
--cc=benh@kernel.crashing.org \
--cc=dcb314@hotmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.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).