From patchwork Thu Sep 13 01:54:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10598629 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 CEDB414E5 for ; Thu, 13 Sep 2018 01:44:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBB4A2ABBF for ; Thu, 13 Sep 2018 01:44:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACF9C2ABE1; Thu, 13 Sep 2018 01:44:37 +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 4DE452ABBF for ; Thu, 13 Sep 2018 01:44:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726364AbeIMGvr (ORCPT ); Thu, 13 Sep 2018 02:51:47 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:53089 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726261AbeIMGvr (ORCPT ); Thu, 13 Sep 2018 02:51:47 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 206862D5B8945; Thu, 13 Sep 2018 09:44:32 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.399.0; Thu, 13 Sep 2018 09:44:24 +0800 From: YueHaibing To: Jack Wang , "James E.J. Bottomley" , "Martin K. Petersen" CC: YueHaibing , , , Subject: [PATCH -next] scsi: pm80xx: Remove set but not used variable 'device_id' Date: Thu, 13 Sep 2018 01:54:24 +0000 Message-ID: <1536803664-42497-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/pm8001/pm8001_sas.c: In function 'pm8001_I_T_nexus_event_handler': drivers/scsi/pm8001/pm8001_sas.c:1052:6: warning: variable 'device_id' set but not used [-Wunused-but-set-variable] drivers/scsi/pm8001/pm8001_sas.c: In function 'pm8001_abort_task': drivers/scsi/pm8001/pm8001_sas.c:1191:6: warning: variable 'device_id' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Acked-by: Jack Wang --- drivers/scsi/pm8001/pm8001_sas.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c index b1e7d26..84092e4 100644 --- a/drivers/scsi/pm8001/pm8001_sas.c +++ b/drivers/scsi/pm8001/pm8001_sas.c @@ -1049,13 +1049,11 @@ int pm8001_I_T_nexus_event_handler(struct domain_device *dev) struct pm8001_device *pm8001_dev; struct pm8001_hba_info *pm8001_ha; struct sas_phy *phy; - u32 device_id = 0; if (!dev || !dev->lldd_dev) return -1; pm8001_dev = dev->lldd_dev; - device_id = pm8001_dev->device_id; pm8001_ha = pm8001_find_ha_by_dev(dev); PM8001_EH_DBG(pm8001_ha, @@ -1188,7 +1186,6 @@ int pm8001_abort_task(struct sas_task *task) { unsigned long flags; u32 tag; - u32 device_id; struct domain_device *dev ; struct pm8001_hba_info *pm8001_ha; struct scsi_lun lun; @@ -1202,7 +1199,6 @@ int pm8001_abort_task(struct sas_task *task) dev = task->dev; pm8001_dev = dev->lldd_dev; pm8001_ha = pm8001_find_ha_by_dev(dev); - device_id = pm8001_dev->device_id; phy_id = pm8001_dev->attached_phy; rc = pm8001_find_tag(task, &tag); if (rc == 0) {