diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2021-04-27 12:52:47 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2021-05-27 09:42:22 +0200 |
commit | 9208f7bf053a6fb32f9276a3b78c2b7fb3c0b0cb (patch) | |
tree | 9152f96e9582f6cdfacef0dfac2c853395d205b9 /drivers/net/can | |
parent | can: isotp: Add error message if txqueuelen is too small (diff) | |
download | linux-9208f7bf053a6fb32f9276a3b78c2b7fb3c0b0cb.tar.xz linux-9208f7bf053a6fb32f9276a3b78c2b7fb3c0b0cb.zip |
can: softing: Remove redundant variable ptr
The value stored to ptr in the calculations this patch removes is not
used, so the calculation and the assignment can be removed.
Cleans up the following clang-analyzer warning:
drivers/net/can/softing/softing_main.c:279:3: warning: Value stored to
'ptr' is never read [clang-analyzer-deadcode.DeadStores].
drivers/net/can/softing/softing_main.c:242:3: warning: Value stored to
'ptr' is never read [clang-analyzer-deadcode.DeadStores].
Link: https://lore.kernel.org/r/1619520767-80948-1-git-send-email-jiapeng.chong@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/softing/softing_main.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/can/softing/softing_main.c b/drivers/net/can/softing/softing_main.c index c44f3411e561..cfc1325aad10 100644 --- a/drivers/net/can/softing/softing_main.c +++ b/drivers/net/can/softing/softing_main.c @@ -239,7 +239,6 @@ static int softing_handle_1(struct softing *card) DPRAM_INFO_BUSSTATE2 : DPRAM_INFO_BUSSTATE]); /* timestamp */ tmp_u32 = le32_to_cpup((void *)ptr); - ptr += 4; ktime = softing_raw2ktime(card, tmp_u32); ++netdev->stats.rx_errors; @@ -276,7 +275,6 @@ static int softing_handle_1(struct softing *card) ktime = softing_raw2ktime(card, tmp_u32); if (!(msg.can_id & CAN_RTR_FLAG)) memcpy(&msg.data[0], ptr, 8); - ptr += 8; /* update socket */ if (cmd & CMD_ACK) { /* acknowledge, was tx msg */ |