All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netdev: octeon_mgmt: ISO C90 forbids mixed declarations and code
@ 2014-09-13 19:05 Heinrich Schuchardt
  2014-09-13 19:11 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2014-09-13 19:05 UTC (permalink / raw)
  To: David Daney
  Cc: David S. Miller, Luka Perkov, Willem de Bruijn, Russell King,
	netdev, linux-kernel, Heinrich Schuchardt

Compiling with OCTEON_MGMT_ETHERNET gives a warning
drivers/net/ethernet/octeon/octeon_mgmt.c:295:4:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]

The patch cleans up the code.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/net/ethernet/octeon/octeon_mgmt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/octeon/octeon_mgmt.c b/drivers/net/ethernet/octeon/octeon_mgmt.c
index 979c698..8af453a 100644
--- a/drivers/net/ethernet/octeon/octeon_mgmt.c
+++ b/drivers/net/ethernet/octeon/octeon_mgmt.c
@@ -254,6 +254,7 @@ static void octeon_mgmt_clean_tx_buffers(struct octeon_mgmt *p)
 	struct sk_buff *skb;
 	int cleaned = 0;
 	unsigned long flags;
+	u64 ns;
 
 	mix_orcnt.u64 = cvmx_read_csr(p->mix + MIX_ORCNT);
 	while (mix_orcnt.s.orcnt) {
@@ -292,7 +293,7 @@ static void octeon_mgmt_clean_tx_buffers(struct octeon_mgmt *p)
 			struct skb_shared_hwtstamps ts;
 			memset(&ts, 0, sizeof(ts));
 			/* Read the timestamp */
-			u64 ns = cvmx_read_csr(CVMX_MIXX_TSTAMP(p->port));
+			ns = cvmx_read_csr(CVMX_MIXX_TSTAMP(p->port));
 			/* Remove the timestamp from the FIFO */
 			cvmx_write_csr(CVMX_MIXX_TSCTL(p->port), 0);
 			/* Tell the kernel about the timestamp */
-- 
2.1.0


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

end of thread, other threads:[~2014-09-13 20:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-13 19:05 [PATCH] netdev: octeon_mgmt: ISO C90 forbids mixed declarations and code Heinrich Schuchardt
2014-09-13 19:11 ` Joe Perches
2014-09-13 20:03   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.