From: Simon Horman <horms@kernel.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Derek Chickles <dchickles@marvell.com>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org
Subject: Re: [PATCH] net: liquidio: fix clang-specific W=1 build warnings
Date: Fri, 12 Jan 2024 19:26:49 +0000 [thread overview]
Message-ID: <20240112192649.GA392144@kernel.org> (raw)
In-Reply-To: <20240111162432.124014-1-dmantipov@yandex.ru>
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@yandex.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@kernel.org>
[1] MAINTAINERS: eth: mark Cavium liquidio as an Orphan
https://git.kernel.org/netdev/net/c/384a35866f3a
next prev parent reply other threads:[~2024-01-12 19:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 16:24 [PATCH] net: liquidio: fix clang-specific W=1 build warnings Dmitry Antipov
2024-01-12 19:26 ` Simon Horman [this message]
2024-01-13 2:20 ` patchwork-bot+netdevbpf
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=20240112192649.GA392144@kernel.org \
--to=horms@kernel.org \
--cc=dchickles@marvell.com \
--cc=dmantipov@yandex.ru \
--cc=kuba@kernel.org \
--cc=netdev@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.