From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751778Ab0INORi (ORCPT ); Tue, 14 Sep 2010 10:17:38 -0400 Received: from cantor.suse.de ([195.135.220.2]:38228 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751230Ab0INORh (ORCPT ); Tue, 14 Sep 2010 10:17:37 -0400 Date: Tue, 14 Sep 2010 16:17:36 +0200 Message-ID: From: Takashi Iwai To: Joe Perches Cc: linux-kernel@vger.kernel.org, Jaroslav Kysela , alsa-devel@alsa-project.org Subject: Re: [PATCH next 16/16] sound: Use static const char * const where possible In-Reply-To: <8d1ddb8c4ad5c5454e647d753c072721ad1002f6.1284435710.git.joe@perches.com> References: <8d1ddb8c4ad5c5454e647d753c072721ad1002f6.1284435710.git.joe@perches.com> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.1 (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 Mon, 13 Sep 2010 21:24:02 -0700, Joe Perches wrote: > > Signed-off-by: Joe Perches Applied the second chunk (as the first chunk is the revert of your previous patch). thanks, Takashi > --- > sound/core/misc.c | 5 +---- > sound/core/pcm_native.c | 2 +- > 2 files changed, 2 insertions(+), 5 deletions(-) > > diff --git a/sound/core/misc.c b/sound/core/misc.c > index 0e5e77f..2c41825 100644 > --- a/sound/core/misc.c > +++ b/sound/core/misc.c > @@ -64,15 +64,12 @@ static int print_snd_pfx(unsigned int level, const char *path, int line, > const char *format) > { > const char *file = sanity_file_name(path); > - char tmp[sizeof("<0>")]; > + char tmp[] = "<0>"; > const char *pfx = level ? KERN_DEBUG : KERN_DEFAULT; > int ret = 0; > > if (format[0] == '<' && format[2] == '>') { > - tmp[0] = '<'; > tmp[1] = format[1]; > - tmp[2] = '>'; > - tmp[3] = 0; > pfx = tmp; > ret = 1; > } > diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c > index e2e7389..eb40942 100644 > --- a/sound/core/pcm_native.c > +++ b/sound/core/pcm_native.c > @@ -142,7 +142,7 @@ int snd_pcm_info_user(struct snd_pcm_substream *substream, > > #ifdef RULES_DEBUG > #define HW_PARAM(v) [SNDRV_PCM_HW_PARAM_##v] = #v > -char *snd_pcm_hw_param_names[] = { > +static const char * const snd_pcm_hw_param_names[] = { > HW_PARAM(ACCESS), > HW_PARAM(FORMAT), > HW_PARAM(SUBFORMAT), > -- > 1.7.3.rc1 >