Messages in this thread Patch in this message | | | Subject | [PATCH] sound: Fix beep_device compilation warnings | From | Joe Perches <> | Date | Sun, 12 Jun 2011 13:02:43 -0700 |
| |
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/
| |