lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdWRRjo3mEBSeUvDrw1wK9EfzGuohi7zSzh6SZ8bY25FBg@mail.gmail.com>
Date:   Fri, 21 Apr 2023 09:22:40 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     yunchuan <yunchuan@...china.com>
Cc:     kabel@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] firmware:Remove unnecessary (void*) conversions

Hi Yunchan,

On Thu, Apr 20, 2023 at 9:41 AM yunchuan <yunchuan@...china.com> wrote:
> Pointer variables of void * type do not require type cast.
>
> Signed-off-by: yunchuan <yunchuan@...china.com>

> --- a/drivers/firmware/turris-mox-rwtm.c
> +++ b/drivers/firmware/turris-mox-rwtm.c
> @@ -283,7 +283,7 @@ static int check_get_random_support(struct mox_rwtm *rwtm)
>
>  static int mox_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait)
>  {
> -       struct mox_rwtm *rwtm = (struct mox_rwtm *) rng->priv;

hwrng.priv is unsigned long, so the cast is needed.
Please try to (at least) test-compile your changes.

NAKed-by: Geert Uytterhoeven <geert+renesas@...der.be>

> +       struct mox_rwtm *rwtm = rng->priv;
>         struct armada_37xx_rwtm_tx_msg msg;
>         int ret;


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

Powered by Openwall GNU/*/Linux Powered by OpenVZ