From: Harvey Harrison <harvey.harrison@gmail.com>
To: Pavel Machek <pavel@suse.cz>
Cc: perex@perex.cz, kernel list <linux-kernel@vger.kernel.org>,
Trivial patch monkey <trivial@kernel.org>,
tiwai@suse.de
Subject: Re: sound/core.h: evil #ifdefs
Date: Sat, 29 Mar 2008 14:00:25 -0700 [thread overview]
Message-ID: <1206824425.6543.28.camel@brick> (raw)
In-Reply-To: <20080329205700.GA11295@elf.ucw.cz>
On Sat, 2008-03-29 at 21:57 +0100, Pavel Machek wrote:
> snd_minor_info_oss_* is an function returning int _or_ comment,
> depending on config parameters. That is truly evil, fix it.
>
> Signed-off-by: Pavel Machek <pavel@suse.cz>
>
> diff --git a/include/sound/core.h b/include/sound/core.h
> index 4fc0235..452000d 100644
> --- a/include/sound/core.h
> +++ b/include/sound/core.h
> @@ -277,8 +277,8 @@ #ifdef CONFIG_SND_OSSEMUL
> int snd_minor_info_oss_init(void);
> int snd_minor_info_oss_done(void);
> #else
> -#define snd_minor_info_oss_init() /*NOP*/
> -#define snd_minor_info_oss_done() /*NOP*/
> +static inline snd_minor_info_oss_init(void) { return 0; }
static inline int snd_minor_info_oss_init(void) { return 0; }
> +static inline snd_minor_info_oss_done(void) { return 0; }
static inline int snd_minor_info_oss_done(void) { return 0; }
> #endif
>
> /* memory.c */
>
Cheers,
Harvey
next prev parent reply other threads:[~2008-03-29 21:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-29 20:57 sound/core.h: evil #ifdefs Pavel Machek
2008-03-29 21:00 ` Harvey Harrison [this message]
2008-03-29 21:39 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1206824425.6543.28.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.