All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Namjae Jeon <linkinjeon@gmail.com>
Cc: arnd@arndb.de, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] include: Fix compile warning in include/linux/bitops.h
Date: Mon, 11 Jun 2012 15:59:19 -0700	[thread overview]
Message-ID: <20120611155919.7decee80.akpm@linux-foundation.org> (raw)
In-Reply-To: <1339211730-10398-1-git-send-email-linkinjeon@gmail.com>

On Fri,  8 Jun 2012 23:15:30 -0400
Namjae Jeon <linkinjeon@gmail.com> wrote:

> The compile warning is caused by __const_hweight8 when using
> hweight_long with -Wsign-compare option.
> The reason is that the default return value of this macro is signed.
> So need type casting to remove warning.

um, what warning?

Please always quote the compiler messages when fixing build warnings or
errors.

> index fa2a50b..3ad0dae 100644
> --- a/include/asm-generic/bitops/const_hweight.h
> +++ b/include/asm-generic/bitops/const_hweight.h
> @@ -4,7 +4,7 @@
>  /*
>   * Compile time versions of __arch_hweightN()
>   */
> -#define __const_hweight8(w)		\
> +#define __const_hweight8(w)	(unsigned long)	\
>        (	(!!((w) & (1ULL << 0))) +	\
>  	(!!((w) & (1ULL << 1))) +	\
>  	(!!((w) & (1ULL << 2))) +	\

  reply	other threads:[~2012-06-11 22:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-09  3:15 [PATCH] include: Fix compile warning in include/linux/bitops.h Namjae Jeon
2012-06-11 22:59 ` Andrew Morton [this message]
2012-06-12  0:05   ` Namjae Jeon
  -- strict thread matches above, loose matches on Subject: below --
2011-08-24 15:23 Namjae Jeon
2011-08-24 15:29 ` NamJae Jeon

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=20120611155919.7decee80.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=linkinjeon@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@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.