linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] lan743x: make functions lan743x_csr_read and lan743x_csr_read static
@ 2018-03-11 16:55 Colin King
  2018-03-12 15:13 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-03-11 16:55 UTC (permalink / raw)
  To: Bryan Whitehead, Microchip Linux Driver Support, netdev
  Cc: kernel-janitors, linux-kernel

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

Functions lan743x_csr_read and lan743x_csr_read are local to the source
and do not need to be in global scope, so make them static.

Cleans up sparse warning:
drivers/net/ethernet/microchip/lan743x_main.c:56:5: warning: symbol
lan743x_csr_read' was not declared. Should it be static?
drivers/net/ethernet/microchip/lan743x_main.c:61:6: warning: symbol
'lan743x_csr_write' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/microchip/lan743x_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 73ce3ee6a520..dd947e4dd3ce 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -53,12 +53,13 @@ static int lan743x_pci_init(struct lan743x_adapter *adapter,
 	return ret;
 }
 
-u32 lan743x_csr_read(struct lan743x_adapter *adapter, int offset)
+static u32 lan743x_csr_read(struct lan743x_adapter *adapter, int offset)
 {
 	return ioread32(&adapter->csr.csr_address[offset]);
 }
 
-void lan743x_csr_write(struct lan743x_adapter *adapter, int offset, u32 data)
+static void lan743x_csr_write(struct lan743x_adapter *adapter, int offset,
+			      u32 data)
 {
 	iowrite32(data, &adapter->csr.csr_address[offset]);
 }
-- 
2.15.1

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

* Re: [PATCH][next] lan743x: make functions lan743x_csr_read and lan743x_csr_read static
  2018-03-11 16:55 [PATCH][next] lan743x: make functions lan743x_csr_read and lan743x_csr_read static Colin King
@ 2018-03-12 15:13 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-03-12 15:13 UTC (permalink / raw)
  To: colin.king
  Cc: bryan.whitehead, UNGLinuxDriver, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Sun, 11 Mar 2018 17:55:47 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> Functions lan743x_csr_read and lan743x_csr_read are local to the source
> and do not need to be in global scope, so make them static.
> 
> Cleans up sparse warning:
> drivers/net/ethernet/microchip/lan743x_main.c:56:5: warning: symbol
> lan743x_csr_read' was not declared. Should it be static?
> drivers/net/ethernet/microchip/lan743x_main.c:61:6: warning: symbol
> 'lan743x_csr_write' was not declared. Should it be static?
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-11 16:55 [PATCH][next] lan743x: make functions lan743x_csr_read and lan743x_csr_read static Colin King
2018-03-12 15:13 ` David Miller

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).