From patchwork Mon Nov 19 02:11:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10688159 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4E67D15A7 for ; Mon, 19 Nov 2018 02:02:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E922299C4 for ; Mon, 19 Nov 2018 02:02:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 316F9299CE; Mon, 19 Nov 2018 02:02:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6CE2299C4 for ; Mon, 19 Nov 2018 02:02:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728200AbeKSMYJ (ORCPT ); Mon, 19 Nov 2018 07:24:09 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:37639 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727033AbeKSMYJ (ORCPT ); Mon, 19 Nov 2018 07:24:09 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id C9A8CFD4D0331; Mon, 19 Nov 2018 10:02:05 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.408.0; Mon, 19 Nov 2018 10:01:58 +0800 From: YueHaibing To: "James E.J. Bottomley" , "Martin K. Petersen" CC: YueHaibing , , Subject: [PATCH -next] [SCSI] initio: remove set but not used variable 'prev' Date: Mon, 19 Nov 2018 02:11:08 +0000 Message-ID: <1542593468-169769-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/initio.c: In function 'initio_find_busy_scb': drivers/scsi/initio.c:883:30: warning: variable 'prev' set but not used [-Wunused-but-set-variable] It never used since introduction in commit 72d39fea9017 ("[SCSI] initio: Convert into a real Linux driver and update to modern style") Signed-off-by: YueHaibing --- drivers/scsi/initio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 0a8d786c..acef1f2 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c @@ -880,17 +880,15 @@ static void initio_unlink_busy_scb(struct initio_host * host, struct scsi_ctrl_b struct scsi_ctrl_blk *initio_find_busy_scb(struct initio_host * host, u16 tarlun) { - struct scsi_ctrl_blk *tmp, *prev; + struct scsi_ctrl_blk *tmp; u16 scbp_tarlun; - - prev = tmp = host->first_busy; + tmp = host->first_busy; while (tmp != NULL) { scbp_tarlun = (tmp->lun << 8) | (tmp->target); if (scbp_tarlun == tarlun) { /* Unlink this SCB */ break; } - prev = tmp; tmp = tmp->next; } #if DEBUG_QUEUE