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] [day] [month] [year] [list]
Message-ID: <fb61cf82-b14d-4f58-99bb-9677305a0aa6@gmail.com>
Date: Wed, 27 Nov 2024 16:03:36 +0800
From: Joey Lu <a0987203069@...il.com>
To: Krzysztof Kozlowski <krzk@...nel.org>, andrew+netdev@...n.ch,
 davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
 pabeni@...hat.com, robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
 mcoquelin.stm32@...il.com, richardcochran@...il.com
Cc: alexandre.torgue@...s.st.com, joabreu@...opsys.com, ychuang3@...oton.com,
 schung@...oton.com, yclu4@...oton.com, peppe.cavallaro@...com,
 linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 openbmc@...ts.ozlabs.org, linux-stm32@...md-mailman.stormreply.com
Subject: Re: [PATCH v3 3/3] net: stmmac: dwmac-nuvoton: Add dwmac glue for
 Nuvoton MA35 family


Krzysztof Kozlowski 於 11/26/2024 6:10 PM 寫道:
> On 18/11/2024 09:27, Joey Lu wrote:
>> +
>> +static struct nvt_priv_data *
>> +nuvoton_gmac_setup(struct platform_device *pdev, struct plat_stmmacenet_data *plat)
>> +{
>> +	struct device *dev = &pdev->dev;
>> +	struct nvt_priv_data *bsp_priv;
>> +	phy_interface_t phy_mode;
>> +	u32 tx_delay, rx_delay;
>> +	u32 macid, arg, reg;
>> +
>> +	bsp_priv = devm_kzalloc(dev, sizeof(*bsp_priv), GFP_KERNEL);
>> +	if (!bsp_priv)
>> +		return ERR_PTR(-ENOMEM);
>> +
>> +	bsp_priv->regmap =
>> +		syscon_regmap_lookup_by_phandle_args(dev->of_node, "nuvoton,sys", 1, &macid);
>> +	if (IS_ERR(bsp_priv->regmap)) {
>> +		dev_err(dev, "Failed to get sys register\n");
> Syntax is: return dev_err_probe
I will use dev_err_probe instead.
>
>> +		return ERR_PTR(-ENODEV);
>> +	}
>> +	if (macid > 1) {
>> +		dev_err(dev, "Invalid sys arguments\n");
>> +		return ERR_PTR(-EINVAL);
>> +	}
>> +
>
>
> ...
>
I will use dev_err_probe instead.
>> +
>> +	ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
>> +	if (ret)
>> +		return ret;
>> +
>> +	/* We support WoL by magic packet, override pmt to make it work! */
>> +	plat_dat->pmt = 1;
>> +	dev_info(&pdev->dev, "Wake-Up On Lan supported\n");
>
> Drop, driver should be silent on success.
Got it.
>
>> +	device_set_wakeup_capable(&pdev->dev, 1);
>> +
>> +	return 0;
>> +}
>
>
> Best regards,
> Krzysztof

Thanks!

BR,

Joey


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ