diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-07-03 08:04:00 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-03 13:01:57 +0200 |
commit | 2e08b1dbbc3aa50cdbf975633459e8fa2660fd2e (patch) | |
tree | fb0e65547e752a0d4a9231613eb6ea2f3e27b3ec | |
parent | 07fb28b80c7705c15002fe91dd4340bcd5174dbd (diff) | |
download | linux-2e08b1dbbc3aa50cdbf975633459e8fa2660fd2e.tar.bz2 |
eeprom: idt_89hpesx: remove redundant variable csrval_len
Variable csrval_len is being assigned but is never used hence it is
redundant and can be removed.
Cleans up clang warning:
warning: variable 'csrval_len' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/misc/eeprom/idt_89hpesx.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/misc/eeprom/idt_89hpesx.c b/drivers/misc/eeprom/idt_89hpesx.c index 59dc24bb70ec..119eb05a5a91 100644 --- a/drivers/misc/eeprom/idt_89hpesx.c +++ b/drivers/misc/eeprom/idt_89hpesx.c @@ -938,7 +938,7 @@ static ssize_t idt_dbgfs_csr_write(struct file *filep, const char __user *ubuf, { struct idt_89hpesx_dev *pdev = filep->private_data; char *colon_ch, *csraddr_str, *csrval_str; - int ret, csraddr_len, csrval_len; + int ret, csraddr_len; u32 csraddr, csrval; char *buf; @@ -974,12 +974,10 @@ static ssize_t idt_dbgfs_csr_write(struct file *filep, const char __user *ubuf, csraddr_str[csraddr_len] = '\0'; /* Register value must follow the colon */ csrval_str = colon_ch + 1; - csrval_len = strnlen(csrval_str, count - csraddr_len); } else /* if (str_colon == NULL) */ { csraddr_str = (char *)buf; /* Just to shut warning up */ csraddr_len = strnlen(csraddr_str, count); csrval_str = NULL; - csrval_len = 0; } /* Convert CSR address to u32 value */ |