[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7b85f1490b990ef881b07b1dde32b94e43e427c0.camel@pengutronix.de>
Date: Wed, 24 Jan 2024 13:57:38 +0100
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Thinh Nguyen <Thinh.Nguyen@...opsys.com>, Martin Blumenstingl
<martin.blumenstingl@...glemail.com>, Neil Armstrong
<neil.armstrong@...aro.org>, Felipe Balbi <balbi@...nel.org>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: dwc3-of-simple: Stop using
of_reset_control_array_get() directly
On Mi, 2024-01-24 at 04:39 -0800, Greg Kroah-Hartman wrote:
> On Wed, Jan 24, 2024 at 12:26:20PM +0100, Philipp Zabel wrote:
> > Use of_reset_control_array_get_optional_exclusive() instead, it is
> > implemented as:
> >
> > static inline struct reset_control *
> > of_reset_control_array_get_optional_exclusive(struct device_node *node)
> > {
> > return of_reset_control_array_get(node, false, true, true);
> > }
> >
> > This makes the code easier to understand and removes the last remaining
> > direct use of of_reset_control_array_get(). No functional changes.
>
> Does this mean the function should be removed or made static now?
I consider "hiding" it from general use by renaming it to
__of_reset_control_array_get().
There are other, indirect users of this function, but it is always
called via a more self-explanatory static inline function:
drivers/amba/bus.c:
of_reset_control_array_get_optional_shared()
drivers/net/dsa/lantiq_gswip.c:
of_reset_control_array_get_exclusive()
drivers/phy/cadence/phy-cadence-sierra.c:
of_reset_control_array_get_exclusive()
drivers/phy/cadence/phy-cadence-torrent.c:
of_reset_control_array_get_exclusive()
drivers/soc/tegra/pmc.c:
of_reset_control_array_get_exclusive_released()
drivers/usb/dwc3/dwc3-of-simple.c:
of_reset_control_array_get()
I would like to eventually replace the use of multiple boolean
parameters for configuration. It is hard to read and errors have
slipped through in the past (e.g. a57f68ddc886, "reset: Fix devm bulk
optional exclusive control getter").
regards
Philipp
Powered by blists - more mailing lists