Skip to contentSkip to conversation

ALSA: isa: Use INVALID_HWIRQ definition

PATCH In review Andy Shevchenko 2 participants 3 messages Jul 15, 2022 – Jul 18, 2022 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: isa: Use INVALID_HWIRQ definition

Use specific definition for invalid IRQ. It makes the code uniform in respect to the constant used for that. No functional change intended.

---
 sound/isa/sscape.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/isa/sscape.c +1 -2
index 0bc0025f7c19..9adaf91045e9 100644
@@ -140,8 +140,7 @@ struct soundscape {
 	unsigned char midi_vol;
 };
 
-#define INVALID_IRQ  ((unsigned)-1)
-
+#define INVALID_IRQ  ((unsigned)INVALID_HWIRQ)
 
 static inline struct soundscape *get_card_soundscape(struct snd_card *c)
 {
Signature · 1 line
2.35.1
#1 lore raw
Quoted 15 lines · Andy Shevchenko

Use specific definition for invalid IRQ. It makes the code uniform in respect to the constant used for that. No functional change intended.

---
 sound/isa/sscape.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/isa/sscape.c +0 -0
index 0bc0025f7c19..9adaf91045e9 100644

sound/isa/sscape.c struct soundscape { · line 146

Quoted 9 lines
sound/isa/sscape.c +1 -2
@@ -140,8 +140,7 @@ struct soundscape {
 	unsigned char midi_vol;
 };
 
-#define INVALID_IRQ  ((unsigned)-1)
-
+#define INVALID_IRQ  ((unsigned)INVALID_HWIRQ)
 
 static inline struct soundscape *get_card_soundscape(struct snd_card *c)
 {

This seems failing to build on my local tree as is. We need to include <linux/irq.h> explicitly.

thanks,

Takashi

#2 lore raw
Quoted 2 lines · Takashi Iwai

On Fri, 15 Jul 2022 22:57:37 +0200,
Andy Shevchenko wrote:

...

Quoted 6 lines

sound/isa/sscape.c struct soundscape { · line 143

Quoted 3 lines
sound/isa/sscape.c +1 -2
-#define INVALID_IRQ  ((unsigned)-1)
-
+#define INVALID_IRQ  ((unsigned)INVALID_HWIRQ)

This seems failing to build on my local tree as is. We need to include <linux/irq.h> explicitly.

As Marc told me this is probably the way to the wrong direction, so, please, discard this patch anyway.

Signature · 2 lines
With Best Regards,
Andy Shevchenko