diff mbox series

scsi: myrb: make some symblos static

Message ID 20200915084018.2826922-1-yanaijie@huawei.com
State New
Headers show
Series scsi: myrb: make some symblos static | expand

Commit Message

Jason Yan Sept. 15, 2020, 8:40 a.m. UTC
This addresses the following sparse warning:

drivers/scsi/myrb.c:2229:27: warning: symbol 'myrb_template' was not
declared. Should it be static?
drivers/scsi/myrb.c:2318:31: warning: symbol 'myrb_raid_functions' was
not declared. Should it be static?
drivers/scsi/myrb.c:2492:6: warning: symbol 'myrb_err_status' was not
declared. Should it be static?

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

Comments

Martin K. Petersen Sept. 16, 2020, 1:32 a.m. UTC | #1
Jason,

> This addresses the following sparse warning:
>
> drivers/scsi/myrb.c:2229:27: warning: symbol 'myrb_template' was not
> declared. Should it be static?
> drivers/scsi/myrb.c:2318:31: warning: symbol 'myrb_raid_functions' was
> not declared. Should it be static?
> drivers/scsi/myrb.c:2492:6: warning: symbol 'myrb_err_status' was not
> declared. Should it be static?

Applied to 5.10/scsi-staging, thanks!
Martin K. Petersen Sept. 22, 2020, 3:57 a.m. UTC | #2
On Tue, 15 Sep 2020 16:40:18 +0800, Jason Yan wrote:

> This addresses the following sparse warning:
> 
> drivers/scsi/myrb.c:2229:27: warning: symbol 'myrb_template' was not
> declared. Should it be static?
> drivers/scsi/myrb.c:2318:31: warning: symbol 'myrb_raid_functions' was
> not declared. Should it be static?
> drivers/scsi/myrb.c:2492:6: warning: symbol 'myrb_err_status' was not
> declared. Should it be static?

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: myrb: Make some symblos static
      https://git.kernel.org/mkp/scsi/c/9d8a5510281c
diff mbox series

Patch

diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c
index b2869c5dd7fb..cbf1e8b091b9 100644
--- a/drivers/scsi/myrb.c
+++ b/drivers/scsi/myrb.c
@@ -2226,7 +2226,7 @@  static struct device_attribute *myrb_shost_attrs[] = {
 	NULL,
 };
 
-struct scsi_host_template myrb_template = {
+static struct scsi_host_template myrb_template = {
 	.module			= THIS_MODULE,
 	.name			= "DAC960",
 	.proc_name		= "myrb",
@@ -2315,7 +2315,7 @@  static void myrb_get_state(struct device *dev)
 	raid_set_state(myrb_raid_template, dev, state);
 }
 
-struct raid_function_template myrb_raid_functions = {
+static struct raid_function_template myrb_raid_functions = {
 	.cookie		= &myrb_template,
 	.is_raid	= myrb_is_raid,
 	.get_resync	= myrb_get_resync,
@@ -2489,7 +2489,7 @@  static void myrb_monitor(struct work_struct *work)
  *
  * Return: true for fatal errors and false otherwise.
  */
-bool myrb_err_status(struct myrb_hba *cb, unsigned char error,
+static bool myrb_err_status(struct myrb_hba *cb, unsigned char error,
 		unsigned char parm0, unsigned char parm1)
 {
 	struct pci_dev *pdev = cb->pdev;