lkml.org 
[lkml]   [2011]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] sound: Fix beep_device compilation warnings
From
Date
Using static inline functions can reduce compilation messages
and macro misuse.

Signed-off-by: Joe Perches <joe@perches.com>

---

Maybe this helps?

On Sun, 2011-06-12 at 21:40 +0200, Borislav Petkov wrote:
> Btw, I keep noticing those when building on 32bit:
> sound/pci/hda/patch_conexant.c: In function ‘patch_cxt5045’:
> sound/pci/hda/patch_conexant.c:1232:3: warning: statement with no effect
> sound/pci/hda/patch_conexant.c: In function ‘patch_cxt5051’:
> sound/pci/hda/patch_conexant.c:2067:3: warning: statement with no effect
> sound/pci/hda/patch_conexant.c: In function ‘patch_cxt5066’:
> sound/pci/hda/patch_conexant.c:3261:3: warning: statement with no effect
> sound/pci/hda/patch_conexant.c: In function ‘patch_conexant_auto’:
> sound/pci/hda/patch_conexant.c:4370:3: warning: statement with no effect

sound/pci/hda/hda_beep.h | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/sound/pci/hda/hda_beep.h b/sound/pci/hda/hda_beep.h
index f1de1ba..4967eab 100644
--- a/sound/pci/hda/hda_beep.h
+++ b/sound/pci/hda/hda_beep.h
@@ -50,7 +50,12 @@ int snd_hda_enable_beep_device(struct hda_codec *codec, int enable);
int snd_hda_attach_beep_device(struct hda_codec *codec, int nid);
void snd_hda_detach_beep_device(struct hda_codec *codec);
#else
-#define snd_hda_attach_beep_device(...) 0
-#define snd_hda_detach_beep_device(...)
+static inline int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
+{
+ return 0;
+}
+void snd_hda_detach_beep_device(struct hda_codec *codec)
+{
+}
#endif
#endif

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-06-12 22:05    [W:0.059 / U:1.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site