linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [SCSI] qla4xxx: mark symbols static where possible
@ 2016-08-29 10:46 Baoyou Xie
  2016-09-01 10:59 ` Nilesh Javali
  2016-09-02 10:08 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Baoyou Xie @ 2016-08-29 10:46 UTC (permalink / raw)
  To: QLogic-Storage-Upstream, jejb
  Cc: linux-scsi, linux-kernel, arnd, baoyou.xie, xie.baoyou

We get 1 warning when build kernel with W=1:
drivers/scsi/qla4xxx/ql4_nx.c:1846:10: warning: no previous prototype for 'ql4_84xx_ipmdio_rd_reg' [-Wmissing-prototypes]

In fact, this function is only used in the file in which it is
declared and don't need a declaration, but can be made static.
so this patch marks this function with 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 drivers/scsi/qla4xxx/ql4_nx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index ae87d6c..06ddd13 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -1843,7 +1843,7 @@ static uint32_t ql4_84xx_poll_wait_for_ready(struct scsi_qla_host *ha,
 	return rval;
 }
 
-uint32_t ql4_84xx_ipmdio_rd_reg(struct scsi_qla_host *ha, uint32_t addr1,
+static uint32_t ql4_84xx_ipmdio_rd_reg(struct scsi_qla_host *ha, uint32_t addr1,
 				uint32_t addr3, uint32_t mask, uint32_t addr,
 				uint32_t *data_ptr)
 {
-- 
2.7.4

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

* Re: [PATCH] [SCSI] qla4xxx: mark symbols static where possible
  2016-08-29 10:46 [PATCH] [SCSI] qla4xxx: mark symbols static where possible Baoyou Xie
@ 2016-09-01 10:59 ` Nilesh Javali
  2016-09-02 10:08 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Nilesh Javali @ 2016-09-01 10:59 UTC (permalink / raw)
  To: Baoyou Xie, Dept-Eng QLogic Storage Upstream,
	jejb@linux.vnet.ibm.com
  Cc: linux-scsi, linux-kernel, arnd@linaro.org, xie.baoyou@zte.com.cn



On 29/08/16 4:16 PM, "Baoyou Xie" <baoyou.xie@linaro.org> wrote:

>We get 1 warning when build kernel with W=1:
>drivers/scsi/qla4xxx/ql4_nx.c:1846:10: warning: no previous prototype for
>'ql4_84xx_ipmdio_rd_reg' [-Wmissing-prototypes]
>
>In fact, this function is only used in the file in which it is
>declared and don't need a declaration, but can be made static.
>so this patch marks this function with 'static'.
>
>Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
>---
> drivers/scsi/qla4xxx/ql4_nx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
>index ae87d6c..06ddd13 100644
>--- a/drivers/scsi/qla4xxx/ql4_nx.c
>+++ b/drivers/scsi/qla4xxx/ql4_nx.c
>@@ -1843,7 +1843,7 @@ static uint32_t ql4_84xx_poll_wait_for_ready(struct
>scsi_qla_host *ha,
> 	return rval;
> }
> 
>-uint32_t ql4_84xx_ipmdio_rd_reg(struct scsi_qla_host *ha, uint32_t addr1,
>+static uint32_t ql4_84xx_ipmdio_rd_reg(struct scsi_qla_host *ha,
>uint32_t addr1,
> 				uint32_t addr3, uint32_t mask, uint32_t addr,
> 				uint32_t *data_ptr)
> {
>-- 
>2.7.4


Acked-by: Nilesh Javali <nilesh.javali@qlogic.com>

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

* Re: [PATCH] [SCSI] qla4xxx: mark symbols static where possible
  2016-08-29 10:46 [PATCH] [SCSI] qla4xxx: mark symbols static where possible Baoyou Xie
  2016-09-01 10:59 ` Nilesh Javali
@ 2016-09-02 10:08 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2016-09-02 10:08 UTC (permalink / raw)
  To: Baoyou Xie
  Cc: QLogic-Storage-Upstream, jejb, linux-scsi, linux-kernel, arnd,
	xie.baoyou

>>>>> "Baoyou" == Baoyou Xie <baoyou.xie@linaro.org> writes:

Baoyou> We get 1 warning when build kernel with W=1:
Baoyou> drivers/scsi/qla4xxx/ql4_nx.c:1846:10: warning: no previous
Baoyou> prototype for 'ql4_84xx_ipmdio_rd_reg' [-Wmissing-prototypes]

Baoyou> In fact, this function is only used in the file in which it is
Baoyou> declared and don't need a declaration, but can be made static.
Baoyou> so this patch marks this function with 'static'.

Applied to 4.9/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2016-09-02 10:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-29 10:46 [PATCH] [SCSI] qla4xxx: mark symbols static where possible Baoyou Xie
2016-09-01 10:59 ` Nilesh Javali
2016-09-02 10:08 ` 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).