All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Vlad Yasevich <vladislav.yasevich@hp.com>
Cc: David Miller <davem@davemloft.net>,
	linux-netdev <netdev@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] sctp: remove unnecessary byteshifting, calculate crc in	big-endian
Date: Fri, 11 Jul 2008 11:07:39 -0700	[thread overview]
Message-ID: <1215799659.15972.1.camel@brick> (raw)
In-Reply-To: <487603F0.9070604@hp.com>

On Thu, 2008-07-10 at 08:43 -0400, Vlad Yasevich wrote:
> Harvey Harrison wrote:
> > On Wed, 2008-07-09 at 16:59 -0400, Vlad Yasevich wrote:
> >> Harvey Harrison wrote:
> >>> -	__u32 crc32 = 0;
> >>> +	__be32 crc32 = cpu_to_be32(0);
> >> Does this actually do anything?
> >>
> >> Otherwise, good clean-up. Thanks
> >>
> > 
> > Keeps sparse happy.
> 
> Wouldn't just a (__force __be32)0 do the same thing and
> avoid useless byte swapping on little endian?
> 

I'm trying to get a patch accepted that makes cpu_to_be32 do compile-time
folding if possible, so in the future this won't produce any additional
code.  For now, just use __constant_cpu_to_be32(0)

Harvey


  reply	other threads:[~2008-07-11 18:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-04  1:13 [PATCH] sctp: remove unnecessary byteshifting, calculate crc in big-endian Harvey Harrison
2008-07-09 20:59 ` Vlad Yasevich
2008-07-10  1:01   ` Harvey Harrison
2008-07-10 12:43     ` Vlad Yasevich
2008-07-11 18:07       ` Harvey Harrison [this message]
2008-07-17 19:21       ` Harvey Harrison
2008-07-17 19:24         ` Vlad Yasevich
2008-07-17 19:31           ` [PATCHv2] sctp: remove unnecessary byteshifting, calculate directly " Harvey Harrison

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=1215799659.15972.1.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=vladislav.yasevich@hp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.