* [PATCH] net: fec: Place 'inline' in the beginning of declaration
@ 2013-01-08 3:20 Fabio Estevam
2013-01-08 3:23 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2013-01-08 3:20 UTC (permalink / raw)
To: davem; +Cc: shawn.guo, netdev, Fabio Estevam
From: Fabio Estevam <fabio.estevam@freescale.com>
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.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/net/ethernet/freescale/fec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index a379319..4624f6b 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: fec: Place 'inline' in the beginning of declaration
2013-01-08 3:20 [PATCH] net: fec: Place 'inline' in the beginning of declaration Fabio Estevam
@ 2013-01-08 3:23 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-01-08 3:23 UTC (permalink / raw)
To: festevam; +Cc: shawn.guo, netdev, fabio.estevam
From: Fabio Estevam <festevam@gmail.com>
Date: Tue, 8 Jan 2013 01:20:33 -0200
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> 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.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
I would remove the inline tag altogether, it's pointless.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-08 3:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-08 3:20 [PATCH] net: fec: Place 'inline' in the beginning of declaration Fabio Estevam
2013-01-08 3:23 ` 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).