* [PATCH] i2c: piix4: remove unneeded assignments
@ 2015-11-30 13:43 Wolfram Sang
2015-12-01 20:31 ` fetzerch
2015-12-03 20:37 ` Wolfram Sang
0 siblings, 2 replies; 3+ messages in thread
From: Wolfram Sang @ 2015-11-30 13:43 UTC (permalink / raw)
To: linux-i2c; +Cc: Christian Fetzer, Wolfram Sang
smatch rightfully says:
drivers/i2c/busses/i2c-piix4.c:504 piix4_access warn: unused return: i = inb_p()
drivers/i2c/busses/i2c-piix4.c:537 piix4_access warn: unused return: i = inb_p()
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Christian, can you please check on HW? I could only compile-test.
drivers/i2c/busses/i2c-piix4.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
index af4e606f8886bd..e045985950737c 100644
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -501,7 +501,7 @@ static s32 piix4_access(struct i2c_adapter * adap, u16 addr,
if (len == 0 || len > I2C_SMBUS_BLOCK_MAX)
return -EINVAL;
outb_p(len, SMBHSTDAT0);
- i = inb_p(SMBHSTCNT); /* Reset SMBBLKDAT */
+ inb_p(SMBHSTCNT); /* Reset SMBBLKDAT */
for (i = 1; i <= len; i++)
outb_p(data->block[i], SMBBLKDAT);
}
@@ -534,7 +534,7 @@ static s32 piix4_access(struct i2c_adapter * adap, u16 addr,
data->block[0] = inb_p(SMBHSTDAT0);
if (data->block[0] == 0 || data->block[0] > I2C_SMBUS_BLOCK_MAX)
return -EPROTO;
- i = inb_p(SMBHSTCNT); /* Reset SMBBLKDAT */
+ inb_p(SMBHSTCNT); /* Reset SMBBLKDAT */
for (i = 1; i <= data->block[0]; i++)
data->block[i] = inb_p(SMBBLKDAT);
break;
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: piix4: remove unneeded assignments
2015-11-30 13:43 [PATCH] i2c: piix4: remove unneeded assignments Wolfram Sang
@ 2015-12-01 20:31 ` fetzerch
2015-12-03 20:37 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: fetzerch @ 2015-12-01 20:31 UTC (permalink / raw)
To: Wolfram Sang, linux-i2c; +Cc: Christian Fetzer
Hi Wolfram,
On 30.11.2015 14:43, Wolfram Sang wrote:
> smatch rightfully says:
> drivers/i2c/busses/i2c-piix4.c:504 piix4_access warn: unused return: i = inb_p()
> drivers/i2c/busses/i2c-piix4.c:537 piix4_access warn: unused return: i = inb_p()
>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
>
> Christian, can you please check on HW? I could only compile-test.
Your patch works fine on my machine!
Thanks for merging my patchset btw.
Christian
>
> drivers/i2c/busses/i2c-piix4.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
> index af4e606f8886bd..e045985950737c 100644
> --- a/drivers/i2c/busses/i2c-piix4.c
> +++ b/drivers/i2c/busses/i2c-piix4.c
> @@ -501,7 +501,7 @@ static s32 piix4_access(struct i2c_adapter * adap, u16 addr,
> if (len == 0 || len > I2C_SMBUS_BLOCK_MAX)
> return -EINVAL;
> outb_p(len, SMBHSTDAT0);
> - i = inb_p(SMBHSTCNT); /* Reset SMBBLKDAT */
> + inb_p(SMBHSTCNT); /* Reset SMBBLKDAT */
> for (i = 1; i <= len; i++)
> outb_p(data->block[i], SMBBLKDAT);
> }
> @@ -534,7 +534,7 @@ static s32 piix4_access(struct i2c_adapter * adap, u16 addr,
> data->block[0] = inb_p(SMBHSTDAT0);
> if (data->block[0] == 0 || data->block[0] > I2C_SMBUS_BLOCK_MAX)
> return -EPROTO;
> - i = inb_p(SMBHSTCNT); /* Reset SMBBLKDAT */
> + inb_p(SMBHSTCNT); /* Reset SMBBLKDAT */
> for (i = 1; i <= data->block[0]; i++)
> data->block[i] = inb_p(SMBBLKDAT);
> break;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: piix4: remove unneeded assignments
2015-11-30 13:43 [PATCH] i2c: piix4: remove unneeded assignments Wolfram Sang
2015-12-01 20:31 ` fetzerch
@ 2015-12-03 20:37 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2015-12-03 20:37 UTC (permalink / raw)
To: linux-i2c; +Cc: Christian Fetzer
[-- Attachment #1: Type: text/plain, Size: 347 bytes --]
On Mon, Nov 30, 2015 at 02:43:09PM +0100, Wolfram Sang wrote:
> smatch rightfully says:
> drivers/i2c/busses/i2c-piix4.c:504 piix4_access warn: unused return: i = inb_p()
> drivers/i2c/busses/i2c-piix4.c:537 piix4_access warn: unused return: i = inb_p()
>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Applied to for-next, thanks!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-12-03 20:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-30 13:43 [PATCH] i2c: piix4: remove unneeded assignments Wolfram Sang
2015-12-01 20:31 ` fetzerch
2015-12-03 20:37 ` Wolfram Sang
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).