[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1400105033.30384.34.camel@joe-AO725>
Date: Wed, 14 May 2014 15:03:53 -0700
From: Joe Perches <joe@...ches.com>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: Veaceslav Falico <vfalico@...il.com>,
David Laight <David.Laight@...lab.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Jay Vosburgh <j.vosburgh@...il.com>,
Andy Gospodarek <andy@...yhouse.net>,
Veaceslav Falico <vfalico@...hat.com>
Subject: Re: [PATCH net-next 0/5] bonding: simple macro cleanup
On Wed, 2014-05-14 at 14:52 -0700, Alexei Starovoitov wrote:
> I cannot imagine the case where macro would be faster than static inline
> unless it wasn't inlined.
For an example, look at commit 4153577a8d
("tg3: Use different macros for pci_chip_rev_id accesses")
Converting these macros to static inline produces
larger/slower code. (at least with gcc 4.7.3)
+#define tg3_chip_rev_id(tp) \
+ ((tp)->pci_chip_rev_id)
+#define tg3_asic_rev(tp) \
+ ((tp)->pci_chip_rev_id >> 12)
+#define tg3_chip_rev(tp) \
+ ((tp)->pci_chip_rev_id >> 8)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists