[PATCH] pwm: sun4i: Propagate errors in .get_state() to the caller

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Thu Dec 1 07:48:22 PST 2022


On Thu, Dec 01, 2022 at 03:22:23PM +0000, Andre Przywara wrote:
> .get_state() can return an error indication now. Make use of it to
> propagate an impossible prescaler encoding, should that have sneaked in
> somehow.
> Also check the return value of clk_get_rate(). That's unlikely to fail,
> but we use that in two divide operations down in the code, so let's
> avoid a divide-by-zero condition on the way.
> 
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
> ---
> Hi,
> 
> this goes on top of Uwe's series to introduce and observe .get_state
> failures: https://lore.kernel.org/linux-pwm/20221130152148.2769768-12-u.kleine-koenig@pengutronix.de/T/#m9af39aa03bbd9bb7b31b3600f110c65ee0e8e70b
> Actually it only relies on patch 01/11 from that.

I recommend to put this info in machine-readable form into your patch.
If you applied my patch #1 on v6.1-rc1 and this on top, you'd do

	git format-patch -1 --base v6.1-rc1

This results in two additional lines that the build bots can evaluate,
to find the right setup to test your patch.

Apart from that:

Reviewed-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>

and thanks to pick up on this topic,
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20221201/f2511fc3/attachment.sig>


More information about the linux-arm-kernel mailing list