All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qian Cai <quic_qiancai@quicinc.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Yury Norov <yury.norov@gmail.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] bitmap: simplify GENMASK(size - 1, 0) lines
Date: Tue, 26 Oct 2021 11:26:14 -0400	[thread overview]
Message-ID: <adcdf79d-e50c-2fb0-e105-67b384189999@quicinc.com> (raw)
In-Reply-To: <YXgafyMzK+o9FYkN@smile.fi.intel.com>



On 10/26/21 11:10 AM, Andy Shevchenko wrote:
> On Tue, Oct 26, 2021 at 10:41:08AM -0400, Qian Cai wrote:
>> Since "size" is an "unsigned int", the rvalue "size - 1" will still be
>> "unsigned int" according to the C standard (3.2.1.5 Usual arithmetic
>> conversions). Therefore, GENMASK(size - 1, 0) will always return 0UL.
> 
> Huh?!
> 
> Have you run test_bitmap et al., btw?

Not yet. I'll setup a VM to run it soon.

  reply	other threads:[~2021-10-26 15:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26 14:41 [PATCH] bitmap: simplify GENMASK(size - 1, 0) lines Qian Cai
2021-10-26 15:10 ` Andy Shevchenko
2021-10-26 15:26   ` Qian Cai [this message]
2021-10-26 18:54 ` Yury Norov
2021-10-26 19:21   ` Andy Shevchenko
2021-10-26 19:28     ` Yury Norov
2021-10-26 19:42       ` Andy Shevchenko
2021-10-26 19:54         ` Qian Cai
2021-10-27  9:44           ` Andy Shevchenko
2021-10-27 15:06             ` Qian Cai
2021-10-26 19:33     ` Qian Cai
2021-10-27  9:34       ` Andy Shevchenko
2021-10-29  1:36 ` [bitmap] ca95e676a1: BUG:unable_to_handle_page_fault_for_address kernel test robot
2021-10-29  1:36   ` kernel test robot

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=adcdf79d-e50c-2fb0-e105-67b384189999@quicinc.com \
    --to=quic_qiancai@quicinc.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=yury.norov@gmail.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.