diff mbox

[-next] scsi: hisi_sas: make local symbol host_attrs static

Message ID 1515669238-125768-1-git-send-email-weiyongjun1@huawei.com (mailing list archive)
State Accepted
Headers show

Commit Message

weiyongjun (A) Jan. 11, 2018, 11:13 a.m. UTC
Fixes the following sparse warning:

drivers/scsi/hisi_sas/hisi_sas_main.c:1691:25: warning:
 symbol 'host_attrs' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

John Garry Jan. 11, 2018, 11:19 a.m. UTC | #1
On 11/01/2018 11:13, Wei Yongjun wrote:
> Fixes the following sparse warning:
>
> drivers/scsi/hisi_sas/hisi_sas_main.c:1691:25: warning:
>  symbol 'host_attrs' was not declared. Should it be static?
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Acked-by: John Garry <john.garry@huawei.com>

> ---
>  drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
> index 360ecef..e3e7285 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas_main.c
> +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
> @@ -1688,7 +1688,7 @@ void hisi_sas_kill_tasklets(struct hisi_hba *hisi_hba)
>  struct scsi_transport_template *hisi_sas_stt;
>  EXPORT_SYMBOL_GPL(hisi_sas_stt);
>
> -struct device_attribute *host_attrs[] = {
> +static struct device_attribute *host_attrs[] = {
>  	&dev_attr_phy_event_threshold,
>  	NULL,
>  };
>
>
> .
>
Martin K. Petersen Jan. 17, 2018, 6:01 a.m. UTC | #2
Wei,

> Fixes the following sparse warning:
>
> drivers/scsi/hisi_sas/hisi_sas_main.c:1691:25: warning:
>  symbol 'host_attrs' was not declared. Should it be static?

Applied to 4.16/scsi-queue. Thank you!
diff mbox

Patch

diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 360ecef..e3e7285 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -1688,7 +1688,7 @@  void hisi_sas_kill_tasklets(struct hisi_hba *hisi_hba)
 struct scsi_transport_template *hisi_sas_stt;
 EXPORT_SYMBOL_GPL(hisi_sas_stt);
 
-struct device_attribute *host_attrs[] = {
+static struct device_attribute *host_attrs[] = {
 	&dev_attr_phy_event_threshold,
 	NULL,
 };