[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20091017.235520.265660027.davem@davemloft.net>
Date: Sat, 17 Oct 2009 23:55:20 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: wg@...ndegger.com
Cc: netdev@...r.kernel.org, socketcan-core@...ts.berlios.de,
haas@...-wuensche.com, anantgole@...com, mkl@...gutronix.de
Subject: Re: [PATCH] can: provide library functions for skb allocation
From: Wolfgang Grandegger <wg@...ndegger.com>
Date: Thu, 15 Oct 2009 11:22:18 +0200
> + skb->protocol = __constant_htons(ETH_P_CAN);
Please don't use __constant_htonX() for runtime invocatios.
It's only for situation which must be compile time evaluations
such as case statements and static initializations.
GCC can figure out that's it's constant if you just use
plan htonX().
--
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