lkml.org 
[lkml]   [2021]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] caif: Remove redundant variable expectlen
Date
Variable expectlen is being assigned a value from a calculation
however the variable is never read, so this redundant variable
can be removed.

Cleans up the following clang-analyzer warning:

net/caif/cfserl.c:126:5: warning: Value stored to 'expectlen' is never
read [clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
net/caif/cfserl.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/net/caif/cfserl.c b/net/caif/cfserl.c
index e11725a..fef72e6 100644
--- a/net/caif/cfserl.c
+++ b/net/caif/cfserl.c
@@ -123,7 +123,6 @@ static int cfserl_receive(struct cflayer *l, struct cfpkt *newpkt)
if (pkt != NULL)
cfpkt_destroy(pkt);
layr->incomplete_frm = NULL;
- expectlen = 0;
spin_unlock(&layr->sync);
return -EPROTO;
}
--
1.8.3.1
\
 
 \ /
  Last update: 2021-04-26 12:11    [W:2.860 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site