From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752087AbaK3JE7 (ORCPT ); Sun, 30 Nov 2014 04:04:59 -0500 Received: from cantor2.suse.de ([195.135.220.15]:51139 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751940AbaK3JEz (ORCPT ); Sun, 30 Nov 2014 04:04:55 -0500 Date: Sun, 30 Nov 2014 10:04:53 +0100 Message-ID: From: Takashi Iwai To: Joe Perches Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sound: use enum names instead of magic numbers In-Reply-To: <1417337732.818.8.camel@perches.com> References: <1417201196-12392-1-git-send-email-KyleChamberlin@project20million.org> <1417294692.818.3.camel@perches.com> <1417337732.818.8.camel@perches.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.4 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > > > 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