linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] scsi: lpfc: make several unions static, fix non-ANSI prototype
@ 2018-03-13 12:08 Colin King
  2018-03-13 16:29 ` James Smart
  2018-03-15  3:37 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2018-03-13 12:08 UTC (permalink / raw)
  To: James Smart, Dick Kennedy, James E . J . Bottomley,
	Martin K . Petersen, linux-scsi
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

There are several unions that are local to the source and do not need
to be in global scope, so make them static. Also add in a missing void
parameter to functions lpfc_nvme_cmd_template and
lpfc_nvmet_cmd_template to clean up non-ANSI warning.

Cleans up sparse warnings:
drivers/scsi/lpfc/lpfc_nvme.c:68:19: warning: symbol
'lpfc_iread_cmd_template' was not declared. Should it be static?
drivers/scsi/lpfc/lpfc_nvme.c:69:19: warning: symbol
'lpfc_iwrite_cmd_template' was not declared. Should it be static?
drivers/scsi/lpfc/lpfc_nvme.c:70:19: warning: symbol
'lpfc_icmnd_cmd_template' was not declared. Should it be static?
drivers/scsi/lpfc/lpfc_nvme.c:74:24: warning: non-ANSI function
'lpfc_tsend_cmd_template' was not declared. Should it be static?
drivers/scsi/lpfc/lpfc_nvmet.c:78:19: warning: symbol
'lpfc_treceive_cmd_template' was not declared. Should it be static?
drivers/scsi/lpfc/lpfc_nvmet.c:79:19: warning: symbol
'lpfc_trsp_cmd_template' was not declared. Should it be static?
drivers/scsi/lpfc/lpfc_nvmet.c:83:25: warning: non-ANSI function
declaration of function 'lpfc_nvmet_cmd_template'

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

diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 52dd9479b538..378dca40ca20 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -65,13 +65,13 @@ lpfc_release_nvme_buf(struct lpfc_hba *, struct lpfc_nvme_buf *);
 
 static struct nvme_fc_port_template lpfc_nvme_template;
 
-union lpfc_wqe128 lpfc_iread_cmd_template;
-union lpfc_wqe128 lpfc_iwrite_cmd_template;
-union lpfc_wqe128 lpfc_icmnd_cmd_template;
+static union lpfc_wqe128 lpfc_iread_cmd_template;
+static union lpfc_wqe128 lpfc_iwrite_cmd_template;
+static union lpfc_wqe128 lpfc_icmnd_cmd_template;
 
 /* Setup WQE templates for NVME IOs */
 void
-lpfc_nvme_cmd_template()
+lpfc_nvme_cmd_template(void)
 {
 	union lpfc_wqe128 *wqe;
 
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
index 07f89524c320..7271c9d885dd 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.c
+++ b/drivers/scsi/lpfc/lpfc_nvmet.c
@@ -74,13 +74,13 @@ static int lpfc_nvmet_unsol_ls_issue_abort(struct lpfc_hba *,
 static void lpfc_nvmet_wqfull_flush(struct lpfc_hba *, struct lpfc_queue *,
 				    struct lpfc_nvmet_rcv_ctx *);
 
-union lpfc_wqe128 lpfc_tsend_cmd_template;
-union lpfc_wqe128 lpfc_treceive_cmd_template;
-union lpfc_wqe128 lpfc_trsp_cmd_template;
+static union lpfc_wqe128 lpfc_tsend_cmd_template;
+static union lpfc_wqe128 lpfc_treceive_cmd_template;
+static union lpfc_wqe128 lpfc_trsp_cmd_template;
 
 /* Setup WQE templates for NVME IOs */
 void
-lpfc_nvmet_cmd_template()
+lpfc_nvmet_cmd_template(void)
 {
 	union lpfc_wqe128 *wqe;
 
-- 
2.15.1

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

* Re: [PATCH][next] scsi: lpfc: make several unions static, fix non-ANSI prototype
  2018-03-13 12:08 [PATCH][next] scsi: lpfc: make several unions static, fix non-ANSI prototype Colin King
@ 2018-03-13 16:29 ` James Smart
  2018-03-15  3:37 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: James Smart @ 2018-03-13 16:29 UTC (permalink / raw)
  To: Colin King, Dick Kennedy, James E . J . Bottomley,
	Martin K . Petersen, linux-scsi
  Cc: kernel-janitors, linux-kernel

On 3/13/2018 5:08 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> There are several unions that are local to the source and do not need
> to be in global scope, so make them static. Also add in a missing void
> parameter to functions lpfc_nvme_cmd_template and
> lpfc_nvmet_cmd_template to clean up non-ANSI warning.
>
> Cleans up sparse warnings:
> drivers/scsi/lpfc/lpfc_nvme.c:68:19: warning: symbol
> 'lpfc_iread_cmd_template' was not declared. Should it be static?
> drivers/scsi/lpfc/lpfc_nvme.c:69:19: warning: symbol
> 'lpfc_iwrite_cmd_template' was not declared. Should it be static?
> drivers/scsi/lpfc/lpfc_nvme.c:70:19: warning: symbol
> 'lpfc_icmnd_cmd_template' was not declared. Should it be static?
> drivers/scsi/lpfc/lpfc_nvme.c:74:24: warning: non-ANSI function
> 'lpfc_tsend_cmd_template' was not declared. Should it be static?
> drivers/scsi/lpfc/lpfc_nvmet.c:78:19: warning: symbol
> 'lpfc_treceive_cmd_template' was not declared. Should it be static?
> drivers/scsi/lpfc/lpfc_nvmet.c:79:19: warning: symbol
> 'lpfc_trsp_cmd_template' was not declared. Should it be static?
> drivers/scsi/lpfc/lpfc_nvmet.c:83:25: warning: non-ANSI function
> declaration of function 'lpfc_nvmet_cmd_template'
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   drivers/scsi/lpfc/lpfc_nvme.c  | 8 ++++----
>   drivers/scsi/lpfc/lpfc_nvmet.c | 8 ++++----
>   2 files changed, 8 insertions(+), 8 deletions(-)
>
>

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

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

* Re: [PATCH][next] scsi: lpfc: make several unions static, fix non-ANSI prototype
  2018-03-13 12:08 [PATCH][next] scsi: lpfc: make several unions static, fix non-ANSI prototype Colin King
  2018-03-13 16:29 ` James Smart
@ 2018-03-15  3:37 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2018-03-15  3:37 UTC (permalink / raw)
  To: Colin King
  Cc: James Smart, Dick Kennedy, James E . J . Bottomley,
	Martin K . Petersen, linux-scsi, kernel-janitors, linux-kernel


Colin,

> There are several unions that are local to the source and do not need
> to be in global scope, so make them static. Also add in a missing void
> parameter to functions lpfc_nvme_cmd_template and
> lpfc_nvmet_cmd_template to clean up non-ANSI warning.

Applied to 4.17/scsi-queue. Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2018-03-15  3:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-13 12:08 [PATCH][next] scsi: lpfc: make several unions static, fix non-ANSI prototype Colin King
2018-03-13 16:29 ` James Smart
2018-03-15  3:37 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).