2019-10-28 20:41:03

by Yue Haibing

[permalink] [raw]
Subject: [PATCH -next] scsi: lpfc: Make lpfc_debugfs_ras_log_data static

Fix sparse warning:

drivers/scsi/lpfc/lpfc_debugfs.c:2083:1: warning:
symbol 'lpfc_debugfs_ras_log_data' was not declared. Should it be static?

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: YueHaibing <[email protected]>
---
drivers/scsi/lpfc/lpfc_debugfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
index 6c8effc..2e6a68d 100644
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
@@ -2079,8 +2079,8 @@ lpfc_debugfs_lockstat_write(struct file *file, const char __user *buf,
}
#endif

-int
-lpfc_debugfs_ras_log_data(struct lpfc_hba *phba, char *buffer, int size)
+static int lpfc_debugfs_ras_log_data(struct lpfc_hba *phba,
+ char *buffer, int size)
{
int copied = 0;
struct lpfc_dmabuf *dmabuf, *next;
--
2.7.4



2019-10-29 06:29:27

by James Smart

[permalink] [raw]
Subject: Re: [PATCH -next] scsi: lpfc: Make lpfc_debugfs_ras_log_data static

On 10/28/2019 6:25 AM, YueHaibing wrote:
> Fix sparse warning:
>
> drivers/scsi/lpfc/lpfc_debugfs.c:2083:1: warning:
> symbol 'lpfc_debugfs_ras_log_data' was not declared. Should it be static?
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: YueHaibing <[email protected]>
> ---
> drivers/scsi/lpfc/lpfc_debugfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
> index 6c8effc..2e6a68d 100644
> --- a/drivers/scsi/lpfc/lpfc_debugfs.c
> +++ b/drivers/scsi/lpfc/lpfc_debugfs.c
> @@ -2079,8 +2079,8 @@ lpfc_debugfs_lockstat_write(struct file *file, const char __user *buf,
> }
> #endif
>
> -int
> -lpfc_debugfs_ras_log_data(struct lpfc_hba *phba, char *buffer, int size)
> +static int lpfc_debugfs_ras_log_data(struct lpfc_hba *phba,
> + char *buffer, int size)
> {
> int copied = 0;
> struct lpfc_dmabuf *dmabuf, *next;

Looks Fine.  Thanks!

Reviewed-by: James Smart <[email protected]>

-- james

2019-10-29 09:22:26

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH -next] scsi: lpfc: Make lpfc_debugfs_ras_log_data static


YueHaibing,

> Fix sparse warning:
>
> drivers/scsi/lpfc/lpfc_debugfs.c:2083:1: warning:
> symbol 'lpfc_debugfs_ras_log_data' was not declared. Should it be static?

Applied to 5.5/scsi-queue, thanks!

--
Martin K. Petersen Oracle Linux Engineering