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: <91eda093-0adc-4fa4-9b36-5c71d71d98b0@lunn.ch>
Date: Mon, 13 Oct 2025 16:13:38 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Buday Csaba <buday.csaba@...lan.hu>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] net: mdio: common handling of phy reset properties

> +/**
> + * mdio_device_register_reset - Read and initialize the reset properties of
> + *				an mdio device
> + * @mdiodev: mdio_device structure
> + */
> +int mdio_device_register_reset(struct mdio_device *mdiodev)
> +{
> +	struct reset_control *reset;
> +
> +	/* Read optional firmware properties */
> +	fwnode_property_read_u32(dev_fwnode(&mdiodev->dev), "reset-assert-us",
> +				 &mdiodev->reset_assert_delay);
> +	fwnode_property_read_u32(dev_fwnode(&mdiodev->dev), "reset-deassert-us",
> +				 &mdiodev->reset_deassert_delay);
> +

device_property_read_u32() would be better here. But i can see why you
kept fwnode_property_read_u32() it makes it easier to see that there
have not been any code changes. So maybe add a patch 2/3 to convert
this?

> +/**
> + * mdio_device_unregister_reset - uninitialize the reset properties of
> + *				  an mdio device
> + * @mdiodev: mdio_device structure
> + */
> +int mdio_device_unregister_reset(struct mdio_device *mdiodev)
> +{
> +	gpiod_put(mdiodev->reset_gpio);
> +	reset_control_put(mdiodev->reset_ctrl);

Both of these return void, so you should make this function a void as
well.

    Andrew

---
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ