lkml.org 
[lkml]   [2022]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] sh: sq: Use the bitmap API when applicable
Hi Christophe,

On Sat, Jun 25, 2022 at 9:45 AM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
> Using the bitmap API is less verbose than hand writing them.
> It also improves the semantic.

Thanks for your patch!

> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> I don't cross compile, so this patch is NOT compile-tested.

Why not? Cross-compiling is so easy nowadays?
Many distros even provide cross-compilers ("apt install gcc-sh4-linux-gnu").
Else try https://mirrors.edge.kernel.org/pub/tools/crosstool/.

> --- a/arch/sh/kernel/cpu/sh4/sq.c
> +++ b/arch/sh/kernel/cpu/sh4/sq.c

> @@ -382,7 +381,7 @@ static int __init sq_api_init(void)
> if (unlikely(!sq_cache))
> return ret;
>
> - sq_bitmap = kzalloc(size, GFP_KERNEL);
> + sq_bitmap = bitmap_zalloc(nr_pages, GFP_KERNEL);

Perhaps you need #include <linux/bitmap.h>?

I don't know, I also didn't bother to cross-compile. Why would I? ;-)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

\
 
 \ /
  Last update: 2022-06-26 12:03    [W:0.052 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site