diff mbox series

ASoC: loongson: Fix build warning when !CONFIG_PCI

Message ID 20241012095840.965087-1-zhoubinbin@loongson.cn (mailing list archive)
State Accepted
Commit 45b3605089b41b81ba36b231fbb97e3037a51beb
Headers show
Series ASoC: loongson: Fix build warning when !CONFIG_PCI | expand

Commit Message

Binbin Zhou Oct. 12, 2024, 9:58 a.m. UTC
Fixes the below if kernel config disable PCI support:

sound/soc/loongson/loongson_i2s_pci.c:157:1: warning: data definition has no type or storage class
     157 | module_pci_driver(loongson_i2s_driver);
         | ^~~~~~~~~~~~~~~~~
sound/soc/loongson/loongson_i2s_pci.c:157:1: error: type defaults to 'int' in declaration of 'module_pci_driver' [-Wimplicit-int]
sound/soc/loongson/loongson_i2s_pci.c:157:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
sound/soc/loongson/loongson_i2s_pci.c:149:26: warning: 'loongson_i2s_driver' defined but not used [-Wunused-variable]
     149 | static struct pci_driver loongson_i2s_driver = {
         |                          ^~~~~~~~~~~~~~~~~~~

Add the appropriate Kconfig dependency.

Fixes: ba4c5fad598c ("ASoC: loongson: Add I2S controller driver as platform device")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410101647.o1lI37ou-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202410101439.Tfn5aT6i-lkp@intel.com/
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
---
 sound/soc/loongson/Kconfig | 1 +
 1 file changed, 1 insertion(+)


base-commit: d5ca96a9c21a5bed12bb8d63f1376fdf77026d23

Comments

Mark Brown Oct. 12, 2024, 12:50 p.m. UTC | #1
On Sat, 12 Oct 2024 17:58:40 +0800, Binbin Zhou wrote:
> Fixes the below if kernel config disable PCI support:
> 
> sound/soc/loongson/loongson_i2s_pci.c:157:1: warning: data definition has no type or storage class
>      157 | module_pci_driver(loongson_i2s_driver);
>          | ^~~~~~~~~~~~~~~~~
> sound/soc/loongson/loongson_i2s_pci.c:157:1: error: type defaults to 'int' in declaration of 'module_pci_driver' [-Wimplicit-int]
> sound/soc/loongson/loongson_i2s_pci.c:157:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
> sound/soc/loongson/loongson_i2s_pci.c:149:26: warning: 'loongson_i2s_driver' defined but not used [-Wunused-variable]
>      149 | static struct pci_driver loongson_i2s_driver = {
>          |                          ^~~~~~~~~~~~~~~~~~~
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: loongson: Fix build warning when !CONFIG_PCI
      commit: 45b3605089b41b81ba36b231fbb97e3037a51beb

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
diff mbox series

Patch

diff --git a/sound/soc/loongson/Kconfig b/sound/soc/loongson/Kconfig
index e641ae4156d9..2d8291c1443c 100644
--- a/sound/soc/loongson/Kconfig
+++ b/sound/soc/loongson/Kconfig
@@ -16,6 +16,7 @@  config SND_SOC_LOONGSON_CARD
 config SND_SOC_LOONGSON_I2S_PCI
 	tristate "Loongson I2S-PCI Device Driver"
 	depends on LOONGARCH || COMPILE_TEST
+	depends on PCI
 	select REGMAP_MMIO
 	help
 	  Say Y or M if you want to add support for I2S driver for