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]
Date: Fri, 7 Jun 2024 14:07:47 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Martin Schiller <ms@....tdt.de>
Cc: martin.blumenstingl@...glemail.com, hauke@...ke-m.de, andrew@...n.ch,
	f.fainelli@...il.com, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, robh@...nel.org,
	krzk+dt@...nel.org, conor+dt@...nel.org, netdev@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 03/13] net: dsa: lantiq_gswip: Use dev_err_probe
 where appropriate

On Thu, Jun 06, 2024 at 10:52:24AM +0200, Martin Schiller wrote:
> @@ -2050,8 +2048,9 @@ static int gswip_gphy_fw_list(struct gswip_priv *priv,
>  			priv->gphy_fw_name_cfg = &xrx200a2x_gphy_data;
>  			break;
>  		default:
> -			dev_err(dev, "unknown GSWIP version: 0x%x", version);
> -			return -ENOENT;
> +			return dev_err_probe(dev, -ENOENT,
> +					     "unknown GSWIP version: 0x%x",
> +					     version);
>  		}
>  	}
>  
> @@ -2059,10 +2058,9 @@ static int gswip_gphy_fw_list(struct gswip_priv *priv,
>  	if (match && match->data)
>  		priv->gphy_fw_name_cfg = match->data;
>  
> -	if (!priv->gphy_fw_name_cfg) {
> -		dev_err(dev, "GPHY compatible type not supported");
> -		return -ENOENT;
> -	}
> +	if (!priv->gphy_fw_name_cfg)
> +		return dev_err_probe(dev, -ENOENT,
> +				     "GPHY compatible type not supported");
>  
>  	priv->num_gphy_fw = of_get_available_child_count(gphy_fw_list_np);
>  	if (!priv->num_gphy_fw)
> @@ -2163,8 +2161,8 @@ static int gswip_probe(struct platform_device *pdev)
>  			return -EINVAL;
>  		break;
>  	default:
> -		dev_err(dev, "unknown GSWIP version: 0x%x", version);
> -		return -ENOENT;
> +		return dev_err_probe(dev, -ENOENT,
> +				     "unknown GSWIP version: 0x%x", version);
>  	}
>  
>  	/* bring up the mdio bus */
> @@ -2172,28 +2170,27 @@ static int gswip_probe(struct platform_device *pdev)
>  	if (!dsa_is_cpu_port(priv->ds, priv->hw_info->cpu_port)) {
> -		dev_err(dev, "wrong CPU port defined, HW only supports port: %i",
> -			priv->hw_info->cpu_port);
> -		err = -EINVAL;
> +		err = dev_err_probe(dev, -EINVAL,
> +				    "wrong CPU port defined, HW only supports port: %i",
> +				    priv->hw_info->cpu_port);
>  		goto disable_switch;
>  	}

Nitpick: there is no terminating \n here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ