[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <47BAC206.5070304@trash.net>
Date: Tue, 19 Feb 2008 12:48:22 +0100
From: Patrick McHardy <kaber@...sh.net>
To: David Miller <davem@...emloft.net>
CC: joe@...ches.com, bruno@...nktube.com, netdev@...r.kernel.org,
jgarzik@...ox.com, linux-wireless@...r.kernel.org,
linville@...driver.com
Subject: Re: [PATCH] net/8021q/vlan_dev.c - Use print_mac
David Miller wrote:
> From: David Miller <davem@...emloft.net>
> Date: Mon, 18 Feb 2008 16:43:05 -0800 (PST)
>
>> I think we can fix this easily by using __attribute_const_
>> on the print_mac() declaration. Let me play with that.
>
> Actually it seems the 'pure' attribute is more important
> here. Although it's not semantically a perfect match,
> what we need to tell the compiler is basically that:
>
> 1) the return value depends upon the inputs
> 2) if the input is not used, it's safe to avoid the call
>
> and 'pure' accomplishes that without any unwanted side-effects.
>
> I think this will not result in any unwanted over-optimization.
> Because if the inputs change in any way GCC has to emit the
> call.
>
> Any objections?
This seems fine to me, thanks Dave.
--
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