From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Sifan Naeem <sifan.naeem-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] spi: img-spfi: fix kbuild test robot warning
Date: Thu, 6 Aug 2015 12:28:28 +0100 [thread overview]
Message-ID: <20150806112828.GU20873@sirena.org.uk> (raw)
In-Reply-To: <1438853581-17154-1-git-send-email-sifan.naeem-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 949 bytes --]
On Thu, Aug 06, 2015 at 10:33:01AM +0100, Sifan Naeem wrote:
> drivers/spi/spi-img-spfi.c: In function 'img_spfi_setup':
> drivers/spi/spi-img-spfi.c:446: warning: 'ret' may be used
> uninitialized in this function.
>
> Fixes: commit b03ba9e314c1 ("spi: img-spfi: fix multiple calls to request gpio")
> Signed-off-by: Sifan Naeem <sifan.naeem-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
This isn't a good commit message:
> static int img_spfi_setup(struct spi_device *spi)
> {
> - int ret;
> + int ret = -EINVAL;
You're just assigning a return value so that the compiler can't tell if
we've missed anything, that's often a sign of just papering over the
cracks without understanding the problem - for example there may be a
missing else case in some error path that the compiler was trying to
tell you about where other cleanup is needed. The changelog should say
what the problem was and why the change solves it sensibly.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-08-06 11:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 9:33 [PATCH] spi: img-spfi: fix kbuild test robot warning Sifan Naeem
[not found] ` <1438853581-17154-1-git-send-email-sifan.naeem-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2015-08-06 11:28 ` Mark Brown [this message]
[not found] ` <20150806112828.GU20873-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2015-08-06 11:42 ` Geert Uytterhoeven
2015-08-06 11:28 ` Applied "spi: img-spfi: fix kbuild test robot warning" to the spi tree Mark Brown
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=20150806112828.GU20873@sirena.org.uk \
--to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sifan.naeem-1AXoQHu6uovQT0dZR+AlfA@public.gmane.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