linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Yu Kuai <yukuai1@huaweicloud.com>,
	kernel test robot <lkp@intel.com>,
	akpm@linux-foundation.org, ming.lei@redhat.com,
	dlemoal@kernel.org, jack@suse.cz
Cc: oe-kbuild-all@lists.linux.dev, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, yi.zhang@huawei.com,
	yangerkun@huawei.com, johnny.chenyi@huawei.com,
	"yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH v3 1/2] lib/sbitmap: convert shallow_depth from one word to the whole sbitmap
Date: Wed, 6 Aug 2025 20:19:09 -0600	[thread overview]
Message-ID: <98e3bdfc-41ed-40b6-92df-4aacab3d92c5@kernel.dk> (raw)
In-Reply-To: <7d2b0108-4d16-97fb-5de9-7438414d9ca4@huaweicloud.com>

On 8/6/25 7:30 PM, Yu Kuai wrote:
> Hi,
> 
> ? 2025/08/06 17:41, kernel test robot ??:
>> All error/warnings (new ones prefixed by >>):
>>
>>     In file included from ./arch/sparc/include/generated/asm/div64.h:1,
>>                      from include/linux/math.h:6,
>>                      from include/linux/kernel.h:27,
>>                      from include/linux/cpumask.h:11,
>>                      from arch/sparc/include/asm/smp_32.h:15,
>>                      from arch/sparc/include/asm/smp.h:7,
>>                      from arch/sparc/include/asm/switch_to_32.h:5,
>>                      from arch/sparc/include/asm/switch_to.h:7,
>>                      from arch/sparc/include/asm/ptrace.h:120,
>>                      from arch/sparc/include/asm/thread_info_32.h:19,
>>                      from arch/sparc/include/asm/thread_info.h:7,
>>                      from include/linux/thread_info.h:60,
>>                      from arch/sparc/include/asm/current.h:15,
>>                      from include/linux/sched.h:12,
>>                      from lib/sbitmap.c:7:
>>     lib/sbitmap.c: In function '__map_depth_with_shallow':
>>     include/asm-generic/div64.h:183:35: warning: comparison of distinct pointer types lacks a cast
>>       183 |         (void)(((typeof((n)) *)0) == ((uint64_t *)0));  \
>>           |                                   ^~
>>     lib/sbitmap.c:222:20: note: in expansion of macro 'do_div'
>>       222 |         reminder = do_div(shallow_word_depth, sb->depth);
>>           |                    ^~~~~~
> 
> /* The unnecessary pointer compare is there
>  * to check for type safety (n must be 64bit)
>  */
> # define do_div(n,base) ({
> 
> I didn't notice that under specific arch, do_div() will require the fist
> paramater to be 64bit.
> 
> I'll wait a bit longer for people to review the solution before I send a
> new version.

I think it looks good, so please do spin a new version with that fixed
as that's the only thing holding up the inclusion right now.

-- 
Jens Axboe

  reply	other threads:[~2025-08-07  2:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-05  7:37 [PATCH v3 0/2] lib/sbitmap: convert shallow_depth from one word to the whole sbitmap Yu Kuai
2025-08-05  7:37 ` [PATCH v3 1/2] " Yu Kuai
2025-08-06  9:41   ` kernel test robot
2025-08-07  1:30     ` Yu Kuai
2025-08-07  2:19       ` Jens Axboe [this message]
2025-08-11  8:55       ` Geert Uytterhoeven
2025-08-05  7:37 ` [PATCH v3 2/2] lib/sbitmap: make sbitmap_get_shallow() internal Yu Kuai
2025-08-05 15:35   ` Bart Van Assche

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=98e3bdfc-41ed-40b6-92df-4aacab3d92c5@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=akpm@linux-foundation.org \
    --cc=dlemoal@kernel.org \
    --cc=jack@suse.cz \
    --cc=johnny.chenyi@huawei.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=ming.lei@redhat.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai1@huaweicloud.com \
    --cc=yukuai3@huawei.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 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).