From patchwork Thu Sep 5 07:24:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 11132311 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 98E0013B1 for ; Thu, 5 Sep 2019 07:26:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4794E22CEC for ; Thu, 5 Sep 2019 07:26:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731727AbfIEH0H (ORCPT ); Thu, 5 Sep 2019 03:26:07 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6680 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730716AbfIEH0H (ORCPT ); Thu, 5 Sep 2019 03:26:07 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 791E84E5E855BABD024E; Thu, 5 Sep 2019 15:26:04 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Thu, 5 Sep 2019 15:25:57 +0800 From: YueHaibing To: , , , , , , CC: , , , YueHaibing Subject: [PATCH -next] spi: npcm-fiu: remove set but not used variable 'retlen' Date: Thu, 5 Sep 2019 15:24:36 +0800 Message-ID: <20190905072436.23932-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org drivers/spi/spi-npcm-fiu.c: In function npcm_fiu_read: drivers/spi/spi-npcm-fiu.c:472:9: warning: variable retlen set but not used [-Wunused-but-set-variable] It is never used, so remove it. Signed-off-by: YueHaibing --- drivers/spi/spi-npcm-fiu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/spi/spi-npcm-fiu.c b/drivers/spi/spi-npcm-fiu.c index d9e2f58..cb52fd8 100644 --- a/drivers/spi/spi-npcm-fiu.c +++ b/drivers/spi/spi-npcm-fiu.c @@ -469,7 +469,6 @@ static int npcm_fiu_read(struct spi_mem *mem, const struct spi_mem_op *op) { u8 *data = op->data.buf.in; int i, readlen, currlen; - size_t retlen = 0; u8 *buf_ptr; u32 addr; int ret; @@ -494,8 +493,6 @@ static int npcm_fiu_read(struct spi_mem *mem, const struct spi_mem_op *op) currlen -= 16; } while (currlen > 0); - retlen = i; - return 0; }