提交 d7a4c763 编写于 作者: W Wolfram Sang

i2c: piix4: remove unneeded assignments

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: NWolfram Sang <wsa@the-dreams.de>
Tested-by: NChristian Fetzer <fetzer.ch@gmail.com>
上级 173b77e8
...@@ -501,7 +501,7 @@ static s32 piix4_access(struct i2c_adapter * adap, u16 addr, ...@@ -501,7 +501,7 @@ static s32 piix4_access(struct i2c_adapter * adap, u16 addr,
if (len == 0 || len > I2C_SMBUS_BLOCK_MAX) if (len == 0 || len > I2C_SMBUS_BLOCK_MAX)
return -EINVAL; return -EINVAL;
outb_p(len, SMBHSTDAT0); outb_p(len, SMBHSTDAT0);
i = inb_p(SMBHSTCNT); /* Reset SMBBLKDAT */ inb_p(SMBHSTCNT); /* Reset SMBBLKDAT */
for (i = 1; i <= len; i++) for (i = 1; i <= len; i++)
outb_p(data->block[i], SMBBLKDAT); outb_p(data->block[i], SMBBLKDAT);
} }
...@@ -534,7 +534,7 @@ static s32 piix4_access(struct i2c_adapter * adap, u16 addr, ...@@ -534,7 +534,7 @@ static s32 piix4_access(struct i2c_adapter * adap, u16 addr,
data->block[0] = inb_p(SMBHSTDAT0); data->block[0] = inb_p(SMBHSTDAT0);
if (data->block[0] == 0 || data->block[0] > I2C_SMBUS_BLOCK_MAX) if (data->block[0] == 0 || data->block[0] > I2C_SMBUS_BLOCK_MAX)
return -EPROTO; return -EPROTO;
i = inb_p(SMBHSTCNT); /* Reset SMBBLKDAT */ inb_p(SMBHSTCNT); /* Reset SMBBLKDAT */
for (i = 1; i <= data->block[0]; i++) for (i = 1; i <= data->block[0]; i++)
data->block[i] = inb_p(SMBBLKDAT); data->block[i] = inb_p(SMBBLKDAT);
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册