Re: [PATCH] sound: Fix beep_device compilation warnings

From: Takashi Iwai
Date: Mon Jun 13 2011 - 03:46:36 EST


At Sun, 12 Jun 2011 13:02:43 -0700,
Joe Perches wrote:
>
> Using static inline functions can reduce compilation messages
> and macro misuse.
>
> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
>
> ---
>
> 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

Yep, this must be. Now applied.
Thanks!


Takashi

>
> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/