All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: myrs: make some symbols static
@ 2020-09-15  8:40 Jason Yan
  2020-09-16  1:31 ` Martin K. Petersen
  2020-09-22  3:57 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Jason Yan @ 2020-09-15  8:40 UTC (permalink / raw)
  To: hare, jejb, martin.petersen, lee.jones, linux-scsi; +Cc: Jason Yan, Hulk Robot

This addresses the following sparse warning:

drivers/scsi/myrs.c:1532:5: warning: symbol 'myrs_host_reset' was not
declared. Should it be static?
drivers/scsi/myrs.c:1922:27: warning: symbol 'myrs_template' was not
declared. Should it be static?
drivers/scsi/myrs.c:2036:31: warning: symbol 'myrs_raid_functions' was
not declared. Should it be static?
drivers/scsi/myrs.c:2046:6: warning: symbol 'myrs_flush_cache' was not
declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/scsi/myrs.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c
index 103803e779f2..7a3ade765ce3 100644
--- a/drivers/scsi/myrs.c
+++ b/drivers/scsi/myrs.c
@@ -1529,7 +1529,7 @@ static struct device_attribute *myrs_shost_attrs[] = {
 /*
  * SCSI midlayer interface
  */
-int myrs_host_reset(struct scsi_cmnd *scmd)
+static int myrs_host_reset(struct scsi_cmnd *scmd)
 {
 	struct Scsi_Host *shost = scmd->device->host;
 	struct myrs_hba *cs = shost_priv(shost);
@@ -1919,7 +1919,7 @@ static void myrs_slave_destroy(struct scsi_device *sdev)
 	kfree(sdev->hostdata);
 }
 
-struct scsi_host_template myrs_template = {
+static struct scsi_host_template myrs_template = {
 	.module			= THIS_MODULE,
 	.name			= "DAC960",
 	.proc_name		= "myrs",
@@ -2033,7 +2033,7 @@ myrs_get_state(struct device *dev)
 	raid_set_state(myrs_raid_template, dev, state);
 }
 
-struct raid_function_template myrs_raid_functions = {
+static struct raid_function_template myrs_raid_functions = {
 	.cookie		= &myrs_template,
 	.is_raid	= myrs_is_raid,
 	.get_resync	= myrs_get_resync,
@@ -2043,7 +2043,7 @@ struct raid_function_template myrs_raid_functions = {
 /*
  * PCI interface functions
  */
-void myrs_flush_cache(struct myrs_hba *cs)
+static void myrs_flush_cache(struct myrs_hba *cs)
 {
 	myrs_dev_op(cs, MYRS_IOCTL_FLUSH_DEVICE_DATA, MYRS_RAID_CONTROLLER);
 }
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: myrs: make some symbols static
  2020-09-15  8:40 [PATCH] scsi: myrs: make some symbols static Jason Yan
@ 2020-09-16  1:31 ` Martin K. Petersen
  2020-09-22  3:57 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2020-09-16  1:31 UTC (permalink / raw)
  To: Jason Yan; +Cc: hare, jejb, martin.petersen, lee.jones, linux-scsi, Hulk Robot


Jason,

> This addresses the following sparse warning:
>
> drivers/scsi/myrs.c:1532:5: warning: symbol 'myrs_host_reset' was not
> declared. Should it be static?
> drivers/scsi/myrs.c:1922:27: warning: symbol 'myrs_template' was not
> declared. Should it be static?
> drivers/scsi/myrs.c:2036:31: warning: symbol 'myrs_raid_functions' was
> not declared. Should it be static?
> drivers/scsi/myrs.c:2046:6: warning: symbol 'myrs_flush_cache' was not
> declared. Should it be static?

Applied to 5.10/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: myrs: make some symbols static
  2020-09-15  8:40 [PATCH] scsi: myrs: make some symbols static Jason Yan
  2020-09-16  1:31 ` Martin K. Petersen
@ 2020-09-22  3:57 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2020-09-22  3:57 UTC (permalink / raw)
  To: linux-scsi, Jason Yan, hare, lee.jones, jejb
  Cc: Martin K . Petersen, Hulk Robot

On Tue, 15 Sep 2020 16:40:08 +0800, Jason Yan wrote:

> This addresses the following sparse warning:
> 
> drivers/scsi/myrs.c:1532:5: warning: symbol 'myrs_host_reset' was not
> declared. Should it be static?
> drivers/scsi/myrs.c:1922:27: warning: symbol 'myrs_template' was not
> declared. Should it be static?
> drivers/scsi/myrs.c:2036:31: warning: symbol 'myrs_raid_functions' was
> not declared. Should it be static?
> drivers/scsi/myrs.c:2046:6: warning: symbol 'myrs_flush_cache' was not
> declared. Should it be static?

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: myrs: Make some symbols static
      https://git.kernel.org/mkp/scsi/c/ebe41b991d37

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-22  3:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15  8:40 [PATCH] scsi: myrs: make some symbols static Jason Yan
2020-09-16  1:31 ` Martin K. Petersen
2020-09-22  3:57 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.