All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Himanshu Jha <himanshujha199640@gmail.com>
Cc: Finn Thain <fthain@telegraphics.com.au>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] nubus: remove cast to void pointer
Date: Fri, 27 Sep 2019 14:45:42 +0200	[thread overview]
Message-ID: <CAMuHMdWWnAVsVci9ZAKX_hhwYCHgaMNdOt=+k3P_xCQ7jWG-iw@mail.gmail.com> (raw)
In-Reply-To: <1503819148-11676-1-git-send-email-himanshujha199640@gmail.com>

Hi Himanshu,

On Sun, Aug 27, 2017 at 9:33 AM Himanshu Jha
<himanshujha199640@gmail.com> wrote:
> Casting void pointers to other pointer types in unnecessary.
>
> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.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@linux-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@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

      reply	other threads:[~2019-09-27 12:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-27  7:32 [PATCH] nubus: remove cast to void pointer Himanshu Jha
2019-09-27 12:45 ` Geert Uytterhoeven [this message]

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='CAMuHMdWWnAVsVci9ZAKX_hhwYCHgaMNdOt=+k3P_xCQ7jWG-iw@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=fthain@telegraphics.com.au \
    --cc=himanshujha199640@gmail.com \
    --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.