[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdWWnAVsVci9ZAKX_hhwYCHgaMNdOt=+k3P_xCQ7jWG-iw@mail.gmail.com>
Date: Fri, 27 Sep 2019 14:45:42 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Himanshu Jha <himanshujha199640@...il.com>
Cc: Finn Thain <fthain@...egraphics.com.au>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nubus: remove cast to void pointer
Hi Himanshu,
On Sun, Aug 27, 2017 at 9:33 AM Himanshu Jha
<himanshujha199640@...il.com> wrote:
> Casting void pointers to other pointer types in unnecessary.
>
> Signed-off-by: Himanshu Jha <himanshujha199640@...il.com>
Thanks for your patch!
> --- a/drivers/nubus/nubus.c
> +++ b/drivers/nubus/nubus.c
> @@ -167,7 +167,7 @@ static unsigned char *nubus_dirptr(const struct nubus_dirent *nd)
> void nubus_get_rsrc_mem(void *dest, const struct nubus_dirent *dirent,
> int len)
> {
> - unsigned char *t = (unsigned char *)dest;
> + unsigned char *t = dest;
> unsigned char *p = nubus_dirptr(dirent);
>
> while (len) {
> @@ -180,7 +180,7 @@ EXPORT_SYMBOL(nubus_get_rsrc_mem);
> void nubus_get_rsrc_str(void *dest, const struct nubus_dirent *dirent,
> int len)
> {
> - unsigned char *t = (unsigned char *)dest;
> + unsigned char *t = dest;
> unsigned char *p = nubus_dirptr(dirent);
>
> while (len) {
The second chunk is no longer valid, but the first one still is.
Reviewed-by: Geert Uytterhoeven <geert@...ux-m68k.org>
i.e. will queue the first chunk for v5.5.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-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
Powered by blists - more mailing lists