Skip to contentSkip to conversation

pcxhr: "fix" PCXHR_REG_TO_PORT definition

PATCH Applied Alexey Dobriyan 2 participants 2 messages Sep 14, 2021 – Sep 16, 2021 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pcxhr: "fix" PCXHR_REG_TO_PORT definition

The following preprocessor directive is non-compliant:

#undef PCXHR_REG_TO_PORT(x)

gcc warns about extra tokens but nobody sees them as they are under if branch which is never parsed.

Make it an #error, it is not clear to me what the author meant.

---

 sound/pci/pcxhr/pcxhr_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/pcxhr/pcxhr_core.c +1 -1
@@ -52,7 +52,7 @@
 #define PCXHR_DSP 2
 
 #if (PCXHR_DSP_OFFSET_MAX > PCXHR_PLX_OFFSET_MIN)
-#undef  PCXHR_REG_TO_PORT(x)
+#error  PCXHR_REG_TO_PORT(x)
 #else
 #define PCXHR_REG_TO_PORT(x)	((x)>PCXHR_DSP_OFFSET_MAX ? PCXHR_PLX : PCXHR_DSP)
 #endif
Applied
#1 lore raw
Quoted 11 lines · Alexey Dobriyan

The following preprocessor directive is non-compliant:

#undef PCXHR_REG_TO_PORT(x)

gcc warns about extra tokens but nobody sees them as they are under if branch which is never parsed.

Make it an #error, it is not clear to me what the author meant.

Thanks, applied.

Takashi