[<prev] [next>] [day] [month] [year] [list]
Date: Mon, 6 Jun 2016 14:30:04 +0100
From: Colin King <colin.king@...onical.com>
To: Alessandro Rubini <rubini@...dd.com>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] FMC: remove duplicated fru_strlen and unused variable len
From: Colin Ian King <colin.king@...onical.com>
The call to fru_strlen on tl is performed twice; remove the duplicate
and the unsed variable len. This fixes the clang warning:
drivers/fmc/fru-parse.c:39:2: warning: Value stored to 'len' is never read
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
drivers/fmc/fru-parse.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/fmc/fru-parse.c b/drivers/fmc/fru-parse.c
index cb46263..4094146 100644
--- a/drivers/fmc/fru-parse.c
+++ b/drivers/fmc/fru-parse.c
@@ -31,12 +31,10 @@ static char *__fru_alloc_get_tl(struct fru_common_header *header, int nr)
{
struct fru_type_length *tl;
char *res;
- int len;
tl = __fru_get_board_tl(header, nr);
if (!tl)
return NULL;
- len = fru_strlen(tl);
res = fru_alloc(fru_strlen(tl) + 1);
if (!res)
return NULL;
--
2.8.1
Powered by blists - more mailing lists