From: Takashi Iwai <tiwai@suse.de>
To: Joe Perches <joe@perches.com>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sound: use enum names instead of magic numbers
Date: Sun, 30 Nov 2014 10:04:53 +0100 [thread overview]
Message-ID: <s5hwq6d9hze.wl-tiwai@suse.de> (raw)
In-Reply-To: <1417337732.818.8.camel@perches.com>
At Sun, 30 Nov 2014 00:55:32 -0800,
Joe Perches wrote:
>
> On Sun, 2014-11-30 at 09:41 +0100, Takashi Iwai wrote:
> > At Sat, 29 Nov 2014 12:58:12 -0800,
> > Joe Perches wrote:
> > >
> > > There's an enum defined for these magic numbers,
> > > might as well use it.
> > >
> > > Miscellanea:
> > > o Use ##__VA_ARGS__
> > >
> > > Signed-off-by: Joe Perches <joe@perches.com>
> >
> > Any specific reason to hang to an irrelevant thread?
>
> Not in particular, I just noticed it there.
>
> > Also...
>
> > > diff --git a/include/sound/core.h b/include/sound/core.h
> []
> > > +#define __snd_printk(snd_level, file, line, format, ...) \
> > > + printk(format, ##__VA_ARGS__)
> >
> > It's better to keep the argument name "level". Using both the same
> > name for a variable and its enum type is rather confusing, and just
> > gives unnecessary LOCs.
>
> Write it as you chose. It is pretty trivial.
... trivial for anyone ;)
Takashi
next prev parent reply other threads:[~2014-11-30 9:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-28 18:59 [PATCH] Sound: drivers: virmidi: fixed code style issues Kyle Chamberlin
2014-11-29 20:36 ` Takashi Iwai
2014-11-29 20:58 ` [PATCH] sound: use enum names instead of magic numbers Joe Perches
2014-11-30 4:52 ` Takashi Sakamoto
2014-11-30 4:57 ` Joe Perches
2014-11-30 8:41 ` Takashi Iwai
2014-11-30 8:55 ` Joe Perches
2014-11-30 9:04 ` Takashi Iwai [this message]
2014-11-30 19:26 ` Joe Perches
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=s5hwq6d9hze.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®