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: <9a9ca4e015446b9a0f76fa3d5e6e9f0b@dev.tdt.de>
Date: Fri, 07 Jun 2024 14:09:13 +0200
From: Martin Schiller <ms@....tdt.de>
To: Vladimir Oltean <olteanv@...il.com>
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 2024-06-07 13:07, Vladimir Oltean wrote:
> 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.

Oh, thanks for the hint. I'll correct that (and also check the complete 
source
file for that kind of mistakes).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ