All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pcxhr: "fix" PCXHR_REG_TO_PORT definition
@ 2021-09-14 11:08 Alexey Dobriyan
  2021-09-16  9:09 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2021-09-14 11:08 UTC (permalink / raw)
  To: tiwai; +Cc: alsa-devel

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>
---

 sound/pci/pcxhr/pcxhr_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/pci/pcxhr/pcxhr_core.c
+++ b/sound/pci/pcxhr/pcxhr_core.c
@@ -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

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

* Re: [PATCH] pcxhr: "fix" PCXHR_REG_TO_PORT definition
  2021-09-14 11:08 [PATCH] pcxhr: "fix" PCXHR_REG_TO_PORT definition Alexey Dobriyan
@ 2021-09-16  9:09 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2021-09-16  9:09 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: alsa-devel

On Tue, 14 Sep 2021 13:08:47 +0200,
Alexey Dobriyan wrote:
> 
> 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>

Thanks, applied.


Takashi

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

end of thread, other threads:[~2021-09-16  9:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 11:08 [PATCH] pcxhr: "fix" PCXHR_REG_TO_PORT definition Alexey Dobriyan
2021-09-16  9:09 ` Takashi Iwai

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.