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: <20241117223850.GK5315@ragnatech.se>
Date: Sun, 17 Nov 2024 23:38:50 +0100
From: Niklas Söderlund <niklas.soderlund@...natech.se>
To: Rosen Penev <rosenp@...il.com>
Cc: netdev@...r.kernel.org, Kurt Kanzenbach <kurt@...utronix.de>,
	Andrew Lunn <andrew@...n.ch>, Vladimir Oltean <olteanv@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Chris Snook <chris.snook@...il.com>,
	Marcin Wojtas <marcin.s.wojtas@...il.com>,
	Russell King <linux@...linux.org.uk>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Richard Cochran <richardcochran@...il.com>,
	open list <linux-kernel@...r.kernel.org>,
	"open list:RENESAS ETHERNET SWITCH DRIVER" <linux-renesas-soc@...r.kernel.org>
Subject: Re: [PATCHv3 net-next] net: modernize ioremap in probe

Hello Rosen,

Thanks for your work.

On 2024-11-17 13:27:11 -0800, Rosen Penev wrote:

> diff --git a/drivers/net/ethernet/renesas/rtsn.c 
> b/drivers/net/ethernet/renesas/rtsn.c
> index 6b3f7fca8d15..bfe08facc707 100644
> --- a/drivers/net/ethernet/renesas/rtsn.c
> +++ b/drivers/net/ethernet/renesas/rtsn.c
> @@ -1297,14 +1297,8 @@ static int rtsn_probe(struct platform_device *pdev)
>  	ndev->netdev_ops = &rtsn_netdev_ops;
>  	ndev->ethtool_ops = &rtsn_ethtool_ops;
>  
> -	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gptp");
> -	if (!res) {
> -		dev_err(&pdev->dev, "Can't find gptp resource\n");
> -		ret = -EINVAL;
> -		goto error_free;
> -	}
> -
> -	priv->ptp_priv->addr = devm_ioremap_resource(&pdev->dev, res);
> +	priv->ptp_priv->addr =
> +		devm_platform_ioremap_resource_byname(pdev, "gptp");
>  	if (IS_ERR(priv->ptp_priv->addr)) {
>  		ret = PTR_ERR(priv->ptp_priv->addr);
>  		goto error_free;

You have a similar construct using platform_get_resource_byname() a few 
lines above this one. Please convert both uses, or none, mixing them is 
just confusing IMHO.

-- 
Kind Regards,
Niklas Söderlund

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ