Skip to contentSkip to conversation

net: fec: Place 'inline' in the beginning of declaration

PATCH Superseded Fabio Estevam 2 participants 2 messages Jan 8, 2013

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
maintainer
#1 lore raw
In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>
Date: Tue, 8 Jan 2013 01:20:33 -0200

Quoted 8 lines

From: Fabio Estevam <[email protected]>

Fix the following warning when building with W=1 option:

drivers/net/ethernet/freescale/fec.c:810:1: warning: '__inline__' is not at beginning of declaration [-Wold-style-declaration]

Putting __inline__ in the beggining then checkpath complains:

Quoted 7 lines

WARNING: plain inline is preferred over __inline__ #24: FILE: drivers/net/ethernet/freescale/fec.c:810:
+static __inline__ void fec_get_mac(struct net_device *ndev)

,so use 'inline' in the beginning and make gcc and checkpath happy.

I would remove the inline tag altogether, it's pointless.

#0 lore raw

PATCH 1/1 net: fec: Place 'inline' in the beginning of declaration

From: Fabio Estevam <[email protected]>

Fix the following warning when building with W=1 option:

drivers/net/ethernet/freescale/fec.c:810:1: warning: '__inline__' is not at beginning of declaration [-Wold-style-declaration]

Putting __inline__ in the beggining then checkpath complains:

WARNING: plain inline is preferred over __inline__ #24: FILE: drivers/net/ethernet/freescale/fec.c:810:
+static __inline__ void fec_get_mac(struct net_device *ndev)

,so use 'inline' in the beginning and make gcc and checkpath happy.

---
 drivers/net/ethernet/freescale/fec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/fec.c +1 -1
index a379319..4624f6b 100644
@@ -807,7 +807,7 @@ fec_enet_interrupt(int irq, void *dev_id)
 
 
 /* ------------------------------------------------------------------------- */
-static void __inline__ fec_get_mac(struct net_device *ndev)
+static inline void fec_get_mac(struct net_device *ndev)
 {
 	struct fec_enet_private *fep = netdev_priv(ndev);
 	struct fec_platform_data *pdata = fep->pdev->dev.platform_data;
Signature · 1 line
1.7.9.5