summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2022-03-01 19:28:59 +0300
committerWolfram Sang <wsa@kernel.org>2022-03-03 00:11:42 +0300
commit9c02c6391c88a9d2669c2ff8da92cf6efd7f760b (patch)
tree40725294043c78c113e17349873b9fa5eaede4ca /drivers/i2c
parentd7583c8a57485da19feb6dd85573763a8c5ec1d1 (diff)
downloadlinux-9c02c6391c88a9d2669c2ff8da92cf6efd7f760b.tar.xz
i2c: i801: Drop useless masking in i801_access
I went all the way back to kernel 2.6.12 and that masking was never needed. I suppose it was there in anticipation of software PEC support, but that was never added to the driver (and never will be, as this is made obsolete by hardware PEC). I'm also removing initialization to 0, which is not needed either, and would prevent the compiler from reporting an actual usage of uninitialized variables. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-i801.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 36b086ef1378..715f6d51d09c 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -792,7 +792,7 @@ static s32 i801_access(struct i2c_adapter *adap, u16 addr,
{
int hwpec;
int block = 0;
- int ret = 0, xact = 0;
+ int ret, xact;
struct i801_priv *priv = i2c_get_adapdata(adap);
mutex_lock(&priv->acpi_lock);
@@ -904,7 +904,7 @@ static s32 i801_access(struct i2c_adapter *adap, u16 addr,
if ((read_write == I2C_SMBUS_WRITE) || (xact == I801_QUICK))
goto out;
- switch (xact & 0x7f) {
+ switch (xact) {
case I801_BYTE: /* Result put in SMBHSTDAT0 */
case I801_BYTE_DATA:
data->byte = inb_p(SMBHSTDAT0(priv));