All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-sparse@vger.kernel.org,
	Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH] byteswap: don't use __builtin_bswap*() with sparse
Date: Thu, 11 Aug 2016 13:55:48 +0200	[thread overview]
Message-ID: <2133648.lb1RCaYlXp@wuerfel> (raw)
In-Reply-To: <1470914102-26389-1-git-send-email-johannes@sipsolutions.net>

On Thursday, August 11, 2016 1:15:02 PM CEST Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> Although sparse declares __builtin_bswap*(), it can't actually
> do constant folding inside them (yet). As such, things like
> 
>   switch (protocol) {
>   case htons(ETH_P_IP):
>           break;
>   }
> 
> which we do all over the place cause sparse to warn that it
> expects a constant instead of a function call.
> 
> Disable __HAVE_BUILTIN_BSWAP*__ if __CHECKER__ is defined to
> avoid this.
> 
> Cc: Arnd Bergmann <arnd@arndb.de>
> Fixes: 7322dd755e7d ("byteswap: try to avoid __builtin_constant_p gcc bug")
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Looks good, thanks for addressing this!

Acked-by: Arnd Bergmann <arnd@arndb.de>

      reply	other threads:[~2016-08-11 11:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11 11:15 [PATCH] byteswap: don't use __builtin_bswap*() with sparse Johannes Berg
2016-08-11 11:55 ` Arnd Bergmann [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=2133648.lb1RCaYlXp@wuerfel \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    /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.