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: <9bdbe85d-b45f-407c-8763-42439bc096e2@kernel.org>
Date: Sun, 12 Nov 2023 08:39:22 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Luiz Angelo Daros de Luca <luizluca@...il.com>, netdev@...r.kernel.org
Cc: linus.walleij@...aro.org, alsi@...g-olufsen.dk, andrew@...n.ch,
 vivien.didelot@...il.com, f.fainelli@...il.com, olteanv@...il.com,
 davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com, robh+dt@...nel.org,
 krzk+dt@...nel.org, arinc.unal@...nc9.com
Subject: Re: [RFC net-next 3/5] net: dsa: realtek: create realtek-common

On 11/11/2023 22:51, Luiz Angelo Daros de Luca wrote:
>  	ret = priv->ops->detect(priv);
>  	if (ret) {
> @@ -218,18 +149,12 @@ static int realtek_mdio_probe(struct mdio_device *mdiodev)
>  		return ret;
>  	}
>  
> -	priv->ds = devm_kzalloc(dev, sizeof(*priv->ds), GFP_KERNEL);
> -	if (!priv->ds)
> -		return -ENOMEM;
> -
> -	priv->ds->dev = dev;
>  	priv->ds->num_ports = priv->num_ports;
> -	priv->ds->priv = priv;
> -	priv->ds->ops = var->ds_ops_mdio;
>  
>  	ret = dsa_register_switch(priv->ds);
>  	if (ret) {
> -		dev_err(priv->dev, "unable to register switch ret = %d\n", ret);
> +		dev_err_probe(dev, ret, "unable to register switch ret = %pe\n",
> +			      ERR_PTR(ret));

This is some weird code. Why do you print ret twice? This was not
explained in the commit msg.


...
> -	priv->ds->ops = var->ds_ops_smi;
>  	ret = dsa_register_switch(priv->ds);
>  	if (ret) {
> -		dev_err_probe(dev, ret, "unable to register switch\n");
> +		dev_err_probe(dev, ret, "unable to register switch ret = %pe\n",
> +			      ERR_PTR(ret));

Same problem.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ