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: <20240112192649.GA392144@kernel.org>
Date: Fri, 12 Jan 2024 19:26:49 +0000
From: Simon Horman <horms@...nel.org>
To: Dmitry Antipov <dmantipov@...dex.ru>
Cc: Derek Chickles <dchickles@...vell.com>,
	Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org
Subject: Re: [PATCH] net: liquidio: fix clang-specific W=1 build warnings

On Thu, Jan 11, 2024 at 07:24:29PM +0300, Dmitry Antipov wrote:
> When compiling with clang-18 and W=1, I've noticed the following
> warnings:
> 
> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:1493:16: warning: cast
> from 'void (*)(struct octeon_device *, struct octeon_mbox_cmd *, void *)' to
> 'octeon_mbox_callback_t' (aka 'void (*)(void *, void *, void *)') converts to
> incompatible function type [-Wcast-function-type-strict]
>  1493 |         mbox_cmd.fn = (octeon_mbox_callback_t)cn23xx_get_vf_stats_callback;
>       |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> and:
> 
> drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:432:16: warning: cast
> from 'void (*)(struct octeon_device *, struct octeon_mbox_cmd *, void *)' to
> 'octeon_mbox_callback_t' (aka 'void (*)(void *, void *, void *)') converts to
> incompatible function type [-Wcast-function-type-strict]
>   432 |         mbox_cmd.fn = (octeon_mbox_callback_t)octeon_pfvf_hs_callback;
>       |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Fix both of the above by adjusting 'octeon_mbox_callback_t' to match actual
> callback definitions (at the cost of adding an extra forward declaration).
> 
> Signed-off-by: Dmitry Antipov <dmantipov@...dex.ru>

I'm not entirely sure changes line this
are appropriate for an orphaned driver [1].
But if so, these look good to me.

Reviewed-by: Simon Horman <horms@...nel.org>

[1] MAINTAINERS: eth: mark Cavium liquidio as an Orphan
    https://git.kernel.org/netdev/net/c/384a35866f3a

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ