Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: 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.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Link: https://lore.kernel.org/r/YUCCv47sm4zf9OVO@localhost.localdomain
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Alexey Dobriyan and committed by
Takashi Iwai
be830389 ad7cc2d4

+1 -1
+1 -1
sound/pci/pcxhr/pcxhr_core.c
··· 52 52 #define PCXHR_DSP 2 53 53 54 54 #if (PCXHR_DSP_OFFSET_MAX > PCXHR_PLX_OFFSET_MIN) 55 - #undef PCXHR_REG_TO_PORT(x) 55 + #error PCXHR_REG_TO_PORT(x) 56 56 #else 57 57 #define PCXHR_REG_TO_PORT(x) ((x)>PCXHR_DSP_OFFSET_MAX ? PCXHR_PLX : PCXHR_DSP) 58 58 #endif