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: <4a3c0158-eda0-42bc-acfe-daddf8332bf3@lunn.ch>
Date: Tue, 26 Aug 2025 15:03:08 +0200
From: Andrew Lunn <andrew@...n.ch>
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 v2 2/2] net: maxlinear: Add support for MxL LGM
 SoC

> +Maintainers
> +===========
> +
> +See the MAINTAINERS file:
> +
> +    MAXLINEAR ETHERNET DRIVER
> +    M: Jack Ping Chng <jchng@...linear.com>
> +    L: netdev@...r.kernel.org
> +    S: Supported
> +    F: drivers/net/ethernet/maxlinear/

Please don't duplicate what is in MAINTAINERs. We have scripts which
monitor how active Maintainers are, and update the file, removing
inactive Maintainers. This duplication will not be updated.

> +
> diff --git a/MAINTAINERS b/MAINTAINERS
> index fe168477caa4..e4765bd73615 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -15102,6 +15102,14 @@ W:	https://linuxtv.org
>  T:	git git://linuxtv.org/media.git
>  F:	drivers/media/radio/radio-maxiradio*
>  
> +MAXLINEAR ETHERNET DRIVER
> +M:	Jack Ping Chng <jchng@...linear.com>
> +L:	netdev@...r.kernel.org
> +S:	Maintained
> +F:	Documentation/devicetree/bindings/net/mxl,lgm-eth.yaml
> +F:	Documentation/networking/device_drivers/ethernet/maxlinear/mxl.rst
> +F:	drivers/net/ethernet/maxlinear/mxl_eth.c

It is probably better to just use drivers/net/ethernet/maxlinear/ so
all files in that directory are covered, like the Makefile, Kconfig
etc.

> +static int mxl_eth_probe(struct platform_device *pdev)
> +{
> +	struct mxl_eth_drvdata *drvdata;
> +	struct reset_control *rst;
> +	struct net_device *ndev;
> +	struct device_node *np;
> +	int ret, i;
> +
> +	drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
> +	if (!drvdata)
> +		return -ENOMEM;
> +
> +	drvdata->clks = devm_clk_get_enabled(&pdev->dev, "ethif");
> +	if (IS_ERR(drvdata->clks))
> +		return dev_err_probe(&pdev->dev, PTR_ERR(drvdata->clks),
> +				     "failed to get/enable clock\n");
> +
> +	rst = devm_reset_control_get_optional(&pdev->dev, NULL);

Why is this optional? Are there some variants which don't have a
reset?

> +	i = 0;
> +	for_each_available_child_of_node(pdev->dev.of_node, np) {
> +		if (!of_device_is_compatible(np, "mxl,eth-mac"))
> +			continue;

Are there going to be other devices here, with different compatibles?

> +
> +		ret = mxl_eth_create_ndev(pdev, np, &ndev);

Shouldn't you validate reg before creating the device?

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ