lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 06 Feb 2013 17:05:38 -0800
From:	Joe Perches <joe@...ches.com>
To:	Michael Chan <mchan@...adcom.com>
Cc:	netdev <netdev@...r.kernel.org>, Hauke Mehrtens <hauke@...ke-m.de>,
	mcarlson@...adcom.com, nsujir@...adcom.com
Subject: Re: [RFC PATCH] tg3: Convert chip type macros to inline functions

On Wed, 2013-02-06 at 16:41 -0800, Michael Chan wrote:
> On Wed, 2013-02-06 at 15:44 -0800, Joe Perches wrote:
> > There are several macros that are used for
> > chip identification.
> > 
> > Perhaps it'd be better to use static inlines
> > instead of these macros as the code becomes a
> > bit more readable with less uppercase use.
[]
> > #define GET_ASIC_REV(CHIP_REV_ID)       ((CHIP_REV_ID) >> 12)
> > 
> > becomes:
> > 
> > static inline u32 tg3_asic_rev(const struct tg3 *tp)
> > {
> >         return tp->pci_chip_rev_id >> 12;
> > }

[]

> I think these don't have to be inline.  there is only one call in the
> fast path that I can see (tg3_start_xmit), and we can easily change that
> to test for a flag instead.  I wonder if that will make it smaller.

Nope.

Even if you make it static in tg3.c,
gcc inlines it anyway.



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

Powered by Openwall GNU/*/Linux Powered by OpenVZ