From 7149e0cb31c5d5db35e71d2c4ce57b6053b5855e Mon Sep 17 00:00:00 2001 From: Jason Yan Date: Thu, 27 Aug 2020 20:58:51 +0800 Subject: scsi: isci: Remove set but not used 'index' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This addresses the following gcc warning with "make W=1": drivers/scsi/isci/host.c: In function ‘sci_controller_complete_io’: drivers/scsi/isci/host.c:2674:6: warning: variable ‘index’ set but not used [-Wunused-but-set-variable] 2674 | u16 index; | ^~~~~ Link: https://lore.kernel.org/r/20200827125851.428071-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen --- drivers/scsi/isci/host.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/scsi/isci') diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c index 7b5deae68d33..7ebfa3c8cdc7 100644 --- a/drivers/scsi/isci/host.c +++ b/drivers/scsi/isci/host.c @@ -2671,7 +2671,6 @@ enum sci_status sci_controller_complete_io(struct isci_host *ihost, struct isci_request *ireq) { enum sci_status status; - u16 index; switch (ihost->sm.current_state_id) { case SCIC_STOPPING: @@ -2682,7 +2681,6 @@ enum sci_status sci_controller_complete_io(struct isci_host *ihost, if (status != SCI_SUCCESS) return status; - index = ISCI_TAG_TCI(ireq->io_tag); clear_bit(IREQ_ACTIVE, &ireq->flags); return SCI_SUCCESS; default: -- cgit v1.2.3 From 7867c549d5741437b771a91e2a1d5e77e48bc3d0 Mon Sep 17 00:00:00 2001 From: Jason Yan Date: Sat, 12 Sep 2020 11:37:41 +0800 Subject: scsi: isci: Make isci_host_attrs static This eliminates the following sparse warning: drivers/scsi/isci/init.c:145:25: warning: symbol 'isci_host_attrs' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200912033741.142415-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen --- drivers/scsi/isci/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi/isci') diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c index 085e285f427d..93bc9019667f 100644 --- a/drivers/scsi/isci/init.c +++ b/drivers/scsi/isci/init.c @@ -142,7 +142,7 @@ static ssize_t isci_show_id(struct device *dev, struct device_attribute *attr, c static DEVICE_ATTR(isci_id, S_IRUGO, isci_show_id, NULL); -struct device_attribute *isci_host_attrs[] = { +static struct device_attribute *isci_host_attrs[] = { &dev_attr_isci_id, NULL }; -- cgit v1.2.3 From 2494ebe1b3f73c01b92b7bf623de261e7bd8677f Mon Sep 17 00:00:00 2001 From: Jason Yan Date: Tue, 15 Sep 2020 16:40:00 +0800 Subject: scsi: isci: Make scu_link_layer_set_txcomsas_timeout() static This addresses the following sparse warning: drivers/scsi/isci/phy.c:672:6: warning: symbol 'scu_link_layer_set_txcomsas_timeout' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200915084000.2826741-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen --- drivers/scsi/isci/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi/isci') diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c index 7f9b3f20e5e4..251d763130d4 100644 --- a/drivers/scsi/isci/phy.c +++ b/drivers/scsi/isci/phy.c @@ -669,7 +669,7 @@ static const char *phy_event_name(u32 event_code) phy_state_name(state), phy_event_name(code), code) -void scu_link_layer_set_txcomsas_timeout(struct isci_phy *iphy, u32 timeout) +static void scu_link_layer_set_txcomsas_timeout(struct isci_phy *iphy, u32 timeout) { u32 val; -- cgit v1.2.3