2024-04-25 17:14:23

by George Stark

[permalink] [raw]
Subject: [PATCH v3 0/3] meson pwm small fixes

Just some small fixes for meson pwm.

Changelog:
v1->v2:
pwm: meson: Drop unneeded check in .get_state()
- update commit message
- drop Fixes tag. It's not actually a bug
previous version: [1]

pwm: meson: Add check for error from clk_round_rate()
- update commit message
- change unsigned long fin_freq; to long fin_freq;
previous version: [2]

v2->v3:
pwm: meson: Add check for error from clk_round_rate()
- change format modifier in dev_dbg() for fin_freq var to %lu
previous version: [3]

pwm: meson: Use mul_u64_u64_div_u64() for frequency calculating
new patch

[1] https://lore.kernel.org/lkml/[email protected]/T/#m6d1d5cf100dc5b77f85e2a7d01c0b0097b6a04da
[2] https://lore.kernel.org/lkml/[email protected]/T/#ma84e2d490bf79bda12f8393773c1af37b48d5473
[3] https://lore.kernel.org/linux-arm-kernel/[email protected]/T/#m52b7e5a34c3e8907235d73c2827b92cb13c93dd3

George Stark (3):
pwm: meson: Drop unneeded check in .get_state()
pwm: meson: Add check for error from clk_round_rate()
pwm: meson: Use mul_u64_u64_div_u64() for frequency calculating

drivers/pwm/pwm-meson.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)

--
2.25.1



2024-04-25 17:36:16

by George Stark

[permalink] [raw]
Subject: [PATCH v3 1/3] pwm: meson: Drop unneeded check in .get_state()

Drop checking state argument for NULL pointer in meson_pwm_get_state()
due to it is called only from pwm core with always valid arguments.

Signed-off-by: Dmitry Rokosov <[email protected]>
Signed-off-by: George Stark <[email protected]>
---
drivers/pwm/pwm-meson.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index ea96c5973488..f4d70da621ec 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -311,9 +311,6 @@ static int meson_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
struct meson_pwm_channel *channel;
u32 value;

- if (!state)
- return 0;
-
channel = &meson->channels[pwm->hwpwm];
channel_data = &meson_pwm_per_channel_data[pwm->hwpwm];

--
2.25.1


2024-04-28 20:55:56

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] meson pwm small fixes

Hello,

On Thu, Apr 25, 2024 at 08:12:50PM +0300, George Stark wrote:
> Just some small fixes for meson pwm.

Applied the series to
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next
.

Thanks
Uwe

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |


Attachments:
(No filename) (396.00 B)
signature.asc (499.00 B)
Download all attachments