From: Arnd Bergmann <arnd@arndb.de>
To: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, "Wolfram Sang" <wsa@the-dreams.de>,
linux-i2c@vger.kernel.org,
"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: allow building emev2 without slave mode again
Date: Thu, 10 Dec 2015 16:06:10 +0100 [thread overview]
Message-ID: <2592093.cGKEcKVqLU@wuerfel> (raw)
In-Reply-To: <201512102224.cVm7Hcp0%fengguang.wu@intel.com>
On Thursday 10 December 2015 22:54:25 kbuild test robot wrote:
>
> In file included from arch/x86/include/asm/realmode.h:5:0,
> from arch/x86/include/asm/acpi.h:33,
> from arch/x86/include/asm/fixmap.h:19,
> from arch/x86/include/asm/apic.h:12,
> from arch/x86/include/asm/smp.h:12,
> from arch/x86/include/asm/mmzone_64.h:10,
> from arch/x86/include/asm/mmzone.h:4,
> from include/linux/mmzone.h:856,
> from include/linux/gfp.h:5,
> from include/linux/device.h:29,
> from drivers/i2c/busses/i2c-emev2.c:15:
> drivers/i2c/busses/i2c-emev2.c: In function 'em_i2c_irq_handler':
> >> arch/x86/include/asm/io.h:53:3: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized]
> { asm volatile("mov" size " %0,%1": :reg (val), \
> ^
> drivers/i2c/busses/i2c-emev2.c:232:13: note: 'value' was declared here
> u8 status, value;
> ^
The warning was indeed introduced by my change, but I think there
was a preexisting issue:
The slave_cb callback function is supposed to set the 'value'
here, but it might return an error not assign the pointer, which
is something that both the rcar and the emev2 drivers do not handle
correctly.
It might be best to change the callback to return 'void' and not
allow it to fail. At least the eeprom slave cannot fail anyway,
and it is the only implementation we have at the moment.
The inline function would then have to be changed to initialize
the 'value'.
Alternatively, the inline could return an error, and both bus
drivers check for the error before using 'value'.
Arnd
next prev parent reply other threads:[~2015-12-10 15:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 13:14 [PATCH] i2c: allow building emev2 without slave mode again Arnd Bergmann
2015-12-10 13:34 ` Wolfram Sang
2015-12-10 13:51 ` Arnd Bergmann
2015-12-10 14:54 ` kbuild test robot
2015-12-10 15:06 ` Arnd Bergmann [this message]
2015-12-10 15:17 ` Wolfram Sang
2015-12-12 16:20 ` Wolfram Sang
2015-12-12 21:05 ` Arnd Bergmann
2015-12-13 9:09 ` Wolfram Sang
2015-12-14 12:02 ` Arnd Bergmann
2015-12-14 13:52 ` Wolfram Sang
2015-12-14 22:27 ` Arnd Bergmann
2015-12-17 12:01 ` Wolfram Sang
2015-12-17 14:48 ` Arnd Bergmann
2015-12-17 19:40 ` Wolfram Sang
2015-12-17 19:57 ` Arnd Bergmann
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=2592093.cGKEcKVqLU@wuerfel \
--to=arnd@arndb.de \
--cc=kbuild-all@01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=lkp@intel.com \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=wsa@the-dreams.de \
/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).