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: <20250902084611.GR15473@horms.kernel.org>
Date: Tue, 2 Sep 2025 09:46:11 +0100
From: Simon Horman <horms@...nel.org>
To: Jack Ping CHNG <jchng@...linear.com>
Cc: netdev@...r.kernel.org, devicetree@...r.kernel.org, davem@...emloft.net,
	andrew+netdev@...n.ch, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, robh@...nel.org, krzk+dt@...nel.org,
	conor+dt@...nel.org, yzhu@...linear.com,
	sureshnagaraj@...linear.com
Subject: Re: [PATCH net-next v3 2/2] net: maxlinear: Add support for MxL LGM
 SoC

On Fri, Aug 29, 2025 at 08:48:43PM +0800, Jack Ping CHNG wrote:
> Add mxl_eth driver to introduce the initial implementation of ethernet
> support for Maxlinear LGM SoC.
> LGM SoC has a multi port MAC controller to interface with the PHY. It also
> has a master MDIO interface to control the external MDIO configured
> devices.
> 
> Signed-off-by: Jack Ping CHNG <jchng@...linear.com>

...

> diff --git a/drivers/net/ethernet/maxlinear/mxl_eth.c b/drivers/net/ethernet/maxlinear/mxl_eth.c

...

> +static int mxl_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)

Hi Jack,

I think it would better for the return type of mxl_eth_start_xmit to be
netdev_tx_t to match the signature of the .ndo_start_xmit member of const
struct net_device_ops.

Flagged by Clang 20.1.8 with
KCFLAGS=-Wincompatible-function-pointer-types-strict

drivers/net/ethernet/maxlinear/mxl_eth.c:56:20: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict]
   56 |         .ndo_start_xmit = mxl_eth_start_xmit,
      |                           ^~~~~~~~~~~~~~~~~~

> +{
> +	dev_kfree_skb(skb);
> +	return NETDEV_TX_OK;
> +}
> +
> +static const struct net_device_ops mxl_eth_netdev_ops = {
> +	.ndo_open       = mxl_eth_open,
> +	.ndo_stop       = mxl_eth_stop,
> +	.ndo_start_xmit = mxl_eth_start_xmit,
> +};

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ