drivers/clk/sunxi-ng/ccu_mp.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
When introducing the SUNXI_CCU_MP_DATA_WITH_MUX_GATE_FEAT macro, the order
of the last two arguments was different between the users and the
definition: features became flags and flags became features.
This just didn't end up in a desaster yet because most users ended up
passing 0 for both arguments, and other clocks (for the new A523 SoC) are
not yet used.
Swap the order of the arguments in the definition, so that users stay
untouched.
Fixes: cdbb9d0d09db ("clk: sunxi-ng: mp: provide wrappers for setting feature flags")
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
drivers/clk/sunxi-ng/ccu_mp.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/clk/sunxi-ng/ccu_mp.h b/drivers/clk/sunxi-ng/ccu_mp.h
index b35aeec70484d..8fc7fdb7ef494 100644
--- a/drivers/clk/sunxi-ng/ccu_mp.h
+++ b/drivers/clk/sunxi-ng/ccu_mp.h
@@ -109,8 +109,7 @@ struct ccu_mp {
_mshift, _mwidth, \
_pshift, _pwidth, \
_muxshift, _muxwidth, \
- _gate, _features, \
- _flags) \
+ _gate, _flags, _features) \
struct ccu_mp _struct = { \
.enable = _gate, \
.m = _SUNXI_CCU_DIV(_mshift, _mwidth), \
--
2.25.1
On Wed, 30 Apr 2025 10:53:25 +0100, Andre Przywara wrote:
> When introducing the SUNXI_CCU_MP_DATA_WITH_MUX_GATE_FEAT macro, the order
> of the last two arguments was different between the users and the
> definition: features became flags and flags became features.
>
> This just didn't end up in a desaster yet because most users ended up
> passing 0 for both arguments, and other clocks (for the new A523 SoC) are
> not yet used.
>
> [...]
Applied to clk-fixes-for-6.15 in git@github.com:linux-sunxi/linux-sunxi.git, thanks!
[1/1] clk: sunxi-ng: fix order of arguments in clock macro
commit: 4a9c3c3215491f25bc66d615faa921c814b1a479
Best regards,
--
Chen-Yu Tsai <wens@csie.org>
On Thu, 1 May 2025 20:14:24 +0800 Chen-Yu Tsai <wens@csie.org> wrote: Hi, > On Wed, 30 Apr 2025 10:53:25 +0100, Andre Przywara wrote: > > When introducing the SUNXI_CCU_MP_DATA_WITH_MUX_GATE_FEAT macro, the order > > of the last two arguments was different between the users and the > > definition: features became flags and flags became features. > > > > This just didn't end up in a desaster yet because most users ended up > > passing 0 for both arguments, and other clocks (for the new A523 SoC) are > > not yet used. > > > > [...] > > Applied to clk-fixes-for-6.15 in git@github.com:linux-sunxi/linux-sunxi.git, thanks! thanks for that, but the URL here is not correct, is it? Should be the kernel.org repo instead? Saw this already in other "applied" emails. Cheers, Andre > > [1/1] clk: sunxi-ng: fix order of arguments in clock macro > commit: 4a9c3c3215491f25bc66d615faa921c814b1a479 > > Best regards,
On Wed, Apr 30, 2025 at 5:53 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> When introducing the SUNXI_CCU_MP_DATA_WITH_MUX_GATE_FEAT macro, the order
> of the last two arguments was different between the users and the
> definition: features became flags and flags became features.
>
> This just didn't end up in a desaster yet because most users ended up
^ typo?
Will fix when applying.
ChenYu
> passing 0 for both arguments, and other clocks (for the new A523 SoC) are
> not yet used.
>
> Swap the order of the arguments in the definition, so that users stay
> untouched.
>
> Fixes: cdbb9d0d09db ("clk: sunxi-ng: mp: provide wrappers for setting feature flags")
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> drivers/clk/sunxi-ng/ccu_mp.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/clk/sunxi-ng/ccu_mp.h b/drivers/clk/sunxi-ng/ccu_mp.h
> index b35aeec70484d..8fc7fdb7ef494 100644
> --- a/drivers/clk/sunxi-ng/ccu_mp.h
> +++ b/drivers/clk/sunxi-ng/ccu_mp.h
> @@ -109,8 +109,7 @@ struct ccu_mp {
> _mshift, _mwidth, \
> _pshift, _pwidth, \
> _muxshift, _muxwidth, \
> - _gate, _features, \
> - _flags) \
> + _gate, _flags, _features) \
> struct ccu_mp _struct = { \
> .enable = _gate, \
> .m = _SUNXI_CCU_DIV(_mshift, _mwidth), \
> --
> 2.25.1
>
>
Dne sreda, 30. april 2025 ob 11:53:25 Srednjeevropski poletni čas je Andre Przywara napisal(a):
> When introducing the SUNXI_CCU_MP_DATA_WITH_MUX_GATE_FEAT macro, the order
> of the last two arguments was different between the users and the
> definition: features became flags and flags became features.
>
> This just didn't end up in a desaster yet because most users ended up
> passing 0 for both arguments, and other clocks (for the new A523 SoC) are
> not yet used.
>
> Swap the order of the arguments in the definition, so that users stay
> untouched.
>
> Fixes: cdbb9d0d09db ("clk: sunxi-ng: mp: provide wrappers for setting feature flags")
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Best regards,
Jernej
© 2016 - 2026 Red Hat, Inc.