From: Wolfgang Grandegger <wg@grandegger.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, socketcan-core@lists.berlios.de,
haas@ems-wuensche.com, anantgole@ti.com, mkl@pengutronix.de
Subject: Re: [PATCH] can: provide library functions for skb allocation
Date: Sun, 18 Oct 2009 20:46:17 +0200 [thread overview]
Message-ID: <4ADB6279.3000403@grandegger.com> (raw)
In-Reply-To: <20091017.235520.265660027.davem@davemloft.net>
David Miller wrote:
> From: Wolfgang Grandegger <wg@grandegger.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().
OK, I just dent out v2 of this patch.
Wolfgang.
prev parent reply other threads:[~2009-10-18 18:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-15 9:22 [PATCH] can: provide library functions for skb allocation Wolfgang Grandegger
2009-10-18 6:55 ` David Miller
2009-10-18 18:46 ` Wolfgang Grandegger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ADB6279.3000403@grandegger.com \
--to=wg@grandegger.com \
--cc=anantgole@ti.com \
--cc=davem@davemloft.net \
--cc=haas@ems-wuensche.com \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=socketcan-core@lists.berlios.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).