All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: soc-component: fix undefined reference to __ffssi2
@ 2021-01-29 10:05 Srinivas Kandagatla
  2021-01-29 12:58 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Srinivas Kandagatla @ 2021-01-29 10:05 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, kernel test robot, lgirdwood, linux-kernel, tiwai,
	vkoul, Srinivas Kandagatla

microblaze-linux-gcc (GCC) 9.3.0 complains about missing __ffssi2
symbol while using __builtin_ffs at runtime.

This is because arch/h8300 is compiled with -fno-builtin option.

so fallback and use kernel ffs() instead to all the arch builds happy!

Fixes: 1da0b9899abd ("ASoC: soc-component: add snd_soc_component_read/write_field())
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/soc-component.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 361a79d655e3..159bf88b9f8c 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/pm_runtime.h>
 #include <sound/soc.h>
+#include <linux/bitops.h>
 
 #define soc_component_ret(dai, ret) _soc_component_ret(dai, __func__, ret)
 static inline int _soc_component_ret(struct snd_soc_component *component,
@@ -43,7 +44,7 @@ static inline int soc_component_field_shift(struct snd_soc_component *component,
 		return 0;
 	}
 
-	return (__builtin_ffs(mask) - 1);
+	return (ffs(mask) - 1);
 }
 
 /*
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: soc-component: fix undefined reference to __ffssi2
  2021-01-29 10:05 [PATCH] ASoC: soc-component: fix undefined reference to __ffssi2 Srinivas Kandagatla
@ 2021-01-29 12:58 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-01-29 12:58 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: alsa-devel, kernel test robot, lgirdwood, linux-kernel, tiwai, vkoul

On Fri, 29 Jan 2021 10:05:39 +0000, Srinivas Kandagatla wrote:
> microblaze-linux-gcc (GCC) 9.3.0 complains about missing __ffssi2
> symbol while using __builtin_ffs at runtime.
> 
> This is because arch/h8300 is compiled with -fno-builtin option.
> 
> so fallback and use kernel ffs() instead to all the arch builds happy!

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: soc-component: fix undefined reference to __ffssi2
      commit: 8ac9e476b86851c94e0f33bea758e0a00e3f875e

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-29 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29 10:05 [PATCH] ASoC: soc-component: fix undefined reference to __ffssi2 Srinivas Kandagatla
2021-01-29 12:58 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.