From patchwork Sat Aug 31 13:03:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 11124907 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 760BA1399 for ; Sat, 31 Aug 2019 13:01:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 503FE217D7 for ; Sat, 31 Aug 2019 13:01:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727501AbfHaNAl (ORCPT ); Sat, 31 Aug 2019 09:00:41 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:33136 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726659AbfHaNAl (ORCPT ); Sat, 31 Aug 2019 09:00:41 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id CFE00A00FDAB9886FE67; Sat, 31 Aug 2019 21:00:38 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Sat, 31 Aug 2019 21:00:31 +0800 From: YueHaibing To: Don Brace , "James E.J. Bottomley" , Murthy Bhat , "Martin K. Petersen" CC: YueHaibing , , , , , Hulk Robot Subject: [PATCH -next] scsi: smartpqi: remove set but not used variable 'ctrl_info' Date: Sat, 31 Aug 2019 13:03:48 +0000 Message-ID: <20190831130348.20552-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.20.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 Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/smartpqi/smartpqi_init.c: In function 'pqi_driver_version_show': drivers/scsi/smartpqi/smartpqi_init.c:6164:24: warning: variable 'ctrl_info' set but not used [-Wunused-but-set-variable] commit 6d90615f1346 ("scsi: smartpqi: add sysfs entries") add it but never use, so remove it also variable 'shost' Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/scsi/smartpqi/smartpqi_init.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index ea5409bebf57..b9e7dabee1e5 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -6160,12 +6160,6 @@ static ssize_t pqi_firmware_version_show(struct device *dev, static ssize_t pqi_driver_version_show(struct device *dev, struct device_attribute *attr, char *buffer) { - struct Scsi_Host *shost; - struct pqi_ctrl_info *ctrl_info; - - shost = class_to_shost(dev); - ctrl_info = shost_to_hba(shost); - return snprintf(buffer, PAGE_SIZE, "%s\n", DRIVER_VERSION BUILD_TIMESTAMP); }