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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdXQfUCYdt-PJX8rYP3bf8Z_ea3Obgunm-_7KmJxMrU_fQ@mail.gmail.com>
Date: Mon, 18 Aug 2025 17:36:50 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Mohammed Guermoud <mohammed.guermoud@...il.com>
Cc: marvin24@....de, gregkh@...uxfoundation.org, ac100@...ts.launchpad.net, 
	linux-tegra@...r.kernel.org, linux-staging@...ts.linux.dev, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: nvec: Silence unused argument warning in
 NVEC_PHD macro

Hi Mohammed,

On Mon, 18 Aug 2025 at 17:10, Mohammed Guermoud
<mohammed.guermoud@...il.com> wrote:
> The NVEC_PHD macro was defined with three arguments (str, buf, len)
> that were not used in its empty body, causing a compiler warning.
>
> This patch silences the warning by explicitly casting the unused
> arguments to (void), making the intent clear without changing
> functionality.
>
> Signed-off-by: Mohammed Guermoud <mohammed.guermoud@...il.com>

Thanks for your patch!

> --- a/drivers/staging/nvec/nvec_ps2.c
> +++ b/drivers/staging/nvec/nvec_ps2.c
> @@ -28,7 +28,7 @@
>         print_hex_dump(KERN_DEBUG, str, DUMP_PREFIX_NONE, \
>                         16, 1, buf, len, false)
>  #else
> -#define NVEC_PHD(str, buf, len) do { } while (0)
> +#define NVEC_PHD(str, buf, len) do { (void)str; (void)buf; (void)len; } while (0)
>  #endif
>
>  enum ps2_subcmds {

The proper solution would be to remove the custom NVEC_PHD() macro (and
NVEC_PS2_DEBUG), and just call print_hex_dump_debug() directly instead.

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