lkml.org 
[lkml]   [2014]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sound: use enum names instead of magic numbers
From
Date
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.



\
 
 \ /
  Last update: 2014-11-30 10:21    [W:2.286 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site