[PATCH] ASoC: Intel: avs: Fix build error on arc, m68k and sparc
Guenter Roeck
linux at roeck-us.net
Sun May 29 08:21:23 CEST 2022
On 5/28/22 23:05, Uwe Kleine-König wrote:
> On some platforms (i.e. arc, m68k and sparc) __fls returns an int (while
> on most platforms it returns an unsigned long). This triggers a format
> warning on these few platforms as the driver uses %ld to print a warning.
>
> Replace it by fls (and %d) which returns an int everywhere and which is
> already used in the if condition triggering the warning.
>
> Fixes: beed983621fb ("ASoC: Intel: avs: Machine board registration")
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
FWIW:
Reviewed-by: Guenter Roeck <linux at roeck-us.net>
> ---
> Hello again
>
> On Sun, May 29, 2022 at 07:48:18AM +0200, Uwe Kleine-König wrote:
>> Tell me if you don't want to squash this into beed983621fb and prefer a
>> formal patch.
>
> I just realized this isn't a problem in next only any more, but the
> commit is already in Linus Torvald's tree. So I guess this isn't fixed
> by a fixup of said commit and here comes a proper patch.
>
> sound/soc/intel/avs/board_selection.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/intel/avs/board_selection.c b/sound/soc/intel/avs/board_selection.c
> index 80cb0164678a..f189f71b8e1e 100644
> --- a/sound/soc/intel/avs/board_selection.c
> +++ b/sound/soc/intel/avs/board_selection.c
> @@ -325,8 +325,8 @@ static int avs_register_i2s_board(struct avs_dev *adev, struct snd_soc_acpi_mach
>
> num_ssps = adev->hw_cfg.i2s_caps.ctrl_count;
> if (fls(mach->mach_params.i2s_link_mask) > num_ssps) {
> - dev_err(adev->dev, "Platform supports %d SSPs but board %s requires SSP%ld\n",
> - num_ssps, mach->drv_name, __fls(mach->mach_params.i2s_link_mask));
> + dev_err(adev->dev, "Platform supports %d SSPs but board %s requires SSP%d\n",
> + num_ssps, mach->drv_name, fls(mach->mach_params.i2s_link_mask));
> return -ENODEV;
> }
>
>
> base-commit: beed983621fbdfd291e6e3a0cdc4d10517e60af8
More information about the Alsa-devel
mailing list