From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751990AbcFFNaI (ORCPT ); Mon, 6 Jun 2016 09:30:08 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:34354 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751772AbcFFNaG (ORCPT ); Mon, 6 Jun 2016 09:30:06 -0400 From: Colin King To: Alessandro Rubini Cc: linux-kernel@vger.kernel.org Subject: [PATCH] FMC: remove duplicated fru_strlen and unused variable len Date: Mon, 6 Jun 2016 14:30:04 +0100 Message-Id: <1465219804-14444-1-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 2.8.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King 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 --- 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