All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] More COMPILE_TEST patches to build all media drivers on x86_64
@ 2018-04-20 12:32 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 28+ messages in thread
From: Mauro Carvalho Chehab @ 2018-04-20 12:32 UTC (permalink / raw)
  Cc: alsa-devel, Takashi Iwai, Mauro Carvalho Chehab,
	Mauro Carvalho Chehab, Linux Media Mailing List

While now all media drivers build with COMPILE_TEST on i386, there are still
a few of them that don't build on x86_64.

Making them compiling there is just a matter of touching Kconfig files.

While here, fix smatch warnings when building the siano driver on big endian
architectures.

Mauro Carvalho Chehab (4):
  media: radio: allow building ISA drivers with COMPILE_TEST
  media: sta2x11_vip: allow build with COMPILE_TEST
  sound, media: allow building ISA drivers it with COMPILE_TEST
  media: siano: get rid of __le32/__le16 cast warnings

 drivers/media/common/siano/smsendian.c | 14 ++++++------
 drivers/media/pci/sta2x11/Kconfig      |  2 +-
 drivers/media/radio/Kconfig            | 41 +++++++++++++++++++++-------------
 sound/isa/Kconfig                      |  9 ++++----
 4 files changed, 39 insertions(+), 27 deletions(-)

-- 
2.14.3

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

* [PATCH 0/4] More COMPILE_TEST patches to build all media drivers on x86_64
@ 2018-04-20 12:32 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 28+ messages in thread
From: Mauro Carvalho Chehab @ 2018-04-20 12:32 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, alsa-devel, Jaroslav Kysela, Takashi Iwai

While now all media drivers build with COMPILE_TEST on i386, there are still
a few of them that don't build on x86_64.

Making them compiling there is just a matter of touching Kconfig files.

While here, fix smatch warnings when building the siano driver on big endian
architectures.

Mauro Carvalho Chehab (4):
  media: radio: allow building ISA drivers with COMPILE_TEST
  media: sta2x11_vip: allow build with COMPILE_TEST
  sound, media: allow building ISA drivers it with COMPILE_TEST
  media: siano: get rid of __le32/__le16 cast warnings

 drivers/media/common/siano/smsendian.c | 14 ++++++------
 drivers/media/pci/sta2x11/Kconfig      |  2 +-
 drivers/media/radio/Kconfig            | 41 +++++++++++++++++++++-------------
 sound/isa/Kconfig                      |  9 ++++----
 4 files changed, 39 insertions(+), 27 deletions(-)

-- 
2.14.3

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

* [PATCH 1/4] media: radio: allow building ISA drivers with COMPILE_TEST
  2018-04-20 12:32 ` Mauro Carvalho Chehab
  (?)
@ 2018-04-20 12:32 ` Mauro Carvalho Chehab
  2018-04-22 15:41   ` kbuild test robot
  -1 siblings, 1 reply; 28+ messages in thread
From: Mauro Carvalho Chehab @ 2018-04-20 12:32 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab

Several radio devices only build on i386, because they depend
on ISA. Allow them to build on other archs by adding a
COMPILE_TEST check.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 drivers/media/radio/Kconfig | 38 ++++++++++++++++++++++++--------------
 1 file changed, 24 insertions(+), 14 deletions(-)

diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
index 2ed539f9eb87..d363726e9eb1 100644
--- a/drivers/media/radio/Kconfig
+++ b/drivers/media/radio/Kconfig
@@ -231,7 +231,7 @@ source "drivers/media/radio/wl128x/Kconfig"
 
 menuconfig V4L_RADIO_ISA_DRIVERS
 	bool "ISA radio devices"
-	depends on ISA
+	depends on ISA || COMPILE_TEST
 	default n
 	---help---
 	  Say Y here to enable support for these ISA drivers.
@@ -239,12 +239,13 @@ menuconfig V4L_RADIO_ISA_DRIVERS
 if V4L_RADIO_ISA_DRIVERS
 
 config RADIO_ISA
-	depends on ISA
+	depends on ISA || COMPILE_TEST
 	tristate
 
 config RADIO_CADET
 	tristate "ADS Cadet AM/FM Tuner"
-	depends on ISA && VIDEO_V4L2
+	depends on ISA || COMPILE_TEST
+	depends on VIDEO_V4L2
 	---help---
 	  Choose Y here if you have one of these AM/FM radio cards, and then
 	  fill in the port address below.
@@ -254,8 +255,8 @@ config RADIO_CADET
 
 config RADIO_RTRACK
 	tristate "AIMSlab RadioTrack (aka RadioReveal) support"
-	depends on ISA && VIDEO_V4L2
-	select RADIO_ISA
+	depends on ISA || COMPILE_TEST
+	depends on VIDEO_V4L2
 	---help---
 	  Choose Y here if you have one of these FM radio cards, and then fill
 	  in the port address below.
@@ -285,7 +286,8 @@ config RADIO_RTRACK_PORT
 
 config RADIO_RTRACK2
 	tristate "AIMSlab RadioTrack II support"
-	depends on ISA && VIDEO_V4L2
+	depends on ISA || COMPILE_TEST
+	depends on VIDEO_V4L2
 	select RADIO_ISA
 	---help---
 	  Choose Y here if you have this FM radio card, and then fill in the
@@ -308,7 +310,8 @@ config RADIO_RTRACK2_PORT
 
 config RADIO_AZTECH
 	tristate "Aztech/Packard Bell Radio"
-	depends on ISA && VIDEO_V4L2
+	depends on ISA || COMPILE_TEST
+	depends on VIDEO_V4L2
 	select RADIO_ISA
 	---help---
 	  Choose Y here if you have one of these FM radio cards, and then fill
@@ -328,7 +331,8 @@ config RADIO_AZTECH_PORT
 
 config RADIO_GEMTEK
 	tristate "GemTek Radio card (or compatible) support"
-	depends on ISA && VIDEO_V4L2
+	depends on ISA || COMPILE_TEST
+	depends on VIDEO_V4L2
 	select RADIO_ISA
 	---help---
 	  Choose Y here if you have this FM radio card, and then fill in the
@@ -382,7 +386,8 @@ config RADIO_MIROPCM20
 
 config RADIO_SF16FMI
 	tristate "SF16-FMI/SF16-FMP/SF16-FMD Radio"
-	depends on ISA && VIDEO_V4L2
+	depends on ISA || COMPILE_TEST
+	depends on VIDEO_V4L2
 	---help---
 	  Choose Y here if you have one of these FM radio cards.
 
@@ -391,7 +396,8 @@ config RADIO_SF16FMI
 
 config RADIO_SF16FMR2
 	tristate "SF16-FMR2/SF16-FMD2 Radio"
-	depends on ISA && VIDEO_V4L2
+	depends on ISA || COMPILE_TEST
+	depends on VIDEO_V4L2
 	select RADIO_TEA575X
 	---help---
 	  Choose Y here if you have one of these FM radio cards.
@@ -401,7 +407,8 @@ config RADIO_SF16FMR2
 
 config RADIO_TERRATEC
 	tristate "TerraTec ActiveRadio ISA Standalone"
-	depends on ISA && VIDEO_V4L2
+	depends on ISA || COMPILE_TEST
+	depends on VIDEO_V4L2
 	select RADIO_ISA
 	---help---
 	  Choose Y here if you have this FM radio card.
@@ -415,7 +422,8 @@ config RADIO_TERRATEC
 
 config RADIO_TRUST
 	tristate "Trust FM radio card"
-	depends on ISA && VIDEO_V4L2
+	depends on ISA || COMPILE_TEST
+	depends on VIDEO_V4L2
 	select RADIO_ISA
 	help
 	  This is a driver for the Trust FM radio cards. Say Y if you have
@@ -438,7 +446,8 @@ config RADIO_TRUST_PORT
 
 config RADIO_TYPHOON
 	tristate "Typhoon Radio (a.k.a. EcoRadio)"
-	depends on ISA && VIDEO_V4L2
+	depends on ISA || COMPILE_TEST
+	depends on VIDEO_V4L2
 	select RADIO_ISA
 	---help---
 	  Choose Y here if you have one of these FM radio cards, and then fill
@@ -472,7 +481,8 @@ config RADIO_TYPHOON_MUTEFREQ
 
 config RADIO_ZOLTRIX
 	tristate "Zoltrix Radio"
-	depends on ISA && VIDEO_V4L2
+	depends on ISA || COMPILE_TEST
+	depends on VIDEO_V4L2
 	select RADIO_ISA
 	---help---
 	  Choose Y here if you have one of these FM radio cards, and then fill
-- 
2.14.3

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

* [PATCH 2/4] media: sta2x11_vip: allow build with COMPILE_TEST
  2018-04-20 12:32 ` Mauro Carvalho Chehab
  (?)
  (?)
@ 2018-04-20 12:32 ` Mauro Carvalho Chehab
  -1 siblings, 0 replies; 28+ messages in thread
From: Mauro Carvalho Chehab @ 2018-04-20 12:32 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab

This driver doesn't use any weird API. So, allow building it
with COMPILE_TEST.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 drivers/media/pci/sta2x11/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/sta2x11/Kconfig b/drivers/media/pci/sta2x11/Kconfig
index e03587b1af71..7af3f1cbcea8 100644
--- a/drivers/media/pci/sta2x11/Kconfig
+++ b/drivers/media/pci/sta2x11/Kconfig
@@ -1,6 +1,6 @@
 config STA2X11_VIP
 	tristate "STA2X11 VIP Video For Linux"
-	depends on STA2X11
+	depends on STA2X11 || COMPILE_TEST
 	depends on HAS_DMA
 	select VIDEO_ADV7180 if MEDIA_SUBDRV_AUTOSELECT
 	select VIDEOBUF2_DMA_CONTIG
-- 
2.14.3

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

* [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
  2018-04-20 12:32 ` Mauro Carvalho Chehab
@ 2018-04-20 12:32   ` Mauro Carvalho Chehab
  -1 siblings, 0 replies; 28+ messages in thread
From: Mauro Carvalho Chehab @ 2018-04-20 12:32 UTC (permalink / raw)
  Cc: alsa-devel, Takashi Iwai, Mauro Carvalho Chehab,
	Mauro Carvalho Chehab, Linux Media Mailing List

All sound drivers that don't depend on PNP can be safelly
build with COMPILE_TEST, as ISA provides function stubs to
be used for such purposes.

As a side effect, with this change, the radio-miropcm20
can now be built outside i386 with COMPILE_TEST.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 drivers/media/radio/Kconfig | 3 ++-
 sound/isa/Kconfig           | 9 +++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
index d363726e9eb1..8fa403c7149e 100644
--- a/drivers/media/radio/Kconfig
+++ b/drivers/media/radio/Kconfig
@@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
 
 config RADIO_MIROPCM20
 	tristate "miroSOUND PCM20 radio"
-	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
+	depends on ISA || COMPILE_TEST
+	depends on ISA_DMA_API && VIDEO_V4L2 && SND
 	select SND_ISA
 	select SND_MIRO
 	---help---
diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
index cb54d9c0a77f..d2a6cdd0395c 100644
--- a/sound/isa/Kconfig
+++ b/sound/isa/Kconfig
@@ -20,7 +20,8 @@ config SND_SB16_DSP
 
 menuconfig SND_ISA
 	bool "ISA sound devices"
-	depends on ISA && ISA_DMA_API
+	depends on ISA || COMPILE_TEST
+	depends on ISA_DMA_API
 	default y
 	help
 	  Support for sound devices connected via the ISA bus.
@@ -38,7 +39,7 @@ config SND_ADLIB
 
 config SND_AD1816A
 	tristate "Analog Devices SoundPort AD1816A"
-	depends on PNP
+	depends on PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
@@ -66,7 +67,7 @@ config SND_AD1848
 
 config SND_ALS100
 	tristate "Diamond Tech. DT-019x and Avance Logic ALSxxx"
-	depends on PNP
+	depends on PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
@@ -107,7 +108,7 @@ config SND_AZT2316
 
 config SND_AZT2320
 	tristate "Aztech Systems AZT2320"
-	depends on PNP
+	depends on PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
-- 
2.14.3

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

* [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
@ 2018-04-20 12:32   ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 28+ messages in thread
From: Mauro Carvalho Chehab @ 2018-04-20 12:32 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Jaroslav Kysela, Takashi Iwai, alsa-devel

All sound drivers that don't depend on PNP can be safelly
build with COMPILE_TEST, as ISA provides function stubs to
be used for such purposes.

As a side effect, with this change, the radio-miropcm20
can now be built outside i386 with COMPILE_TEST.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 drivers/media/radio/Kconfig | 3 ++-
 sound/isa/Kconfig           | 9 +++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
index d363726e9eb1..8fa403c7149e 100644
--- a/drivers/media/radio/Kconfig
+++ b/drivers/media/radio/Kconfig
@@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
 
 config RADIO_MIROPCM20
 	tristate "miroSOUND PCM20 radio"
-	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
+	depends on ISA || COMPILE_TEST
+	depends on ISA_DMA_API && VIDEO_V4L2 && SND
 	select SND_ISA
 	select SND_MIRO
 	---help---
diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
index cb54d9c0a77f..d2a6cdd0395c 100644
--- a/sound/isa/Kconfig
+++ b/sound/isa/Kconfig
@@ -20,7 +20,8 @@ config SND_SB16_DSP
 
 menuconfig SND_ISA
 	bool "ISA sound devices"
-	depends on ISA && ISA_DMA_API
+	depends on ISA || COMPILE_TEST
+	depends on ISA_DMA_API
 	default y
 	help
 	  Support for sound devices connected via the ISA bus.
@@ -38,7 +39,7 @@ config SND_ADLIB
 
 config SND_AD1816A
 	tristate "Analog Devices SoundPort AD1816A"
-	depends on PNP
+	depends on PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
@@ -66,7 +67,7 @@ config SND_AD1848
 
 config SND_ALS100
 	tristate "Diamond Tech. DT-019x and Avance Logic ALSxxx"
-	depends on PNP
+	depends on PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
@@ -107,7 +108,7 @@ config SND_AZT2316
 
 config SND_AZT2320
 	tristate "Aztech Systems AZT2320"
-	depends on PNP
+	depends on PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
-- 
2.14.3

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

* [PATCH 4/4] media: siano: get rid of __le32/__le16 cast warnings
  2018-04-20 12:32 ` Mauro Carvalho Chehab
                   ` (3 preceding siblings ...)
  (?)
@ 2018-04-20 12:32 ` Mauro Carvalho Chehab
  -1 siblings, 0 replies; 28+ messages in thread
From: Mauro Carvalho Chehab @ 2018-04-20 12:32 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab

Those are all false-positives that appear with smatch when building for
arm:

  drivers/media/common/siano/smsendian.c:38:36: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:38:36: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:38:36: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:38:36: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:38:36: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:38:36: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:47:44: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:47:44: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:47:44: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:47:44: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:47:44: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:47:44: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:67:35: warning: cast to restricted __le16
  drivers/media/common/siano/smsendian.c:67:35: warning: cast to restricted __le16
  drivers/media/common/siano/smsendian.c:67:35: warning: cast to restricted __le16
  drivers/media/common/siano/smsendian.c:67:35: warning: cast to restricted __le16
  drivers/media/common/siano/smsendian.c:84:44: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:84:44: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:84:44: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:84:44: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:84:44: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:84:44: warning: cast to restricted __le32
  drivers/media/common/siano/smsendian.c:98:26: warning: cast to restricted __le16
  drivers/media/common/siano/smsendian.c:98:26: warning: cast to restricted __le16
  drivers/media/common/siano/smsendian.c:98:26: warning: cast to restricted __le16
  drivers/media/common/siano/smsendian.c:98:26: warning: cast to restricted __le16
  drivers/media/common/siano/smsendian.c:99:28: warning: cast to restricted __le16
  drivers/media/common/siano/smsendian.c:99:28: warning: cast to restricted __le16
  drivers/media/common/siano/smsendian.c:99:28: warning: cast to restricted __le16
  drivers/media/common/siano/smsendian.c:99:28: warning: cast to restricted __le16
  drivers/media/common/siano/smsendian.c:100:27: warning: cast to restricted __le16
  drivers/media/common/siano/smsendian.c:100:27: warning: cast to restricted __le16
  drivers/media/common/siano/smsendian.c:100:27: warning: cast to restricted __le16
  drivers/media/common/siano/smsendian.c:100:27: warning: cast to restricted __le16

Get rid of them by adding explicit forced casts.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 drivers/media/common/siano/smsendian.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/media/common/siano/smsendian.c b/drivers/media/common/siano/smsendian.c
index bfe831c10b1c..b95a631f23f9 100644
--- a/drivers/media/common/siano/smsendian.c
+++ b/drivers/media/common/siano/smsendian.c
@@ -35,7 +35,7 @@ void smsendian_handle_tx_message(void *buffer)
 	switch (msg->x_msg_header.msg_type) {
 	case MSG_SMS_DATA_DOWNLOAD_REQ:
 	{
-		msg->msg_data[0] = le32_to_cpu(msg->msg_data[0]);
+		msg->msg_data[0] = le32_to_cpu((__force __le32)(msg->msg_data[0]));
 		break;
 	}
 
@@ -44,7 +44,7 @@ void smsendian_handle_tx_message(void *buffer)
 				sizeof(struct sms_msg_hdr))/4;
 
 		for (i = 0; i < msg_words; i++)
-			msg->msg_data[i] = le32_to_cpu(msg->msg_data[i]);
+			msg->msg_data[i] = le32_to_cpu((__force __le32)msg->msg_data[i]);
 
 		break;
 	}
@@ -64,7 +64,7 @@ void smsendian_handle_rx_message(void *buffer)
 	{
 		struct sms_version_res *ver =
 			(struct sms_version_res *) msg;
-		ver->chip_model = le16_to_cpu(ver->chip_model);
+		ver->chip_model = le16_to_cpu((__force __le16)ver->chip_model);
 		break;
 	}
 
@@ -81,7 +81,7 @@ void smsendian_handle_rx_message(void *buffer)
 				sizeof(struct sms_msg_hdr))/4;
 
 		for (i = 0; i < msg_words; i++)
-			msg->msg_data[i] = le32_to_cpu(msg->msg_data[i]);
+			msg->msg_data[i] = le32_to_cpu((__force __le32)msg->msg_data[i]);
 
 		break;
 	}
@@ -95,9 +95,9 @@ void smsendian_handle_message_header(void *msg)
 #ifdef __BIG_ENDIAN
 	struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)msg;
 
-	phdr->msg_type = le16_to_cpu(phdr->msg_type);
-	phdr->msg_length = le16_to_cpu(phdr->msg_length);
-	phdr->msg_flags = le16_to_cpu(phdr->msg_flags);
+	phdr->msg_type = le16_to_cpu((__force __le16)phdr->msg_type);
+	phdr->msg_length = le16_to_cpu((__force __le16)phdr->msg_length);
+	phdr->msg_flags = le16_to_cpu((__force __le16)phdr->msg_flags);
 #endif /* __BIG_ENDIAN */
 }
 EXPORT_SYMBOL_GPL(smsendian_handle_message_header);
-- 
2.14.3

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
  2018-04-20 12:32   ` Mauro Carvalho Chehab
@ 2018-04-20 12:37     ` Takashi Iwai
  -1 siblings, 0 replies; 28+ messages in thread
From: Takashi Iwai @ 2018-04-20 12:37 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: alsa-devel, Linux Media Mailing List, Mauro Carvalho Chehab

On Fri, 20 Apr 2018 14:32:15 +0200,
Mauro Carvalho Chehab wrote:
> 
> All sound drivers that don't depend on PNP can be safelly
> build with COMPILE_TEST, as ISA provides function stubs to
> be used for such purposes.
> 
> As a side effect, with this change, the radio-miropcm20
> can now be built outside i386 with COMPILE_TEST.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> ---
>  drivers/media/radio/Kconfig | 3 ++-
>  sound/isa/Kconfig           | 9 +++++----
>  2 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
> index d363726e9eb1..8fa403c7149e 100644
> --- a/drivers/media/radio/Kconfig
> +++ b/drivers/media/radio/Kconfig
> @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
>  
>  config RADIO_MIROPCM20
>  	tristate "miroSOUND PCM20 radio"
> -	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
> +	depends on ISA || COMPILE_TEST
> +	depends on ISA_DMA_API && VIDEO_V4L2 && SND
>  	select SND_ISA
>  	select SND_MIRO
>  	---help---
> diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
> index cb54d9c0a77f..d2a6cdd0395c 100644
> --- a/sound/isa/Kconfig
> +++ b/sound/isa/Kconfig
> @@ -20,7 +20,8 @@ config SND_SB16_DSP
>  
>  menuconfig SND_ISA
>  	bool "ISA sound devices"
> -	depends on ISA && ISA_DMA_API
> +	depends on ISA || COMPILE_TEST
> +	depends on ISA_DMA_API
>  	default y
>  	help
>  	  Support for sound devices connected via the ISA bus.
> @@ -38,7 +39,7 @@ config SND_ADLIB
>  
>  config SND_AD1816A
>  	tristate "Analog Devices SoundPort AD1816A"
> -	depends on PNP
> +	depends on PNP && ISA
>  	select ISAPNP
>  	select SND_OPL3_LIB
>  	select SND_MPU401_UART

Just from curiosity: what's the reason for this explicit CONFIG_ISA
dependency?  What error did you get?


thanks,

Takashi

> @@ -66,7 +67,7 @@ config SND_AD1848
>  
>  config SND_ALS100
>  	tristate "Diamond Tech. DT-019x and Avance Logic ALSxxx"
> -	depends on PNP
> +	depends on PNP && ISA
>  	select ISAPNP
>  	select SND_OPL3_LIB
>  	select SND_MPU401_UART
> @@ -107,7 +108,7 @@ config SND_AZT2316
>  
>  config SND_AZT2320
>  	tristate "Aztech Systems AZT2320"
> -	depends on PNP
> +	depends on PNP && ISA
>  	select ISAPNP
>  	select SND_OPL3_LIB
>  	select SND_MPU401_UART
> -- 
> 2.14.3
> 
> 

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
@ 2018-04-20 12:37     ` Takashi Iwai
  0 siblings, 0 replies; 28+ messages in thread
From: Takashi Iwai @ 2018-04-20 12:37 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: alsa-devel, Mauro Carvalho Chehab, Jaroslav Kysela,
	Linux Media Mailing List

On Fri, 20 Apr 2018 14:32:15 +0200,
Mauro Carvalho Chehab wrote:
> 
> All sound drivers that don't depend on PNP can be safelly
> build with COMPILE_TEST, as ISA provides function stubs to
> be used for such purposes.
> 
> As a side effect, with this change, the radio-miropcm20
> can now be built outside i386 with COMPILE_TEST.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> ---
>  drivers/media/radio/Kconfig | 3 ++-
>  sound/isa/Kconfig           | 9 +++++----
>  2 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
> index d363726e9eb1..8fa403c7149e 100644
> --- a/drivers/media/radio/Kconfig
> +++ b/drivers/media/radio/Kconfig
> @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
>  
>  config RADIO_MIROPCM20
>  	tristate "miroSOUND PCM20 radio"
> -	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
> +	depends on ISA || COMPILE_TEST
> +	depends on ISA_DMA_API && VIDEO_V4L2 && SND
>  	select SND_ISA
>  	select SND_MIRO
>  	---help---
> diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
> index cb54d9c0a77f..d2a6cdd0395c 100644
> --- a/sound/isa/Kconfig
> +++ b/sound/isa/Kconfig
> @@ -20,7 +20,8 @@ config SND_SB16_DSP
>  
>  menuconfig SND_ISA
>  	bool "ISA sound devices"
> -	depends on ISA && ISA_DMA_API
> +	depends on ISA || COMPILE_TEST
> +	depends on ISA_DMA_API
>  	default y
>  	help
>  	  Support for sound devices connected via the ISA bus.
> @@ -38,7 +39,7 @@ config SND_ADLIB
>  
>  config SND_AD1816A
>  	tristate "Analog Devices SoundPort AD1816A"
> -	depends on PNP
> +	depends on PNP && ISA
>  	select ISAPNP
>  	select SND_OPL3_LIB
>  	select SND_MPU401_UART

Just from curiosity: what's the reason for this explicit CONFIG_ISA
dependency?  What error did you get?


thanks,

Takashi

> @@ -66,7 +67,7 @@ config SND_AD1848
>  
>  config SND_ALS100
>  	tristate "Diamond Tech. DT-019x and Avance Logic ALSxxx"
> -	depends on PNP
> +	depends on PNP && ISA
>  	select ISAPNP
>  	select SND_OPL3_LIB
>  	select SND_MPU401_UART
> @@ -107,7 +108,7 @@ config SND_AZT2316
>  
>  config SND_AZT2320
>  	tristate "Aztech Systems AZT2320"
> -	depends on PNP
> +	depends on PNP && ISA
>  	select ISAPNP
>  	select SND_OPL3_LIB
>  	select SND_MPU401_UART
> -- 
> 2.14.3
> 
> 

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
  2018-04-20 12:37     ` Takashi Iwai
@ 2018-04-20 12:51       ` Mauro Carvalho Chehab
  -1 siblings, 0 replies; 28+ messages in thread
From: Mauro Carvalho Chehab @ 2018-04-20 12:51 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Linux Media Mailing List, Mauro Carvalho Chehab

Em Fri, 20 Apr 2018 14:37:46 +0200
Takashi Iwai <tiwai@suse.de> escreveu:

> On Fri, 20 Apr 2018 14:32:15 +0200,
> Mauro Carvalho Chehab wrote:
> > 
> > All sound drivers that don't depend on PNP can be safelly
> > build with COMPILE_TEST, as ISA provides function stubs to
> > be used for such purposes.
> > 
> > As a side effect, with this change, the radio-miropcm20
> > can now be built outside i386 with COMPILE_TEST.
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> > ---
> >  drivers/media/radio/Kconfig | 3 ++-
> >  sound/isa/Kconfig           | 9 +++++----
> >  2 files changed, 7 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
> > index d363726e9eb1..8fa403c7149e 100644
> > --- a/drivers/media/radio/Kconfig
> > +++ b/drivers/media/radio/Kconfig
> > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
> >  
> >  config RADIO_MIROPCM20
> >  	tristate "miroSOUND PCM20 radio"
> > -	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
> > +	depends on ISA || COMPILE_TEST
> > +	depends on ISA_DMA_API && VIDEO_V4L2 && SND
> >  	select SND_ISA
> >  	select SND_MIRO
> >  	---help---
> > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
> > index cb54d9c0a77f..d2a6cdd0395c 100644
> > --- a/sound/isa/Kconfig
> > +++ b/sound/isa/Kconfig
> > @@ -20,7 +20,8 @@ config SND_SB16_DSP
> >  
> >  menuconfig SND_ISA
> >  	bool "ISA sound devices"
> > -	depends on ISA && ISA_DMA_API
> > +	depends on ISA || COMPILE_TEST
> > +	depends on ISA_DMA_API
> >  	default y
> >  	help
> >  	  Support for sound devices connected via the ISA bus.
> > @@ -38,7 +39,7 @@ config SND_ADLIB
> >  
> >  config SND_AD1816A
> >  	tristate "Analog Devices SoundPort AD1816A"
> > -	depends on PNP
> > +	depends on PNP && ISA
> >  	select ISAPNP
> >  	select SND_OPL3_LIB
> >  	select SND_MPU401_UART  
> 
> Just from curiosity: what's the reason for this explicit CONFIG_ISA
> dependency?  What error did you get?

Kconfig complains with "select ISAPNP":

WARNING: unmet direct dependencies detected for ISAPNP
  Depends on [n]: PNP [=y] && ISA [=n]
  Selected by [y]:
  - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && PNP [=y]

Because it is declared as:

config ISAPNP
	bool "ISA Plug and Play support"
        depends on ISA

I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST,
but I suspect that would touch on yet another subsystem and has
the potential to point to other things that need changes, as
a lot more drivers will be selected.

Anyway, after a quick look at include/linux/isapnp.h, I suspect
that this can work.

I'll run some tests here.

Thanks,
Mauro

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
@ 2018-04-20 12:51       ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 28+ messages in thread
From: Mauro Carvalho Chehab @ 2018-04-20 12:51 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, Mauro Carvalho Chehab, Jaroslav Kysela,
	Linux Media Mailing List

Em Fri, 20 Apr 2018 14:37:46 +0200
Takashi Iwai <tiwai@suse.de> escreveu:

> On Fri, 20 Apr 2018 14:32:15 +0200,
> Mauro Carvalho Chehab wrote:
> > 
> > All sound drivers that don't depend on PNP can be safelly
> > build with COMPILE_TEST, as ISA provides function stubs to
> > be used for such purposes.
> > 
> > As a side effect, with this change, the radio-miropcm20
> > can now be built outside i386 with COMPILE_TEST.
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> > ---
> >  drivers/media/radio/Kconfig | 3 ++-
> >  sound/isa/Kconfig           | 9 +++++----
> >  2 files changed, 7 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
> > index d363726e9eb1..8fa403c7149e 100644
> > --- a/drivers/media/radio/Kconfig
> > +++ b/drivers/media/radio/Kconfig
> > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
> >  
> >  config RADIO_MIROPCM20
> >  	tristate "miroSOUND PCM20 radio"
> > -	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
> > +	depends on ISA || COMPILE_TEST
> > +	depends on ISA_DMA_API && VIDEO_V4L2 && SND
> >  	select SND_ISA
> >  	select SND_MIRO
> >  	---help---
> > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
> > index cb54d9c0a77f..d2a6cdd0395c 100644
> > --- a/sound/isa/Kconfig
> > +++ b/sound/isa/Kconfig
> > @@ -20,7 +20,8 @@ config SND_SB16_DSP
> >  
> >  menuconfig SND_ISA
> >  	bool "ISA sound devices"
> > -	depends on ISA && ISA_DMA_API
> > +	depends on ISA || COMPILE_TEST
> > +	depends on ISA_DMA_API
> >  	default y
> >  	help
> >  	  Support for sound devices connected via the ISA bus.
> > @@ -38,7 +39,7 @@ config SND_ADLIB
> >  
> >  config SND_AD1816A
> >  	tristate "Analog Devices SoundPort AD1816A"
> > -	depends on PNP
> > +	depends on PNP && ISA
> >  	select ISAPNP
> >  	select SND_OPL3_LIB
> >  	select SND_MPU401_UART  
> 
> Just from curiosity: what's the reason for this explicit CONFIG_ISA
> dependency?  What error did you get?

Kconfig complains with "select ISAPNP":

WARNING: unmet direct dependencies detected for ISAPNP
  Depends on [n]: PNP [=y] && ISA [=n]
  Selected by [y]:
  - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && PNP [=y]

Because it is declared as:

config ISAPNP
	bool "ISA Plug and Play support"
        depends on ISA

I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST,
but I suspect that would touch on yet another subsystem and has
the potential to point to other things that need changes, as
a lot more drivers will be selected.

Anyway, after a quick look at include/linux/isapnp.h, I suspect
that this can work.

I'll run some tests here.

Thanks,
Mauro

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
  2018-04-20 12:51       ` Mauro Carvalho Chehab
@ 2018-04-20 12:58         ` Takashi Iwai
  -1 siblings, 0 replies; 28+ messages in thread
From: Takashi Iwai @ 2018-04-20 12:58 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: alsa-devel, Linux Media Mailing List, Mauro Carvalho Chehab

On Fri, 20 Apr 2018 14:51:29 +0200,
Mauro Carvalho Chehab wrote:
> 
> Em Fri, 20 Apr 2018 14:37:46 +0200
> Takashi Iwai <tiwai@suse.de> escreveu:
> 
> > On Fri, 20 Apr 2018 14:32:15 +0200,
> > Mauro Carvalho Chehab wrote:
> > > 
> > > All sound drivers that don't depend on PNP can be safelly
> > > build with COMPILE_TEST, as ISA provides function stubs to
> > > be used for such purposes.
> > > 
> > > As a side effect, with this change, the radio-miropcm20
> > > can now be built outside i386 with COMPILE_TEST.
> > > 
> > > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> > > ---
> > >  drivers/media/radio/Kconfig | 3 ++-
> > >  sound/isa/Kconfig           | 9 +++++----
> > >  2 files changed, 7 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
> > > index d363726e9eb1..8fa403c7149e 100644
> > > --- a/drivers/media/radio/Kconfig
> > > +++ b/drivers/media/radio/Kconfig
> > > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
> > >  
> > >  config RADIO_MIROPCM20
> > >  	tristate "miroSOUND PCM20 radio"
> > > -	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
> > > +	depends on ISA || COMPILE_TEST
> > > +	depends on ISA_DMA_API && VIDEO_V4L2 && SND
> > >  	select SND_ISA
> > >  	select SND_MIRO
> > >  	---help---
> > > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
> > > index cb54d9c0a77f..d2a6cdd0395c 100644
> > > --- a/sound/isa/Kconfig
> > > +++ b/sound/isa/Kconfig
> > > @@ -20,7 +20,8 @@ config SND_SB16_DSP
> > >  
> > >  menuconfig SND_ISA
> > >  	bool "ISA sound devices"
> > > -	depends on ISA && ISA_DMA_API
> > > +	depends on ISA || COMPILE_TEST
> > > +	depends on ISA_DMA_API
> > >  	default y
> > >  	help
> > >  	  Support for sound devices connected via the ISA bus.
> > > @@ -38,7 +39,7 @@ config SND_ADLIB
> > >  
> > >  config SND_AD1816A
> > >  	tristate "Analog Devices SoundPort AD1816A"
> > > -	depends on PNP
> > > +	depends on PNP && ISA
> > >  	select ISAPNP
> > >  	select SND_OPL3_LIB
> > >  	select SND_MPU401_UART  
> > 
> > Just from curiosity: what's the reason for this explicit CONFIG_ISA
> > dependency?  What error did you get?
> 
> Kconfig complains with "select ISAPNP":
> 
> WARNING: unmet direct dependencies detected for ISAPNP
>   Depends on [n]: PNP [=y] && ISA [=n]
>   Selected by [y]:
>   - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && PNP [=y]
> 
> Because it is declared as:
> 
> config ISAPNP
> 	bool "ISA Plug and Play support"
>         depends on ISA

I see.  Then it'd be better to put this explanations in the changelog
as well.

> I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST,
> but I suspect that would touch on yet another subsystem and has
> the potential to point to other things that need changes, as
> a lot more drivers will be selected.
> 
> Anyway, after a quick look at include/linux/isapnp.h, I suspect
> that this can work.
> 
> I'll run some tests here.

At least a dumb stub is there, so let's hope we can widen the test
coverage :)


thanks,

Takashi

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
@ 2018-04-20 12:58         ` Takashi Iwai
  0 siblings, 0 replies; 28+ messages in thread
From: Takashi Iwai @ 2018-04-20 12:58 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: alsa-devel, Mauro Carvalho Chehab, Jaroslav Kysela,
	Linux Media Mailing List

On Fri, 20 Apr 2018 14:51:29 +0200,
Mauro Carvalho Chehab wrote:
> 
> Em Fri, 20 Apr 2018 14:37:46 +0200
> Takashi Iwai <tiwai@suse.de> escreveu:
> 
> > On Fri, 20 Apr 2018 14:32:15 +0200,
> > Mauro Carvalho Chehab wrote:
> > > 
> > > All sound drivers that don't depend on PNP can be safelly
> > > build with COMPILE_TEST, as ISA provides function stubs to
> > > be used for such purposes.
> > > 
> > > As a side effect, with this change, the radio-miropcm20
> > > can now be built outside i386 with COMPILE_TEST.
> > > 
> > > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> > > ---
> > >  drivers/media/radio/Kconfig | 3 ++-
> > >  sound/isa/Kconfig           | 9 +++++----
> > >  2 files changed, 7 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
> > > index d363726e9eb1..8fa403c7149e 100644
> > > --- a/drivers/media/radio/Kconfig
> > > +++ b/drivers/media/radio/Kconfig
> > > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
> > >  
> > >  config RADIO_MIROPCM20
> > >  	tristate "miroSOUND PCM20 radio"
> > > -	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
> > > +	depends on ISA || COMPILE_TEST
> > > +	depends on ISA_DMA_API && VIDEO_V4L2 && SND
> > >  	select SND_ISA
> > >  	select SND_MIRO
> > >  	---help---
> > > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
> > > index cb54d9c0a77f..d2a6cdd0395c 100644
> > > --- a/sound/isa/Kconfig
> > > +++ b/sound/isa/Kconfig
> > > @@ -20,7 +20,8 @@ config SND_SB16_DSP
> > >  
> > >  menuconfig SND_ISA
> > >  	bool "ISA sound devices"
> > > -	depends on ISA && ISA_DMA_API
> > > +	depends on ISA || COMPILE_TEST
> > > +	depends on ISA_DMA_API
> > >  	default y
> > >  	help
> > >  	  Support for sound devices connected via the ISA bus.
> > > @@ -38,7 +39,7 @@ config SND_ADLIB
> > >  
> > >  config SND_AD1816A
> > >  	tristate "Analog Devices SoundPort AD1816A"
> > > -	depends on PNP
> > > +	depends on PNP && ISA
> > >  	select ISAPNP
> > >  	select SND_OPL3_LIB
> > >  	select SND_MPU401_UART  
> > 
> > Just from curiosity: what's the reason for this explicit CONFIG_ISA
> > dependency?  What error did you get?
> 
> Kconfig complains with "select ISAPNP":
> 
> WARNING: unmet direct dependencies detected for ISAPNP
>   Depends on [n]: PNP [=y] && ISA [=n]
>   Selected by [y]:
>   - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && PNP [=y]
> 
> Because it is declared as:
> 
> config ISAPNP
> 	bool "ISA Plug and Play support"
>         depends on ISA

I see.  Then it'd be better to put this explanations in the changelog
as well.

> I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST,
> but I suspect that would touch on yet another subsystem and has
> the potential to point to other things that need changes, as
> a lot more drivers will be selected.
> 
> Anyway, after a quick look at include/linux/isapnp.h, I suspect
> that this can work.
> 
> I'll run some tests here.

At least a dumb stub is there, so let's hope we can widen the test
coverage :)


thanks,

Takashi

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
  2018-04-20 12:51       ` Mauro Carvalho Chehab
@ 2018-04-20 13:01         ` Mauro Carvalho Chehab
  -1 siblings, 0 replies; 28+ messages in thread
From: Mauro Carvalho Chehab @ 2018-04-20 13:01 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Linux Media Mailing List, Andrew Morton

Em Fri, 20 Apr 2018 09:51:29 -0300
Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:

> Em Fri, 20 Apr 2018 14:37:46 +0200
> Takashi Iwai <tiwai@suse.de> escreveu:
> 
> > On Fri, 20 Apr 2018 14:32:15 +0200,
> > Mauro Carvalho Chehab wrote:  
> > > 
> > > All sound drivers that don't depend on PNP can be safelly
> > > build with COMPILE_TEST, as ISA provides function stubs to
> > > be used for such purposes.
> > > 
> > > As a side effect, with this change, the radio-miropcm20
> > > can now be built outside i386 with COMPILE_TEST.
> > > 
> > > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> > > ---
> > >  drivers/media/radio/Kconfig | 3 ++-
> > >  sound/isa/Kconfig           | 9 +++++----
> > >  2 files changed, 7 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
> > > index d363726e9eb1..8fa403c7149e 100644
> > > --- a/drivers/media/radio/Kconfig
> > > +++ b/drivers/media/radio/Kconfig
> > > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
> > >  
> > >  config RADIO_MIROPCM20
> > >  	tristate "miroSOUND PCM20 radio"
> > > -	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
> > > +	depends on ISA || COMPILE_TEST
> > > +	depends on ISA_DMA_API && VIDEO_V4L2 && SND
> > >  	select SND_ISA
> > >  	select SND_MIRO
> > >  	---help---
> > > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
> > > index cb54d9c0a77f..d2a6cdd0395c 100644
> > > --- a/sound/isa/Kconfig
> > > +++ b/sound/isa/Kconfig
> > > @@ -20,7 +20,8 @@ config SND_SB16_DSP
> > >  
> > >  menuconfig SND_ISA
> > >  	bool "ISA sound devices"
> > > -	depends on ISA && ISA_DMA_API
> > > +	depends on ISA || COMPILE_TEST
> > > +	depends on ISA_DMA_API
> > >  	default y
> > >  	help
> > >  	  Support for sound devices connected via the ISA bus.
> > > @@ -38,7 +39,7 @@ config SND_ADLIB
> > >  
> > >  config SND_AD1816A
> > >  	tristate "Analog Devices SoundPort AD1816A"
> > > -	depends on PNP
> > > +	depends on PNP && ISA
> > >  	select ISAPNP
> > >  	select SND_OPL3_LIB
> > >  	select SND_MPU401_UART    
> > 
> > Just from curiosity: what's the reason for this explicit CONFIG_ISA
> > dependency?  What error did you get?  
> 
> Kconfig complains with "select ISAPNP":
> 
> WARNING: unmet direct dependencies detected for ISAPNP
>   Depends on [n]: PNP [=y] && ISA [=n]
>   Selected by [y]:
>   - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && PNP [=y]
> 
> Because it is declared as:
> 
> config ISAPNP
> 	bool "ISA Plug and Play support"
>         depends on ISA
> 
> I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST,
> but I suspect that would touch on yet another subsystem and has
> the potential to point to other things that need changes, as
> a lot more drivers will be selected.
> 
> Anyway, after a quick look at include/linux/isapnp.h, I suspect
> that this can work.
> 
> I'll run some tests here.

Yes, removing the ISAPNP dependency if COMPILE_TEST is trivial too.

Just sent a separate patch to be applied after this one with such
removal.

I opted to make it as a separate patch as, if the drivers there
fail to build on some weird architecture, we won't need to discard
this one.

Thanks,
Mauro

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
@ 2018-04-20 13:01         ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 28+ messages in thread
From: Mauro Carvalho Chehab @ 2018-04-20 13:01 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, Jaroslav Kysela, Linux Media Mailing List,
	Andrew Morton

Em Fri, 20 Apr 2018 09:51:29 -0300
Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:

> Em Fri, 20 Apr 2018 14:37:46 +0200
> Takashi Iwai <tiwai@suse.de> escreveu:
> 
> > On Fri, 20 Apr 2018 14:32:15 +0200,
> > Mauro Carvalho Chehab wrote:  
> > > 
> > > All sound drivers that don't depend on PNP can be safelly
> > > build with COMPILE_TEST, as ISA provides function stubs to
> > > be used for such purposes.
> > > 
> > > As a side effect, with this change, the radio-miropcm20
> > > can now be built outside i386 with COMPILE_TEST.
> > > 
> > > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> > > ---
> > >  drivers/media/radio/Kconfig | 3 ++-
> > >  sound/isa/Kconfig           | 9 +++++----
> > >  2 files changed, 7 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
> > > index d363726e9eb1..8fa403c7149e 100644
> > > --- a/drivers/media/radio/Kconfig
> > > +++ b/drivers/media/radio/Kconfig
> > > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
> > >  
> > >  config RADIO_MIROPCM20
> > >  	tristate "miroSOUND PCM20 radio"
> > > -	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
> > > +	depends on ISA || COMPILE_TEST
> > > +	depends on ISA_DMA_API && VIDEO_V4L2 && SND
> > >  	select SND_ISA
> > >  	select SND_MIRO
> > >  	---help---
> > > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
> > > index cb54d9c0a77f..d2a6cdd0395c 100644
> > > --- a/sound/isa/Kconfig
> > > +++ b/sound/isa/Kconfig
> > > @@ -20,7 +20,8 @@ config SND_SB16_DSP
> > >  
> > >  menuconfig SND_ISA
> > >  	bool "ISA sound devices"
> > > -	depends on ISA && ISA_DMA_API
> > > +	depends on ISA || COMPILE_TEST
> > > +	depends on ISA_DMA_API
> > >  	default y
> > >  	help
> > >  	  Support for sound devices connected via the ISA bus.
> > > @@ -38,7 +39,7 @@ config SND_ADLIB
> > >  
> > >  config SND_AD1816A
> > >  	tristate "Analog Devices SoundPort AD1816A"
> > > -	depends on PNP
> > > +	depends on PNP && ISA
> > >  	select ISAPNP
> > >  	select SND_OPL3_LIB
> > >  	select SND_MPU401_UART    
> > 
> > Just from curiosity: what's the reason for this explicit CONFIG_ISA
> > dependency?  What error did you get?  
> 
> Kconfig complains with "select ISAPNP":
> 
> WARNING: unmet direct dependencies detected for ISAPNP
>   Depends on [n]: PNP [=y] && ISA [=n]
>   Selected by [y]:
>   - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && PNP [=y]
> 
> Because it is declared as:
> 
> config ISAPNP
> 	bool "ISA Plug and Play support"
>         depends on ISA
> 
> I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST,
> but I suspect that would touch on yet another subsystem and has
> the potential to point to other things that need changes, as
> a lot more drivers will be selected.
> 
> Anyway, after a quick look at include/linux/isapnp.h, I suspect
> that this can work.
> 
> I'll run some tests here.

Yes, removing the ISAPNP dependency if COMPILE_TEST is trivial too.

Just sent a separate patch to be applied after this one with such
removal.

I opted to make it as a separate patch as, if the drivers there
fail to build on some weird architecture, we won't need to discard
this one.

Thanks,
Mauro

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
  2018-04-20 13:01         ` Mauro Carvalho Chehab
@ 2018-04-20 13:06           ` Takashi Iwai
  -1 siblings, 0 replies; 28+ messages in thread
From: Takashi Iwai @ 2018-04-20 13:06 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: alsa-devel, Linux Media Mailing List, Andrew Morton

On Fri, 20 Apr 2018 15:01:22 +0200,
Mauro Carvalho Chehab wrote:
> 
> Em Fri, 20 Apr 2018 09:51:29 -0300
> Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:
> 
> > Em Fri, 20 Apr 2018 14:37:46 +0200
> > Takashi Iwai <tiwai@suse.de> escreveu:
> > 
> > > On Fri, 20 Apr 2018 14:32:15 +0200,
> > > Mauro Carvalho Chehab wrote:  
> > > > 
> > > > All sound drivers that don't depend on PNP can be safelly
> > > > build with COMPILE_TEST, as ISA provides function stubs to
> > > > be used for such purposes.
> > > > 
> > > > As a side effect, with this change, the radio-miropcm20
> > > > can now be built outside i386 with COMPILE_TEST.
> > > > 
> > > > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> > > > ---
> > > >  drivers/media/radio/Kconfig | 3 ++-
> > > >  sound/isa/Kconfig           | 9 +++++----
> > > >  2 files changed, 7 insertions(+), 5 deletions(-)
> > > > 
> > > > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
> > > > index d363726e9eb1..8fa403c7149e 100644
> > > > --- a/drivers/media/radio/Kconfig
> > > > +++ b/drivers/media/radio/Kconfig
> > > > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
> > > >  
> > > >  config RADIO_MIROPCM20
> > > >  	tristate "miroSOUND PCM20 radio"
> > > > -	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
> > > > +	depends on ISA || COMPILE_TEST
> > > > +	depends on ISA_DMA_API && VIDEO_V4L2 && SND
> > > >  	select SND_ISA
> > > >  	select SND_MIRO
> > > >  	---help---
> > > > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
> > > > index cb54d9c0a77f..d2a6cdd0395c 100644
> > > > --- a/sound/isa/Kconfig
> > > > +++ b/sound/isa/Kconfig
> > > > @@ -20,7 +20,8 @@ config SND_SB16_DSP
> > > >  
> > > >  menuconfig SND_ISA
> > > >  	bool "ISA sound devices"
> > > > -	depends on ISA && ISA_DMA_API
> > > > +	depends on ISA || COMPILE_TEST
> > > > +	depends on ISA_DMA_API
> > > >  	default y
> > > >  	help
> > > >  	  Support for sound devices connected via the ISA bus.
> > > > @@ -38,7 +39,7 @@ config SND_ADLIB
> > > >  
> > > >  config SND_AD1816A
> > > >  	tristate "Analog Devices SoundPort AD1816A"
> > > > -	depends on PNP
> > > > +	depends on PNP && ISA
> > > >  	select ISAPNP
> > > >  	select SND_OPL3_LIB
> > > >  	select SND_MPU401_UART    
> > > 
> > > Just from curiosity: what's the reason for this explicit CONFIG_ISA
> > > dependency?  What error did you get?  
> > 
> > Kconfig complains with "select ISAPNP":
> > 
> > WARNING: unmet direct dependencies detected for ISAPNP
> >   Depends on [n]: PNP [=y] && ISA [=n]
> >   Selected by [y]:
> >   - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && PNP [=y]
> > 
> > Because it is declared as:
> > 
> > config ISAPNP
> > 	bool "ISA Plug and Play support"
> >         depends on ISA
> > 
> > I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST,
> > but I suspect that would touch on yet another subsystem and has
> > the potential to point to other things that need changes, as
> > a lot more drivers will be selected.
> > 
> > Anyway, after a quick look at include/linux/isapnp.h, I suspect
> > that this can work.
> > 
> > I'll run some tests here.
> 
> Yes, removing the ISAPNP dependency if COMPILE_TEST is trivial too.
> 
> Just sent a separate patch to be applied after this one with such
> removal.
> 
> I opted to make it as a separate patch as, if the drivers there
> fail to build on some weird architecture, we won't need to discard
> this one.

OK, then feel free to take my ack:
  Acked-by: Takashi Iwai <tiwai@suse.de>

But still it'd be better to mention about the CONFIG_ISA change, even
though it'll be removed again after the ISAPNP COMIPLE_TEST patch.


thanks,

Takashi

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
@ 2018-04-20 13:06           ` Takashi Iwai
  0 siblings, 0 replies; 28+ messages in thread
From: Takashi Iwai @ 2018-04-20 13:06 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: alsa-devel, Jaroslav Kysela, Linux Media Mailing List,
	Andrew Morton

On Fri, 20 Apr 2018 15:01:22 +0200,
Mauro Carvalho Chehab wrote:
> 
> Em Fri, 20 Apr 2018 09:51:29 -0300
> Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:
> 
> > Em Fri, 20 Apr 2018 14:37:46 +0200
> > Takashi Iwai <tiwai@suse.de> escreveu:
> > 
> > > On Fri, 20 Apr 2018 14:32:15 +0200,
> > > Mauro Carvalho Chehab wrote:  
> > > > 
> > > > All sound drivers that don't depend on PNP can be safelly
> > > > build with COMPILE_TEST, as ISA provides function stubs to
> > > > be used for such purposes.
> > > > 
> > > > As a side effect, with this change, the radio-miropcm20
> > > > can now be built outside i386 with COMPILE_TEST.
> > > > 
> > > > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> > > > ---
> > > >  drivers/media/radio/Kconfig | 3 ++-
> > > >  sound/isa/Kconfig           | 9 +++++----
> > > >  2 files changed, 7 insertions(+), 5 deletions(-)
> > > > 
> > > > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
> > > > index d363726e9eb1..8fa403c7149e 100644
> > > > --- a/drivers/media/radio/Kconfig
> > > > +++ b/drivers/media/radio/Kconfig
> > > > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
> > > >  
> > > >  config RADIO_MIROPCM20
> > > >  	tristate "miroSOUND PCM20 radio"
> > > > -	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
> > > > +	depends on ISA || COMPILE_TEST
> > > > +	depends on ISA_DMA_API && VIDEO_V4L2 && SND
> > > >  	select SND_ISA
> > > >  	select SND_MIRO
> > > >  	---help---
> > > > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
> > > > index cb54d9c0a77f..d2a6cdd0395c 100644
> > > > --- a/sound/isa/Kconfig
> > > > +++ b/sound/isa/Kconfig
> > > > @@ -20,7 +20,8 @@ config SND_SB16_DSP
> > > >  
> > > >  menuconfig SND_ISA
> > > >  	bool "ISA sound devices"
> > > > -	depends on ISA && ISA_DMA_API
> > > > +	depends on ISA || COMPILE_TEST
> > > > +	depends on ISA_DMA_API
> > > >  	default y
> > > >  	help
> > > >  	  Support for sound devices connected via the ISA bus.
> > > > @@ -38,7 +39,7 @@ config SND_ADLIB
> > > >  
> > > >  config SND_AD1816A
> > > >  	tristate "Analog Devices SoundPort AD1816A"
> > > > -	depends on PNP
> > > > +	depends on PNP && ISA
> > > >  	select ISAPNP
> > > >  	select SND_OPL3_LIB
> > > >  	select SND_MPU401_UART    
> > > 
> > > Just from curiosity: what's the reason for this explicit CONFIG_ISA
> > > dependency?  What error did you get?  
> > 
> > Kconfig complains with "select ISAPNP":
> > 
> > WARNING: unmet direct dependencies detected for ISAPNP
> >   Depends on [n]: PNP [=y] && ISA [=n]
> >   Selected by [y]:
> >   - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && PNP [=y]
> > 
> > Because it is declared as:
> > 
> > config ISAPNP
> > 	bool "ISA Plug and Play support"
> >         depends on ISA
> > 
> > I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST,
> > but I suspect that would touch on yet another subsystem and has
> > the potential to point to other things that need changes, as
> > a lot more drivers will be selected.
> > 
> > Anyway, after a quick look at include/linux/isapnp.h, I suspect
> > that this can work.
> > 
> > I'll run some tests here.
> 
> Yes, removing the ISAPNP dependency if COMPILE_TEST is trivial too.
> 
> Just sent a separate patch to be applied after this one with such
> removal.
> 
> I opted to make it as a separate patch as, if the drivers there
> fail to build on some weird architecture, we won't need to discard
> this one.

OK, then feel free to take my ack:
  Acked-by: Takashi Iwai <tiwai@suse.de>

But still it'd be better to mention about the CONFIG_ISA change, even
though it'll be removed again after the ISAPNP COMIPLE_TEST patch.


thanks,

Takashi

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
  2018-04-20 12:58         ` Takashi Iwai
@ 2018-04-20 13:09           ` Mauro Carvalho Chehab
  -1 siblings, 0 replies; 28+ messages in thread
From: Mauro Carvalho Chehab @ 2018-04-20 13:09 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Linux Media Mailing List, Mauro Carvalho Chehab

Em Fri, 20 Apr 2018 14:58:15 +0200
Takashi Iwai <tiwai@suse.de> escreveu:

> On Fri, 20 Apr 2018 14:51:29 +0200,
> Mauro Carvalho Chehab wrote:
> > 
> > Em Fri, 20 Apr 2018 14:37:46 +0200
> > Takashi Iwai <tiwai@suse.de> escreveu:
> >   
> > > On Fri, 20 Apr 2018 14:32:15 +0200,
> > > Mauro Carvalho Chehab wrote:  
> > > > 
> > > > All sound drivers that don't depend on PNP can be safelly
> > > > build with COMPILE_TEST, as ISA provides function stubs to
> > > > be used for such purposes.
> > > > 
> > > > As a side effect, with this change, the radio-miropcm20
> > > > can now be built outside i386 with COMPILE_TEST.
> > > > 
> > > > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> > > > ---
> > > >  drivers/media/radio/Kconfig | 3 ++-
> > > >  sound/isa/Kconfig           | 9 +++++----
> > > >  2 files changed, 7 insertions(+), 5 deletions(-)
> > > > 
> > > > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
> > > > index d363726e9eb1..8fa403c7149e 100644
> > > > --- a/drivers/media/radio/Kconfig
> > > > +++ b/drivers/media/radio/Kconfig
> > > > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
> > > >  
> > > >  config RADIO_MIROPCM20
> > > >  	tristate "miroSOUND PCM20 radio"
> > > > -	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
> > > > +	depends on ISA || COMPILE_TEST
> > > > +	depends on ISA_DMA_API && VIDEO_V4L2 && SND
> > > >  	select SND_ISA
> > > >  	select SND_MIRO
> > > >  	---help---
> > > > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
> > > > index cb54d9c0a77f..d2a6cdd0395c 100644
> > > > --- a/sound/isa/Kconfig
> > > > +++ b/sound/isa/Kconfig
> > > > @@ -20,7 +20,8 @@ config SND_SB16_DSP
> > > >  
> > > >  menuconfig SND_ISA
> > > >  	bool "ISA sound devices"
> > > > -	depends on ISA && ISA_DMA_API
> > > > +	depends on ISA || COMPILE_TEST
> > > > +	depends on ISA_DMA_API
> > > >  	default y
> > > >  	help
> > > >  	  Support for sound devices connected via the ISA bus.
> > > > @@ -38,7 +39,7 @@ config SND_ADLIB
> > > >  
> > > >  config SND_AD1816A
> > > >  	tristate "Analog Devices SoundPort AD1816A"
> > > > -	depends on PNP
> > > > +	depends on PNP && ISA
> > > >  	select ISAPNP
> > > >  	select SND_OPL3_LIB
> > > >  	select SND_MPU401_UART    
> > > 
> > > Just from curiosity: what's the reason for this explicit CONFIG_ISA
> > > dependency?  What error did you get?  
> > 
> > Kconfig complains with "select ISAPNP":
> > 
> > WARNING: unmet direct dependencies detected for ISAPNP
> >   Depends on [n]: PNP [=y] && ISA [=n]
> >   Selected by [y]:
> >   - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && PNP [=y]
> > 
> > Because it is declared as:
> > 
> > config ISAPNP
> > 	bool "ISA Plug and Play support"
> >         depends on ISA  
> 
> I see.  Then it'd be better to put this explanations in the changelog
> as well.

Added. See enclosed.

> 
> > I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST,
> > but I suspect that would touch on yet another subsystem and has
> > the potential to point to other things that need changes, as
> > a lot more drivers will be selected.
> > 
> > Anyway, after a quick look at include/linux/isapnp.h, I suspect
> > that this can work.
> > 
> > I'll run some tests here.  
> 
> At least a dumb stub is there, so let's hope we can widen the test
> coverage :)

Yes, that's the idea :-)

Right now, for every patch I receive, I build media drivers for i386
(I just made all of them build on i386), but I'm considering doing such
builds on x86_64 instead, as it also enables compat32 code.

Thanks,
Mauro

[PATCH v2] sound, media: allow building ISA drivers it with COMPILE_TEST

All sound drivers that don't depend on PNP can be safelly
build with COMPILE_TEST, as ISA provides function stubs to
be used for such purposes.

As a side effect, with this change, the radio-miropcm20
can now be built outside i386 with COMPILE_TEST.

It should be noticed that ISAPNP currently depends on ISA.
So, on drivers that depend on it, we need to add an
explicit dependency on ISA, at least until another patch
removes it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

---

v2: only patch description changed, with the addition of a note
about ISA explicit dependency on 3 drivers.


diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
index d363726e9eb1..8fa403c7149e 100644
--- a/drivers/media/radio/Kconfig
+++ b/drivers/media/radio/Kconfig
@@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
 
 config RADIO_MIROPCM20
 	tristate "miroSOUND PCM20 radio"
-	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
+	depends on ISA || COMPILE_TEST
+	depends on ISA_DMA_API && VIDEO_V4L2 && SND
 	select SND_ISA
 	select SND_MIRO
 	---help---
diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
index cb54d9c0a77f..d2a6cdd0395c 100644
--- a/sound/isa/Kconfig
+++ b/sound/isa/Kconfig
@@ -20,7 +20,8 @@ config SND_SB16_DSP
 
 menuconfig SND_ISA
 	bool "ISA sound devices"
-	depends on ISA && ISA_DMA_API
+	depends on ISA || COMPILE_TEST
+	depends on ISA_DMA_API
 	default y
 	help
 	  Support for sound devices connected via the ISA bus.
@@ -38,7 +39,7 @@ config SND_ADLIB
 
 config SND_AD1816A
 	tristate "Analog Devices SoundPort AD1816A"
-	depends on PNP
+	depends on PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
@@ -66,7 +67,7 @@ config SND_AD1848
 
 config SND_ALS100
 	tristate "Diamond Tech. DT-019x and Avance Logic ALSxxx"
-	depends on PNP
+	depends on PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
@@ -107,7 +108,7 @@ config SND_AZT2316
 
 config SND_AZT2320
 	tristate "Aztech Systems AZT2320"
-	depends on PNP
+	depends on PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
@ 2018-04-20 13:09           ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 28+ messages in thread
From: Mauro Carvalho Chehab @ 2018-04-20 13:09 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, Mauro Carvalho Chehab, Jaroslav Kysela,
	Linux Media Mailing List

Em Fri, 20 Apr 2018 14:58:15 +0200
Takashi Iwai <tiwai@suse.de> escreveu:

> On Fri, 20 Apr 2018 14:51:29 +0200,
> Mauro Carvalho Chehab wrote:
> > 
> > Em Fri, 20 Apr 2018 14:37:46 +0200
> > Takashi Iwai <tiwai@suse.de> escreveu:
> >   
> > > On Fri, 20 Apr 2018 14:32:15 +0200,
> > > Mauro Carvalho Chehab wrote:  
> > > > 
> > > > All sound drivers that don't depend on PNP can be safelly
> > > > build with COMPILE_TEST, as ISA provides function stubs to
> > > > be used for such purposes.
> > > > 
> > > > As a side effect, with this change, the radio-miropcm20
> > > > can now be built outside i386 with COMPILE_TEST.
> > > > 
> > > > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> > > > ---
> > > >  drivers/media/radio/Kconfig | 3 ++-
> > > >  sound/isa/Kconfig           | 9 +++++----
> > > >  2 files changed, 7 insertions(+), 5 deletions(-)
> > > > 
> > > > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
> > > > index d363726e9eb1..8fa403c7149e 100644
> > > > --- a/drivers/media/radio/Kconfig
> > > > +++ b/drivers/media/radio/Kconfig
> > > > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
> > > >  
> > > >  config RADIO_MIROPCM20
> > > >  	tristate "miroSOUND PCM20 radio"
> > > > -	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
> > > > +	depends on ISA || COMPILE_TEST
> > > > +	depends on ISA_DMA_API && VIDEO_V4L2 && SND
> > > >  	select SND_ISA
> > > >  	select SND_MIRO
> > > >  	---help---
> > > > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
> > > > index cb54d9c0a77f..d2a6cdd0395c 100644
> > > > --- a/sound/isa/Kconfig
> > > > +++ b/sound/isa/Kconfig
> > > > @@ -20,7 +20,8 @@ config SND_SB16_DSP
> > > >  
> > > >  menuconfig SND_ISA
> > > >  	bool "ISA sound devices"
> > > > -	depends on ISA && ISA_DMA_API
> > > > +	depends on ISA || COMPILE_TEST
> > > > +	depends on ISA_DMA_API
> > > >  	default y
> > > >  	help
> > > >  	  Support for sound devices connected via the ISA bus.
> > > > @@ -38,7 +39,7 @@ config SND_ADLIB
> > > >  
> > > >  config SND_AD1816A
> > > >  	tristate "Analog Devices SoundPort AD1816A"
> > > > -	depends on PNP
> > > > +	depends on PNP && ISA
> > > >  	select ISAPNP
> > > >  	select SND_OPL3_LIB
> > > >  	select SND_MPU401_UART    
> > > 
> > > Just from curiosity: what's the reason for this explicit CONFIG_ISA
> > > dependency?  What error did you get?  
> > 
> > Kconfig complains with "select ISAPNP":
> > 
> > WARNING: unmet direct dependencies detected for ISAPNP
> >   Depends on [n]: PNP [=y] && ISA [=n]
> >   Selected by [y]:
> >   - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && PNP [=y]
> > 
> > Because it is declared as:
> > 
> > config ISAPNP
> > 	bool "ISA Plug and Play support"
> >         depends on ISA  
> 
> I see.  Then it'd be better to put this explanations in the changelog
> as well.

Added. See enclosed.

> 
> > I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST,
> > but I suspect that would touch on yet another subsystem and has
> > the potential to point to other things that need changes, as
> > a lot more drivers will be selected.
> > 
> > Anyway, after a quick look at include/linux/isapnp.h, I suspect
> > that this can work.
> > 
> > I'll run some tests here.  
> 
> At least a dumb stub is there, so let's hope we can widen the test
> coverage :)

Yes, that's the idea :-)

Right now, for every patch I receive, I build media drivers for i386
(I just made all of them build on i386), but I'm considering doing such
builds on x86_64 instead, as it also enables compat32 code.

Thanks,
Mauro

[PATCH v2] sound, media: allow building ISA drivers it with COMPILE_TEST

All sound drivers that don't depend on PNP can be safelly
build with COMPILE_TEST, as ISA provides function stubs to
be used for such purposes.

As a side effect, with this change, the radio-miropcm20
can now be built outside i386 with COMPILE_TEST.

It should be noticed that ISAPNP currently depends on ISA.
So, on drivers that depend on it, we need to add an
explicit dependency on ISA, at least until another patch
removes it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

---

v2: only patch description changed, with the addition of a note
about ISA explicit dependency on 3 drivers.


diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
index d363726e9eb1..8fa403c7149e 100644
--- a/drivers/media/radio/Kconfig
+++ b/drivers/media/radio/Kconfig
@@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE
 
 config RADIO_MIROPCM20
 	tristate "miroSOUND PCM20 radio"
-	depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND
+	depends on ISA || COMPILE_TEST
+	depends on ISA_DMA_API && VIDEO_V4L2 && SND
 	select SND_ISA
 	select SND_MIRO
 	---help---
diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
index cb54d9c0a77f..d2a6cdd0395c 100644
--- a/sound/isa/Kconfig
+++ b/sound/isa/Kconfig
@@ -20,7 +20,8 @@ config SND_SB16_DSP
 
 menuconfig SND_ISA
 	bool "ISA sound devices"
-	depends on ISA && ISA_DMA_API
+	depends on ISA || COMPILE_TEST
+	depends on ISA_DMA_API
 	default y
 	help
 	  Support for sound devices connected via the ISA bus.
@@ -38,7 +39,7 @@ config SND_ADLIB
 
 config SND_AD1816A
 	tristate "Analog Devices SoundPort AD1816A"
-	depends on PNP
+	depends on PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
@@ -66,7 +67,7 @@ config SND_AD1848
 
 config SND_ALS100
 	tristate "Diamond Tech. DT-019x and Avance Logic ALSxxx"
-	depends on PNP
+	depends on PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
@@ -107,7 +108,7 @@ config SND_AZT2316
 
 config SND_AZT2320
 	tristate "Aztech Systems AZT2320"
-	depends on PNP
+	depends on PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART

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

* Re: [PATCH 1/4] media: radio: allow building ISA drivers with COMPILE_TEST
  2018-04-20 12:32 ` [PATCH 1/4] media: radio: allow building ISA drivers with COMPILE_TEST Mauro Carvalho Chehab
@ 2018-04-22 15:41   ` kbuild test robot
  0 siblings, 0 replies; 28+ messages in thread
From: kbuild test robot @ 2018-04-22 15:41 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: kbuild-all, Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab

Hi Mauro,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v4.17-rc1 next-20180420]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/media-radio-allow-building-ISA-drivers-with-COMPILE_TEST/20180422-180508
base:   git://linuxtv.org/media_tree.git master
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/media/radio/radio-isa.c:108:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-isa.c:108:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-isa.c:108:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-isa.c:108:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-isa.c:108:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-isa.c:108:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-isa.c:108:16: sparse: expression using sizeof(void)
--
>> drivers/media/radio/radio-sf16fmi.c:123:24: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-sf16fmi.c:123:24: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-sf16fmi.c:123:24: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-sf16fmi.c:123:24: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-sf16fmi.c:123:24: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-sf16fmi.c:123:24: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-sf16fmi.c:123:24: sparse: expression using sizeof(void)
--
>> drivers/media/radio/radio-sf16fmr2.c:169:25: sparse: expression using sizeof(void)
   drivers/media/radio/radio-sf16fmr2.c:171:24: sparse: expression using sizeof(void)
--
>> drivers/media/radio/radio-cadet.c:219:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-cadet.c:219:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-cadet.c:219:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-cadet.c:219:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-cadet.c:219:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-cadet.c:219:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-cadet.c:219:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-cadet.c:219:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-cadet.c:219:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-cadet.c:219:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-cadet.c:219:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-cadet.c:219:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-cadet.c:219:16: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-cadet.c:219:16: sparse: expression using sizeof(void)

vim +108 drivers/media/radio/radio-isa.c

137c579c Hans Verkuil 2012-02-03   98  
137c579c Hans Verkuil 2012-02-03   99  static int radio_isa_s_frequency(struct file *file, void *priv,
b530a447 Hans Verkuil 2013-03-19  100  				const struct v4l2_frequency *f)
137c579c Hans Verkuil 2012-02-03  101  {
137c579c Hans Verkuil 2012-02-03  102  	struct radio_isa_card *isa = video_drvdata(file);
b530a447 Hans Verkuil 2013-03-19  103  	u32 freq = f->frequency;
137c579c Hans Verkuil 2012-02-03  104  	int res;
137c579c Hans Verkuil 2012-02-03  105  
137c579c Hans Verkuil 2012-02-03  106  	if (f->tuner != 0 || f->type != V4L2_TUNER_RADIO)
137c579c Hans Verkuil 2012-02-03  107  		return -EINVAL;
b530a447 Hans Verkuil 2013-03-19 @108  	freq = clamp(freq, FREQ_LOW, FREQ_HIGH);
b530a447 Hans Verkuil 2013-03-19  109  	res = isa->drv->ops->s_frequency(isa, freq);
137c579c Hans Verkuil 2012-02-03  110  	if (res == 0)
b530a447 Hans Verkuil 2013-03-19  111  		isa->freq = freq;
137c579c Hans Verkuil 2012-02-03  112  	return res;
137c579c Hans Verkuil 2012-02-03  113  }
137c579c Hans Verkuil 2012-02-03  114  

:::::: The code at line 108 was first introduced by commit
:::::: b530a447bb588fdf43fdf4eb909e4ee1921d47ac [media] v4l2: add const to argument of write-only s_frequency ioctl

:::::: TO: Hans Verkuil <hans.verkuil@cisco.com>
:::::: CC: Mauro Carvalho Chehab <mchehab@redhat.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* [RFC PATCH] sound, media: array_find() can be static
  2018-04-20 12:32   ` Mauro Carvalho Chehab
@ 2018-04-22 18:05     ` kbuild test robot
  -1 siblings, 0 replies; 28+ messages in thread
From: kbuild test robot @ 2018-04-22 18:05 UTC (permalink / raw)
  Cc: alsa-devel, Takashi Iwai, Mauro Carvalho Chehab, kbuild-all,
	Mauro Carvalho Chehab, Linux Media Mailing List


Fixes: dbd775375e7d ("sound, media: allow building ISA drivers it with COMPILE_TEST")
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
 cmi8328.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/isa/cmi8328.c b/sound/isa/cmi8328.c
index d09e456..de6ef1b 100644
--- a/sound/isa/cmi8328.c
+++ b/sound/isa/cmi8328.c
@@ -192,7 +192,7 @@ static int snd_cmi8328_mixer(struct snd_wss *chip)
 }
 
 /* find index of an item in "-1"-ended array */
-int array_find(int array[], int item)
+static int array_find(int array[], int item)
 {
 	int i;
 
@@ -203,7 +203,7 @@ int array_find(int array[], int item)
 	return -1;
 }
 /* the same for long */
-int array_find_l(long array[], long item)
+static int array_find_l(long array[], long item)
 {
 	int i;
 

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
  2018-04-20 12:32   ` Mauro Carvalho Chehab
@ 2018-04-22 18:05     ` kbuild test robot
  -1 siblings, 0 replies; 28+ messages in thread
From: kbuild test robot @ 2018-04-22 18:05 UTC (permalink / raw)
  Cc: alsa-devel, Takashi Iwai, Mauro Carvalho Chehab, kbuild-all,
	Mauro Carvalho Chehab, Linux Media Mailing List

Hi Mauro,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v4.17-rc1 next-20180420]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/media-radio-allow-building-ISA-drivers-with-COMPILE_TEST/20180422-180508
base:   git://linuxtv.org/media_tree.git master
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> sound/isa/wss/wss_lib.c:551:14: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/wss/wss_lib.c:552:14: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/wss/wss_lib.c:553:14: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/wss/wss_lib.c:554:14: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/wss/wss_lib.c:555:14: sparse: restricted snd_pcm_format_t degrades to integer
>> sound/isa/wss/wss_lib.c:1003:58: sparse: incorrect type in argument 2 (different base types) @@    expected int [signed] format @@    got restricted sndint [signed] format @@
   sound/isa/wss/wss_lib.c:1003:58:    expected int [signed] format
   sound/isa/wss/wss_lib.c:1003:58:    got restricted snd_pcm_format_t
   sound/isa/wss/wss_lib.c:1046:58: sparse: incorrect type in argument 2 (different base types) @@    expected int [signed] format @@    got restricted sndint [signed] format @@
   sound/isa/wss/wss_lib.c:1046:58:    expected int [signed] format
   sound/isa/wss/wss_lib.c:1046:58:    got restricted snd_pcm_format_t
--
>> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using sizeof(void)
--
>> sound/isa/cmi8328.c:195:5: sparse: symbol 'array_find' was not declared. Should it be static?
>> sound/isa/cmi8328.c:206:5: sparse: symbol 'array_find_l' was not declared. Should it be static?
--
>> sound/isa/sscape.c:477:23: sparse: expression using sizeof(void)
>> sound/isa/sscape.c:477:23: sparse: expression using sizeof(void)
--
>> sound/isa/msnd/msnd_pinnacle.c:85:32: sparse: incorrect type in assignment (different base types) @@    expected int [signed] play_sample_size @@    got restricted snd_pcm_format_int [signed] play_sample_size @@
   sound/isa/msnd/msnd_pinnacle.c:85:32:    expected int [signed] play_sample_size
   sound/isa/msnd/msnd_pinnacle.c:85:32:    got restricted snd_pcm_format_t [usertype] <noident>
>> sound/isa/msnd/msnd_pinnacle.c:88:35: sparse: incorrect type in assignment (different base types) @@    expected int [signed] capture_sample_size @@    got restricted snd_pcm_format_int [signed] capture_sample_size @@
   sound/isa/msnd/msnd_pinnacle.c:88:35:    expected int [signed] capture_sample_size
   sound/isa/msnd/msnd_pinnacle.c:88:35:    got restricted snd_pcm_format_t [usertype] <noident>
>> sound/isa/msnd/msnd_pinnacle.c:172:45: sparse: incorrect type in initializer (different address spaces) @@    expected void *pwDSPQData @@    got void [noderef] <avoid *pwDSPQData @@
   sound/isa/msnd/msnd_pinnacle.c:172:45:    expected void *pwDSPQData
   sound/isa/msnd/msnd_pinnacle.c:172:45:    got void [noderef] <asn:2>*
>> sound/isa/msnd/msnd_pinnacle.c:185:62: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd_pinnacle.c:185:62:    expected void const volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd_pinnacle.c:185:62:    got void *
>> sound/isa/msnd/msnd_pinnacle.c:344:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:344:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:344:33:    got void [noderef] <asn:2>*DAPQ
   sound/isa/msnd/msnd_pinnacle.c:348:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:348:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:348:33:    got void [noderef] <asn:2>*DARQ
   sound/isa/msnd/msnd_pinnacle.c:352:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:352:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:352:33:    got void [noderef] <asn:2>*MODQ
   sound/isa/msnd/msnd_pinnacle.c:356:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:356:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:356:33:    got void [noderef] <asn:2>*MIDQ
   sound/isa/msnd/msnd_pinnacle.c:360:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:360:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:360:33:    got void [noderef] <asn:2>*DSPQ
>> sound/isa/msnd/msnd_pinnacle.c:813:1: sparse: Using plain integer as NULL pointer
--
>> sound/isa/msnd/msnd.c:59:43: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:59:43:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:59:43:    got void *
   sound/isa/msnd/msnd.c:60:47: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:60:47:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:60:47:    got void *
   sound/isa/msnd/msnd.c:61:24: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:61:24:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:61:24:    got void *
   sound/isa/msnd/msnd.c:62:24: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:62:24:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:62:24:    got void *
>> sound/isa/msnd/msnd.c:165:40: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd.c:165:40:    expected void *base
   sound/isa/msnd/msnd.c:165:40:    got void [noderef] <asn:2>*DSPQ
>> sound/isa/msnd/msnd.c:274:49: sparse: incorrect type in initializer (different address spaces) @@    expected void *pDAQ @@    got void [noderef] <avoid *pDAQ @@
   sound/isa/msnd/msnd.c:274:49:    expected void *pDAQ
   sound/isa/msnd/msnd.c:274:49:    got void [noderef] <asn:2>*
>> sound/isa/msnd/msnd.c:277:27: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:277:27:    expected void const volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:277:27:    got void *pDAQ
   sound/isa/msnd/msnd.c:279:47: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:279:47:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:279:47:    got void *pDAQ
>> sound/isa/msnd/msnd.c:327:22: sparse: incorrect type in assignment (different address spaces) @@    expected void *DAQD @@    got void [noderef] <avoid *DAQD @@
   sound/isa/msnd/msnd.c:327:22:    expected void *DAQD
   sound/isa/msnd/msnd.c:327:22:    got void [noderef] <asn:2>*
   sound/isa/msnd/msnd.c:331:54: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:331:54:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:331:54:    got void *
   sound/isa/msnd/msnd.c:337:40: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:337:40:    expected void const volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:337:40:    got void *
   sound/isa/msnd/msnd.c:340:60: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:340:60:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:340:60:    got void *
   sound/isa/msnd/msnd.c:373:42: sparse: incorrect type in initializer (different address spaces) @@    expected void *pDAQ @@    got void [noderef] <avoid *pDAQ @@
   sound/isa/msnd/msnd.c:373:42:    expected void *pDAQ
   sound/isa/msnd/msnd.c:373:42:    got void [noderef] <asn:2>*
   sound/isa/msnd/msnd.c:385:30: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:385:30:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:385:30:    got void *
   sound/isa/msnd/msnd.c:386:32: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:386:32:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:386:32:    got void *
   sound/isa/msnd/msnd.c:387:32: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:387:32:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:387:32:    got void *
   sound/isa/msnd/msnd.c:388:53: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:388:53:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:388:53:    got void *
   sound/isa/msnd/msnd.c:389:50: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:389:50:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:389:50:    got void *
   sound/isa/msnd/msnd.c:390:53: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:390:53:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:390:53:    got void *
   sound/isa/msnd/msnd.c:391:57: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:391:57:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:391:57:    got void *
   sound/isa/msnd/msnd.c:392:32: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:392:32:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:392:32:    got void *
>> sound/isa/msnd/msnd.c:424:14: sparse: incorrect type in assignment (different address spaces) @@    expected void *pDAQ @@    got void [noderef] <avoid *pDAQ @@
   sound/isa/msnd/msnd.c:424:14:    expected void *pDAQ
   sound/isa/msnd/msnd.c:424:14:    got void [noderef] <asn:2>*
   sound/isa/msnd/msnd.c:429:58: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:429:58:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:429:58:    got void *
   sound/isa/msnd/msnd.c:430:40: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:430:40:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:430:40:    got void *
   sound/isa/msnd/msnd.c:431:32: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:431:32:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:431:32:    got void *
   sound/isa/msnd/msnd.c:432:56: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:432:56:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:432:56:    got void *
   sound/isa/msnd/msnd.c:433:53: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:433:53:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:433:53:    got void *
   sound/isa/msnd/msnd.c:434:56: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:434:56:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:434:56:    got void *
   sound/isa/msnd/msnd.c:435:59: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:435:59:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:435:59:    got void *
   sound/isa/msnd/msnd.c:436:32: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:436:32:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:436:32:    got void *
>> sound/isa/msnd/msnd.c:488:27: sparse: incorrect type in assignment (different address spaces) @@    expected unsigned char *dma_area @@    got void [nounsigned char *dma_area @@
   sound/isa/msnd/msnd.c:488:27:    expected unsigned char *dma_area
   sound/isa/msnd/msnd.c:488:27:    got void [noderef] <asn:2>*mappedbase
   sound/isa/msnd/msnd.c:511:42: sparse: incorrect type in initializer (different address spaces) @@    expected void *pDAQ @@    got void [noderef] <avoid *pDAQ @@
   sound/isa/msnd/msnd.c:511:42:    expected void *pDAQ
   sound/isa/msnd/msnd.c:511:42:    got void [noderef] <asn:2>*
   sound/isa/msnd/msnd.c:518:53: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:518:53:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:518:53:    got void *
   sound/isa/msnd/msnd.c:519:50: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:519:50:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:519:50:    got void *
   sound/isa/msnd/msnd.c:520:53: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:520:53:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:520:53:    got void *
   sound/isa/msnd/msnd.c:592:27: sparse: incorrect type in assignment (different address spaces) @@    expected unsigned char *dma_area @@    got void [nounsigned char *dma_area @@
   sound/isa/msnd/msnd.c:592:27:    expected unsigned char *dma_area
   sound/isa/msnd/msnd.c:592:27:    got void [noderef] <asn:2>*
   sound/isa/msnd/msnd.c:657:50: sparse: incorrect type in initializer (different address spaces) @@    expected void *pDAQ @@    got void [noderef] <avoid *pDAQ @@
   sound/isa/msnd/msnd.c:657:50:    expected void *pDAQ
   sound/isa/msnd/msnd.c:657:50:    got void [noderef] <asn:2>*
   sound/isa/msnd/msnd.c:664:56: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:664:56:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:664:56:    got void *
   sound/isa/msnd/msnd.c:665:53: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:665:53:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:665:53:    got void *
   sound/isa/msnd/msnd.c:666:56: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:666:56:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:666:56:    got void *
--
>> sound/isa/msnd/msnd_midi.c:122:49: sparse: incorrect type in initializer (different address spaces) @@    expected void *pwMIDQData @@    got void [noderef] <avoid *pwMIDQData @@
   sound/isa/msnd/msnd_midi.c:122:49:    expected void *pwMIDQData
   sound/isa/msnd/msnd_midi.c:122:49:    got void [noderef] <asn:2>*
>> sound/isa/msnd/msnd_midi.c:132:54: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd_midi.c:132:54:    expected void const volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd_midi.c:132:54:    got void *
--
>> sound/isa/msnd/msnd_pinnacle.c:85:32: sparse: incorrect type in assignment (different base types) @@    expected int [signed] play_sample_size @@    got restricted snd_pcm_format_int [signed] play_sample_size @@
   sound/isa/msnd/msnd_pinnacle.c:85:32:    expected int [signed] play_sample_size
   sound/isa/msnd/msnd_pinnacle.c:85:32:    got restricted snd_pcm_format_t [usertype] <noident>
>> sound/isa/msnd/msnd_pinnacle.c:88:35: sparse: incorrect type in assignment (different base types) @@    expected int [signed] capture_sample_size @@    got restricted snd_pcm_format_int [signed] capture_sample_size @@
   sound/isa/msnd/msnd_pinnacle.c:88:35:    expected int [signed] capture_sample_size
   sound/isa/msnd/msnd_pinnacle.c:88:35:    got restricted snd_pcm_format_t [usertype] <noident>
>> sound/isa/msnd/msnd_pinnacle.c:172:45: sparse: incorrect type in initializer (different address spaces) @@    expected void *pwDSPQData @@    got void [noderef] <avoid *pwDSPQData @@
   sound/isa/msnd/msnd_pinnacle.c:172:45:    expected void *pwDSPQData
   sound/isa/msnd/msnd_pinnacle.c:172:45:    got void [noderef] <asn:2>*
>> sound/isa/msnd/msnd_pinnacle.c:185:62: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd_pinnacle.c:185:62:    expected void const volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd_pinnacle.c:185:62:    got void *
>> sound/isa/msnd/msnd_pinnacle.c:344:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:344:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:344:33:    got void [noderef] <asn:2>*DAPQ
   sound/isa/msnd/msnd_pinnacle.c:348:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:348:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:348:33:    got void [noderef] <asn:2>*DARQ
   sound/isa/msnd/msnd_pinnacle.c:352:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:352:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:352:33:    got void [noderef] <asn:2>*MODQ
   sound/isa/msnd/msnd_pinnacle.c:356:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:356:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:356:33:    got void [noderef] <asn:2>*MIDQ
   sound/isa/msnd/msnd_pinnacle.c:360:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:360:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:360:33:    got void [noderef] <asn:2>*DSPQ
--
>> sound/isa/sb/emu8000_pcm.c:541:9: sparse: cast removes address space of expression
--
>> sound/isa/sb/sb16_csp.c:330:14: sparse: cast to restricted __le32
   sound/isa/sb/sb16_csp.c:335:31: sparse: cast to restricted __le32
>> sound/isa/sb/sb16_csp.c:358:35: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:384:73: sparse: cast to restricted __le32
   sound/isa/sb/sb16_csp.c:388:45: sparse: cast to restricted __le32
   sound/isa/sb/sb16_csp.c:400:52: sparse: cast to restricted __le32
   sound/isa/sb/sb16_csp.c:407:35: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:408:33: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:410:37: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:438:33: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:443:43: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:444:40: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:445:40: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:345:49: sparse: cast to restricted __le32
>> sound/isa/sb/sb16_csp.c:743:22: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/sb/sb16_csp.c:748:22: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/sb/sb16_csp.c:753:22: sparse: restricted snd_pcm_format_t degrades to integer
--
>> sound/isa/sb/sb16_main.c:61:44: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/sb/sb16_main.c:69:50: sparse: restricted snd_pcm_format_t degrades to integer
>> sound/isa/sb/sb16_main.c:80:63: sparse: incorrect type in argument 2 (different base types) @@    expected int [signed] pcm_sfmt @@    got restricted snd_pcm_format_int [signed] pcm_sfmt @@
   sound/isa/sb/sb16_main.c:80:63:    expected int [signed] pcm_sfmt
   sound/isa/sb/sb16_main.c:80:63:    got restricted snd_pcm_format_t [usertype] format
   sound/isa/sb/sb16_main.c:109:44: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/sb/sb16_main.c:118:63: sparse: incorrect type in argument 2 (different base types) @@    expected int [signed] pcm_sfmt @@    got restricted snd_pcm_format_int [signed] pcm_sfmt @@
   sound/isa/sb/sb16_main.c:118:63:    expected int [signed] pcm_sfmt
   sound/isa/sb/sb16_main.c:118:63:    got restricted snd_pcm_format_t [usertype] format

Please review and possibly fold the followup patch.

vim +551 sound/isa/wss/wss_lib.c

^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  542  
7779f75f sound/isa/wss/wss_lib.c       Krzysztof Helt 2008-07-31  543  static unsigned char snd_wss_get_format(struct snd_wss *chip,
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  544  					int format,
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  545  					int channels)
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  546  {
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  547  	unsigned char rformat;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  548  
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  549  	rformat = CS4231_LINEAR_8;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  550  	switch (format) {
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16 @551  	case SNDRV_PCM_FORMAT_MU_LAW:	rformat = CS4231_ULAW_8; break;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  552  	case SNDRV_PCM_FORMAT_A_LAW:	rformat = CS4231_ALAW_8; break;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  553  	case SNDRV_PCM_FORMAT_S16_LE:	rformat = CS4231_LINEAR_16; break;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  554  	case SNDRV_PCM_FORMAT_S16_BE:	rformat = CS4231_LINEAR_16_BIG; break;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  555  	case SNDRV_PCM_FORMAT_IMA_ADPCM:	rformat = CS4231_ADPCM_16; break;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  556  	}
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  557  	if (channels > 1)
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  558  		rformat |= CS4231_STEREO;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  559  #if 0
76d498e4 sound/isa/wss/wss_lib.c       Takashi Iwai   2009-02-05  560  	snd_printk(KERN_DEBUG "get_format: 0x%x (mode=0x%x)\n", format, mode);
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  561  #endif
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  562  	return rformat;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  563  }
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  564  

:::::: The code at line 551 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* [RFC PATCH] sound, media: array_find() can be static
@ 2018-04-22 18:05     ` kbuild test robot
  0 siblings, 0 replies; 28+ messages in thread
From: kbuild test robot @ 2018-04-22 18:05 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: kbuild-all, Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Jaroslav Kysela, Takashi Iwai, alsa-devel


Fixes: dbd775375e7d ("sound, media: allow building ISA drivers it with COMPILE_TEST")
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
 cmi8328.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/isa/cmi8328.c b/sound/isa/cmi8328.c
index d09e456..de6ef1b 100644
--- a/sound/isa/cmi8328.c
+++ b/sound/isa/cmi8328.c
@@ -192,7 +192,7 @@ static int snd_cmi8328_mixer(struct snd_wss *chip)
 }
 
 /* find index of an item in "-1"-ended array */
-int array_find(int array[], int item)
+static int array_find(int array[], int item)
 {
 	int i;
 
@@ -203,7 +203,7 @@ int array_find(int array[], int item)
 	return -1;
 }
 /* the same for long */
-int array_find_l(long array[], long item)
+static int array_find_l(long array[], long item)
 {
 	int i;
 

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
@ 2018-04-22 18:05     ` kbuild test robot
  0 siblings, 0 replies; 28+ messages in thread
From: kbuild test robot @ 2018-04-22 18:05 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: kbuild-all, Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Jaroslav Kysela, Takashi Iwai, alsa-devel

Hi Mauro,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v4.17-rc1 next-20180420]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/media-radio-allow-building-ISA-drivers-with-COMPILE_TEST/20180422-180508
base:   git://linuxtv.org/media_tree.git master
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> sound/isa/wss/wss_lib.c:551:14: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/wss/wss_lib.c:552:14: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/wss/wss_lib.c:553:14: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/wss/wss_lib.c:554:14: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/wss/wss_lib.c:555:14: sparse: restricted snd_pcm_format_t degrades to integer
>> sound/isa/wss/wss_lib.c:1003:58: sparse: incorrect type in argument 2 (different base types) @@    expected int [signed] format @@    got restricted sndint [signed] format @@
   sound/isa/wss/wss_lib.c:1003:58:    expected int [signed] format
   sound/isa/wss/wss_lib.c:1003:58:    got restricted snd_pcm_format_t
   sound/isa/wss/wss_lib.c:1046:58: sparse: incorrect type in argument 2 (different base types) @@    expected int [signed] format @@    got restricted sndint [signed] format @@
   sound/isa/wss/wss_lib.c:1046:58:    expected int [signed] format
   sound/isa/wss/wss_lib.c:1046:58:    got restricted snd_pcm_format_t
--
>> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using sizeof(void)
>> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using sizeof(void)
--
>> sound/isa/cmi8328.c:195:5: sparse: symbol 'array_find' was not declared. Should it be static?
>> sound/isa/cmi8328.c:206:5: sparse: symbol 'array_find_l' was not declared. Should it be static?
--
>> sound/isa/sscape.c:477:23: sparse: expression using sizeof(void)
>> sound/isa/sscape.c:477:23: sparse: expression using sizeof(void)
--
>> sound/isa/msnd/msnd_pinnacle.c:85:32: sparse: incorrect type in assignment (different base types) @@    expected int [signed] play_sample_size @@    got restricted snd_pcm_format_int [signed] play_sample_size @@
   sound/isa/msnd/msnd_pinnacle.c:85:32:    expected int [signed] play_sample_size
   sound/isa/msnd/msnd_pinnacle.c:85:32:    got restricted snd_pcm_format_t [usertype] <noident>
>> sound/isa/msnd/msnd_pinnacle.c:88:35: sparse: incorrect type in assignment (different base types) @@    expected int [signed] capture_sample_size @@    got restricted snd_pcm_format_int [signed] capture_sample_size @@
   sound/isa/msnd/msnd_pinnacle.c:88:35:    expected int [signed] capture_sample_size
   sound/isa/msnd/msnd_pinnacle.c:88:35:    got restricted snd_pcm_format_t [usertype] <noident>
>> sound/isa/msnd/msnd_pinnacle.c:172:45: sparse: incorrect type in initializer (different address spaces) @@    expected void *pwDSPQData @@    got void [noderef] <avoid *pwDSPQData @@
   sound/isa/msnd/msnd_pinnacle.c:172:45:    expected void *pwDSPQData
   sound/isa/msnd/msnd_pinnacle.c:172:45:    got void [noderef] <asn:2>*
>> sound/isa/msnd/msnd_pinnacle.c:185:62: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd_pinnacle.c:185:62:    expected void const volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd_pinnacle.c:185:62:    got void *
>> sound/isa/msnd/msnd_pinnacle.c:344:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:344:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:344:33:    got void [noderef] <asn:2>*DAPQ
   sound/isa/msnd/msnd_pinnacle.c:348:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:348:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:348:33:    got void [noderef] <asn:2>*DARQ
   sound/isa/msnd/msnd_pinnacle.c:352:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:352:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:352:33:    got void [noderef] <asn:2>*MODQ
   sound/isa/msnd/msnd_pinnacle.c:356:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:356:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:356:33:    got void [noderef] <asn:2>*MIDQ
   sound/isa/msnd/msnd_pinnacle.c:360:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:360:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:360:33:    got void [noderef] <asn:2>*DSPQ
>> sound/isa/msnd/msnd_pinnacle.c:813:1: sparse: Using plain integer as NULL pointer
--
>> sound/isa/msnd/msnd.c:59:43: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:59:43:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:59:43:    got void *
   sound/isa/msnd/msnd.c:60:47: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:60:47:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:60:47:    got void *
   sound/isa/msnd/msnd.c:61:24: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:61:24:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:61:24:    got void *
   sound/isa/msnd/msnd.c:62:24: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:62:24:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:62:24:    got void *
>> sound/isa/msnd/msnd.c:165:40: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd.c:165:40:    expected void *base
   sound/isa/msnd/msnd.c:165:40:    got void [noderef] <asn:2>*DSPQ
>> sound/isa/msnd/msnd.c:274:49: sparse: incorrect type in initializer (different address spaces) @@    expected void *pDAQ @@    got void [noderef] <avoid *pDAQ @@
   sound/isa/msnd/msnd.c:274:49:    expected void *pDAQ
   sound/isa/msnd/msnd.c:274:49:    got void [noderef] <asn:2>*
>> sound/isa/msnd/msnd.c:277:27: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:277:27:    expected void const volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:277:27:    got void *pDAQ
   sound/isa/msnd/msnd.c:279:47: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:279:47:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:279:47:    got void *pDAQ
>> sound/isa/msnd/msnd.c:327:22: sparse: incorrect type in assignment (different address spaces) @@    expected void *DAQD @@    got void [noderef] <avoid *DAQD @@
   sound/isa/msnd/msnd.c:327:22:    expected void *DAQD
   sound/isa/msnd/msnd.c:327:22:    got void [noderef] <asn:2>*
   sound/isa/msnd/msnd.c:331:54: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:331:54:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:331:54:    got void *
   sound/isa/msnd/msnd.c:337:40: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:337:40:    expected void const volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:337:40:    got void *
   sound/isa/msnd/msnd.c:340:60: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:340:60:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:340:60:    got void *
   sound/isa/msnd/msnd.c:373:42: sparse: incorrect type in initializer (different address spaces) @@    expected void *pDAQ @@    got void [noderef] <avoid *pDAQ @@
   sound/isa/msnd/msnd.c:373:42:    expected void *pDAQ
   sound/isa/msnd/msnd.c:373:42:    got void [noderef] <asn:2>*
   sound/isa/msnd/msnd.c:385:30: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:385:30:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:385:30:    got void *
   sound/isa/msnd/msnd.c:386:32: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:386:32:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:386:32:    got void *
   sound/isa/msnd/msnd.c:387:32: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:387:32:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:387:32:    got void *
   sound/isa/msnd/msnd.c:388:53: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:388:53:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:388:53:    got void *
   sound/isa/msnd/msnd.c:389:50: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:389:50:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:389:50:    got void *
   sound/isa/msnd/msnd.c:390:53: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:390:53:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:390:53:    got void *
   sound/isa/msnd/msnd.c:391:57: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:391:57:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:391:57:    got void *
   sound/isa/msnd/msnd.c:392:32: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:392:32:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:392:32:    got void *
>> sound/isa/msnd/msnd.c:424:14: sparse: incorrect type in assignment (different address spaces) @@    expected void *pDAQ @@    got void [noderef] <avoid *pDAQ @@
   sound/isa/msnd/msnd.c:424:14:    expected void *pDAQ
   sound/isa/msnd/msnd.c:424:14:    got void [noderef] <asn:2>*
   sound/isa/msnd/msnd.c:429:58: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:429:58:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:429:58:    got void *
   sound/isa/msnd/msnd.c:430:40: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:430:40:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:430:40:    got void *
   sound/isa/msnd/msnd.c:431:32: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:431:32:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:431:32:    got void *
   sound/isa/msnd/msnd.c:432:56: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:432:56:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:432:56:    got void *
   sound/isa/msnd/msnd.c:433:53: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:433:53:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:433:53:    got void *
   sound/isa/msnd/msnd.c:434:56: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:434:56:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:434:56:    got void *
   sound/isa/msnd/msnd.c:435:59: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:435:59:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:435:59:    got void *
   sound/isa/msnd/msnd.c:436:32: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:436:32:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:436:32:    got void *
>> sound/isa/msnd/msnd.c:488:27: sparse: incorrect type in assignment (different address spaces) @@    expected unsigned char *dma_area @@    got void [nounsigned char *dma_area @@
   sound/isa/msnd/msnd.c:488:27:    expected unsigned char *dma_area
   sound/isa/msnd/msnd.c:488:27:    got void [noderef] <asn:2>*mappedbase
   sound/isa/msnd/msnd.c:511:42: sparse: incorrect type in initializer (different address spaces) @@    expected void *pDAQ @@    got void [noderef] <avoid *pDAQ @@
   sound/isa/msnd/msnd.c:511:42:    expected void *pDAQ
   sound/isa/msnd/msnd.c:511:42:    got void [noderef] <asn:2>*
   sound/isa/msnd/msnd.c:518:53: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:518:53:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:518:53:    got void *
   sound/isa/msnd/msnd.c:519:50: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:519:50:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:519:50:    got void *
   sound/isa/msnd/msnd.c:520:53: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:520:53:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:520:53:    got void *
   sound/isa/msnd/msnd.c:592:27: sparse: incorrect type in assignment (different address spaces) @@    expected unsigned char *dma_area @@    got void [nounsigned char *dma_area @@
   sound/isa/msnd/msnd.c:592:27:    expected unsigned char *dma_area
   sound/isa/msnd/msnd.c:592:27:    got void [noderef] <asn:2>*
   sound/isa/msnd/msnd.c:657:50: sparse: incorrect type in initializer (different address spaces) @@    expected void *pDAQ @@    got void [noderef] <avoid *pDAQ @@
   sound/isa/msnd/msnd.c:657:50:    expected void *pDAQ
   sound/isa/msnd/msnd.c:657:50:    got void [noderef] <asn:2>*
   sound/isa/msnd/msnd.c:664:56: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:664:56:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:664:56:    got void *
   sound/isa/msnd/msnd.c:665:53: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:665:53:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:665:53:    got void *
   sound/isa/msnd/msnd.c:666:56: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd.c:666:56:    expected void volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd.c:666:56:    got void *
--
>> sound/isa/msnd/msnd_midi.c:122:49: sparse: incorrect type in initializer (different address spaces) @@    expected void *pwMIDQData @@    got void [noderef] <avoid *pwMIDQData @@
   sound/isa/msnd/msnd_midi.c:122:49:    expected void *pwMIDQData
   sound/isa/msnd/msnd_midi.c:122:49:    got void [noderef] <asn:2>*
>> sound/isa/msnd/msnd_midi.c:132:54: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd_midi.c:132:54:    expected void const volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd_midi.c:132:54:    got void *
--
>> sound/isa/msnd/msnd_pinnacle.c:85:32: sparse: incorrect type in assignment (different base types) @@    expected int [signed] play_sample_size @@    got restricted snd_pcm_format_int [signed] play_sample_size @@
   sound/isa/msnd/msnd_pinnacle.c:85:32:    expected int [signed] play_sample_size
   sound/isa/msnd/msnd_pinnacle.c:85:32:    got restricted snd_pcm_format_t [usertype] <noident>
>> sound/isa/msnd/msnd_pinnacle.c:88:35: sparse: incorrect type in assignment (different base types) @@    expected int [signed] capture_sample_size @@    got restricted snd_pcm_format_int [signed] capture_sample_size @@
   sound/isa/msnd/msnd_pinnacle.c:88:35:    expected int [signed] capture_sample_size
   sound/isa/msnd/msnd_pinnacle.c:88:35:    got restricted snd_pcm_format_t [usertype] <noident>
>> sound/isa/msnd/msnd_pinnacle.c:172:45: sparse: incorrect type in initializer (different address spaces) @@    expected void *pwDSPQData @@    got void [noderef] <avoid *pwDSPQData @@
   sound/isa/msnd/msnd_pinnacle.c:172:45:    expected void *pwDSPQData
   sound/isa/msnd/msnd_pinnacle.c:172:45:    got void [noderef] <asn:2>*
>> sound/isa/msnd/msnd_pinnacle.c:185:62: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got sn:2>*addr @@
   sound/isa/msnd/msnd_pinnacle.c:185:62:    expected void const volatile [noderef] <asn:2>*addr
   sound/isa/msnd/msnd_pinnacle.c:185:62:    got void *
>> sound/isa/msnd/msnd_pinnacle.c:344:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:344:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:344:33:    got void [noderef] <asn:2>*DAPQ
   sound/isa/msnd/msnd_pinnacle.c:348:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:348:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:348:33:    got void [noderef] <asn:2>*DARQ
   sound/isa/msnd/msnd_pinnacle.c:352:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:352:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:352:33:    got void [noderef] <asn:2>*MODQ
   sound/isa/msnd/msnd_pinnacle.c:356:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:356:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:356:33:    got void [noderef] <asn:2>*MIDQ
   sound/isa/msnd/msnd_pinnacle.c:360:33: sparse: incorrect type in argument 1 (different address spaces) @@    expected void *base @@    got void [noderef] <avoid *base @@
   sound/isa/msnd/msnd_pinnacle.c:360:33:    expected void *base
   sound/isa/msnd/msnd_pinnacle.c:360:33:    got void [noderef] <asn:2>*DSPQ
--
>> sound/isa/sb/emu8000_pcm.c:541:9: sparse: cast removes address space of expression
--
>> sound/isa/sb/sb16_csp.c:330:14: sparse: cast to restricted __le32
   sound/isa/sb/sb16_csp.c:335:31: sparse: cast to restricted __le32
>> sound/isa/sb/sb16_csp.c:358:35: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:384:73: sparse: cast to restricted __le32
   sound/isa/sb/sb16_csp.c:388:45: sparse: cast to restricted __le32
   sound/isa/sb/sb16_csp.c:400:52: sparse: cast to restricted __le32
   sound/isa/sb/sb16_csp.c:407:35: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:408:33: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:410:37: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:438:33: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:443:43: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:444:40: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:445:40: sparse: cast to restricted __le16
   sound/isa/sb/sb16_csp.c:345:49: sparse: cast to restricted __le32
>> sound/isa/sb/sb16_csp.c:743:22: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/sb/sb16_csp.c:748:22: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/sb/sb16_csp.c:753:22: sparse: restricted snd_pcm_format_t degrades to integer
--
>> sound/isa/sb/sb16_main.c:61:44: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/sb/sb16_main.c:69:50: sparse: restricted snd_pcm_format_t degrades to integer
>> sound/isa/sb/sb16_main.c:80:63: sparse: incorrect type in argument 2 (different base types) @@    expected int [signed] pcm_sfmt @@    got restricted snd_pcm_format_int [signed] pcm_sfmt @@
   sound/isa/sb/sb16_main.c:80:63:    expected int [signed] pcm_sfmt
   sound/isa/sb/sb16_main.c:80:63:    got restricted snd_pcm_format_t [usertype] format
   sound/isa/sb/sb16_main.c:109:44: sparse: restricted snd_pcm_format_t degrades to integer
   sound/isa/sb/sb16_main.c:118:63: sparse: incorrect type in argument 2 (different base types) @@    expected int [signed] pcm_sfmt @@    got restricted snd_pcm_format_int [signed] pcm_sfmt @@
   sound/isa/sb/sb16_main.c:118:63:    expected int [signed] pcm_sfmt
   sound/isa/sb/sb16_main.c:118:63:    got restricted snd_pcm_format_t [usertype] format

Please review and possibly fold the followup patch.

vim +551 sound/isa/wss/wss_lib.c

^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  542  
7779f75f sound/isa/wss/wss_lib.c       Krzysztof Helt 2008-07-31  543  static unsigned char snd_wss_get_format(struct snd_wss *chip,
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  544  					int format,
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  545  					int channels)
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  546  {
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  547  	unsigned char rformat;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  548  
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  549  	rformat = CS4231_LINEAR_8;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  550  	switch (format) {
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16 @551  	case SNDRV_PCM_FORMAT_MU_LAW:	rformat = CS4231_ULAW_8; break;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  552  	case SNDRV_PCM_FORMAT_A_LAW:	rformat = CS4231_ALAW_8; break;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  553  	case SNDRV_PCM_FORMAT_S16_LE:	rformat = CS4231_LINEAR_16; break;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  554  	case SNDRV_PCM_FORMAT_S16_BE:	rformat = CS4231_LINEAR_16_BIG; break;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  555  	case SNDRV_PCM_FORMAT_IMA_ADPCM:	rformat = CS4231_ADPCM_16; break;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  556  	}
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  557  	if (channels > 1)
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  558  		rformat |= CS4231_STEREO;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  559  #if 0
76d498e4 sound/isa/wss/wss_lib.c       Takashi Iwai   2009-02-05  560  	snd_printk(KERN_DEBUG "get_format: 0x%x (mode=0x%x)\n", format, mode);
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  561  #endif
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  562  	return rformat;
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  563  }
^1da177e sound/isa/cs423x/cs4231_lib.c Linus Torvalds 2005-04-16  564  

:::::: The code at line 551 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
  2018-04-22 18:05     ` kbuild test robot
@ 2018-04-23  6:52       ` Takashi Iwai
  -1 siblings, 0 replies; 28+ messages in thread
From: Takashi Iwai @ 2018-04-23  6:52 UTC (permalink / raw)
  To: kbuild test robot
  Cc: alsa-devel, Mauro Carvalho Chehab, kbuild-all,
	Mauro Carvalho Chehab, Linux Media Mailing List

On Sun, 22 Apr 2018 20:05:03 +0200,
kbuild test robot wrote:
> 
> Hi Mauro,
> 
> I love your patch! Perhaps something to improve:
> 
> [auto build test WARNING on linuxtv-media/master]
> [also build test WARNING on v4.17-rc1 next-20180420]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/media-radio-allow-building-ISA-drivers-with-COMPILE_TEST/20180422-180508
> base:   git://linuxtv.org/media_tree.git master
> reproduce:
>         # apt-get install sparse
>         make ARCH=x86_64 allmodconfig
>         make C=1 CF=-D__CHECK_ENDIAN__
> 
> 
> sparse warnings: (new ones prefixed by >>)
> 
> >> sound/isa/wss/wss_lib.c:551:14: sparse: restricted snd_pcm_format_t degrades to integer
....

Oh, so many minor issues surfaced by COMPILE_TEST.
But these are all legacy ISA drivers, so I'll work on and take only safe
fixes that are obvious and trivial, if any.


thanks,

Takashi

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

* Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
@ 2018-04-23  6:52       ` Takashi Iwai
  0 siblings, 0 replies; 28+ messages in thread
From: Takashi Iwai @ 2018-04-23  6:52 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, alsa-devel, Mauro Carvalho Chehab, Jaroslav Kysela,
	Mauro Carvalho Chehab, Linux Media Mailing List

On Sun, 22 Apr 2018 20:05:03 +0200,
kbuild test robot wrote:
> 
> Hi Mauro,
> 
> I love your patch! Perhaps something to improve:
> 
> [auto build test WARNING on linuxtv-media/master]
> [also build test WARNING on v4.17-rc1 next-20180420]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/media-radio-allow-building-ISA-drivers-with-COMPILE_TEST/20180422-180508
> base:   git://linuxtv.org/media_tree.git master
> reproduce:
>         # apt-get install sparse
>         make ARCH=x86_64 allmodconfig
>         make C=1 CF=-D__CHECK_ENDIAN__
> 
> 
> sparse warnings: (new ones prefixed by >>)
> 
> >> sound/isa/wss/wss_lib.c:551:14: sparse: restricted snd_pcm_format_t degrades to integer
....

Oh, so many minor issues surfaced by COMPILE_TEST.
But these are all legacy ISA drivers, so I'll work on and take only safe
fixes that are obvious and trivial, if any.


thanks,

Takashi

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

* Re: [RFC PATCH] sound, media: array_find() can be static
  2018-04-22 18:05     ` kbuild test robot
@ 2018-04-23  6:52       ` Takashi Iwai
  -1 siblings, 0 replies; 28+ messages in thread
From: Takashi Iwai @ 2018-04-23  6:52 UTC (permalink / raw)
  To: kbuild test robot
  Cc: alsa-devel, Mauro Carvalho Chehab, kbuild-all,
	Mauro Carvalho Chehab, Linux Media Mailing List

On Sun, 22 Apr 2018 20:05:03 +0200,
kbuild test robot wrote:
> 
> 
> Fixes: dbd775375e7d ("sound, media: allow building ISA drivers it with COMPILE_TEST")

It's not actually a bug that was introduced by the commit, but it just
made appearing clearer.  So I dropped this tag.

> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

The fix is applied now.  Thanks.


Takashi

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

* Re: [RFC PATCH] sound, media: array_find() can be static
@ 2018-04-23  6:52       ` Takashi Iwai
  0 siblings, 0 replies; 28+ messages in thread
From: Takashi Iwai @ 2018-04-23  6:52 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, alsa-devel, Mauro Carvalho Chehab, Jaroslav Kysela,
	Mauro Carvalho Chehab, Linux Media Mailing List

On Sun, 22 Apr 2018 20:05:03 +0200,
kbuild test robot wrote:
> 
> 
> Fixes: dbd775375e7d ("sound, media: allow building ISA drivers it with COMPILE_TEST")

It's not actually a bug that was introduced by the commit, but it just
made appearing clearer.  So I dropped this tag.

> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

The fix is applied now.  Thanks.


Takashi

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

end of thread, other threads:[~2018-04-23  6:53 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-20 12:32 [PATCH 0/4] More COMPILE_TEST patches to build all media drivers on x86_64 Mauro Carvalho Chehab
2018-04-20 12:32 ` Mauro Carvalho Chehab
2018-04-20 12:32 ` [PATCH 1/4] media: radio: allow building ISA drivers with COMPILE_TEST Mauro Carvalho Chehab
2018-04-22 15:41   ` kbuild test robot
2018-04-20 12:32 ` [PATCH 2/4] media: sta2x11_vip: allow build " Mauro Carvalho Chehab
2018-04-20 12:32 ` [PATCH 3/4] sound, media: allow building ISA drivers it " Mauro Carvalho Chehab
2018-04-20 12:32   ` Mauro Carvalho Chehab
2018-04-20 12:37   ` Takashi Iwai
2018-04-20 12:37     ` Takashi Iwai
2018-04-20 12:51     ` Mauro Carvalho Chehab
2018-04-20 12:51       ` Mauro Carvalho Chehab
2018-04-20 12:58       ` Takashi Iwai
2018-04-20 12:58         ` Takashi Iwai
2018-04-20 13:09         ` Mauro Carvalho Chehab
2018-04-20 13:09           ` Mauro Carvalho Chehab
2018-04-20 13:01       ` Mauro Carvalho Chehab
2018-04-20 13:01         ` Mauro Carvalho Chehab
2018-04-20 13:06         ` Takashi Iwai
2018-04-20 13:06           ` Takashi Iwai
2018-04-22 18:05   ` kbuild test robot
2018-04-22 18:05     ` kbuild test robot
2018-04-23  6:52     ` Takashi Iwai
2018-04-23  6:52       ` Takashi Iwai
2018-04-22 18:05   ` [RFC PATCH] sound, media: array_find() can be static kbuild test robot
2018-04-22 18:05     ` kbuild test robot
2018-04-23  6:52     ` Takashi Iwai
2018-04-23  6:52       ` Takashi Iwai
2018-04-20 12:32 ` [PATCH 4/4] media: siano: get rid of __le32/__le16 cast warnings Mauro Carvalho Chehab

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.