diff mbox

scsi: lpfc: make a couple of functions static

Message ID 20170518093524.13549-1-colin.king@canonical.com (mailing list archive)
State Deferred, archived
Headers show

Commit Message

Colin King May 18, 2017, 9:35 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

functions lpfc_nvmet_cleanup_io_context and lpfc_nvmet_setup_io_context
can be made static as they do not need to be in global scope.

Cleans up sparse warnings:
  "warning: symbol 'lpfc_nvmet_cleanup_io_context' was not declared.
   Should it be static?"
  "warning: symbol 'lpfc_nvmet_setup_io_context' was not declared.
   Should it be static?"

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/scsi/lpfc/lpfc_nvmet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

James Smart May 29, 2017, 11:08 p.m. UTC | #1
Patch is fine.

Signed-off-by: James Smart  <james.smart@broadcom.com>

-- james


On 5/18/2017 2:35 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> functions lpfc_nvmet_cleanup_io_context and lpfc_nvmet_setup_io_context
> can be made static as they do not need to be in global scope.
>
> Cleans up sparse warnings:
>    "warning: symbol 'lpfc_nvmet_cleanup_io_context' was not declared.
>     Should it be static?"
>    "warning: symbol 'lpfc_nvmet_setup_io_context' was not declared.
>     Should it be static?"
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>
Martin K. Petersen June 13, 2017, 1:05 a.m. UTC | #2
Colin,

> functions lpfc_nvmet_cleanup_io_context and
> lpfc_nvmet_setup_io_context can be made static as they do not need to
> be in global scope.
>
> Cleans up sparse warnings:
>   "warning: symbol 'lpfc_nvmet_cleanup_io_context' was not declared.
>    Should it be static?"
>   "warning: symbol 'lpfc_nvmet_setup_io_context' was not declared.
>    Should it be static?"

Applied to 4.13/scsi-queue, thanks!
diff mbox

Patch

diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
index f94294b77b7b..469958e3d50a 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.c
+++ b/drivers/scsi/lpfc/lpfc_nvmet.c
@@ -828,7 +828,7 @@  static struct nvmet_fc_target_template lpfc_tgttemplate = {
 	.target_priv_sz = sizeof(struct lpfc_nvmet_tgtport),
 };
 
-void
+static void
 lpfc_nvmet_cleanup_io_context(struct lpfc_hba *phba)
 {
 	struct lpfc_nvmet_ctxbuf *ctx_buf, *next_ctx_buf;
@@ -858,7 +858,7 @@  lpfc_nvmet_cleanup_io_context(struct lpfc_hba *phba)
 	}
 }
 
-int
+static int
 lpfc_nvmet_setup_io_context(struct lpfc_hba *phba)
 {
 	struct lpfc_nvmet_ctxbuf *ctx_buf;