Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp754050pxy; Sun, 1 Aug 2021 01:06:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnOZ+dA7psSYzVt5EoQm5OOgLr5z4Ew1gsMl7+mWGkYfVoiZl5X56phe6v5Nxtd5MjO8OU X-Received: by 2002:a05:6638:3048:: with SMTP id u8mr9113972jak.91.1627805208597; Sun, 01 Aug 2021 01:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627805208; cv=none; d=google.com; s=arc-20160816; b=rROMI+W1PBAJZ8mtOwCASxHlERpgmWwfMumLOZKaaFwdUG8FkVe9T5kYiKJzMRic17 REl1AyeuIOuwM+Ik2QIWotJ+UQfN5VrjY/gH9EPDcDszMNwEA8dC9BNuC8Sj+7+OcWUg o3VUCzqKk8ZBM0mcnsmndP1HkXLi+yZ/RnLCI0m08zjnKdDUFVXhsfRxseXGAOMsw0jq bdAMJkjjCzHzr/LKq8r8a1lGPgbYh1QOYeS0DBrRTTX+7HFa9kRuHG5vOkLnnBVrzF4s xhSSXI1oF3GMGtu6GtZXbS5MSdRtgJf63V/CVDPMAwmJop7+MbXMHuGMXnQwbGueL1jq 1xxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=bShZYYYw9gzAU9l1zpGdsOfxjisudXefIX46w2pnN4U=; b=1IVIJO4oKcyHmyOlrRTqslS914Ltr4bVXDmQ7QtsGEFptkpm4WMzb3KAnIpgyeqYKk 71KXyTgUwRKFlKTw6cv9qRDGVfKMF+20oSQzzShfquTWr+L0b+0CCrFoqKGJegX4mqlG UmK7DmceJ3PAdgRPIaKtWMSlkc+RrqBACN48vqnMX4mcHCD9xEsy0Dk2dE+WPQacYgO6 HUvPU/mjplBQXqK0pISBAflN5AlHo2Y8SKX4FO9j8+ltjorKjfWkHNxCCElaLHpQu/OI XIbqgSuN9K9USTtDUtH2ObesmMM1BEBYxq8tHJ5uUgwdEKiF57Mb4yxEvfmOSlgNfHg1 eyew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=iPH8gy39; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=vWketJyJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b26si1759658jar.107.2021.08.01.01.06.37; Sun, 01 Aug 2021 01:06:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=iPH8gy39; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=vWketJyJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231464AbhHAIF6 (ORCPT + 99 others); Sun, 1 Aug 2021 04:05:58 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:34294 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230087AbhHAIF5 (ORCPT ); Sun, 1 Aug 2021 04:05:57 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 2869622047; Sun, 1 Aug 2021 08:05:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1627805149; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bShZYYYw9gzAU9l1zpGdsOfxjisudXefIX46w2pnN4U=; b=iPH8gy39Dns6MSRve5hLOOrolMWynGDNHVYEukQjhusgVTwrz1vFsKpQCYHvQtfeP442Im hcxlQuuEArF28yE5TEU2Q0t5r3Fy2rL6MFG2udK7ZRJntSdiy1lYRDMOcRdhraMB8wlHoI UtUJTlyTc+uVoKgTXFamrVD/8ckfpQQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1627805149; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bShZYYYw9gzAU9l1zpGdsOfxjisudXefIX46w2pnN4U=; b=vWketJyJpjbP1Q8vDq02caFxrWnT6rbMFUMJKtBkfeEAggOsZjEUQB2LIpNx4+S4E8ll4g 6ddIZ3+e+07q4ZCA== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 1ECEEA3BA8; Sun, 1 Aug 2021 08:05:49 +0000 (UTC) Date: Sun, 01 Aug 2021 10:05:49 +0200 Message-ID: From: Takashi Iwai To: Colin King Cc: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: usb-audio: make array static const, makes object smaller In-Reply-To: <20210801062548.137770-1-colin.king@canonical.com> References: <20210801062548.137770-1-colin.king@canonical.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/25.3 (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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 01 Aug 2021 08:25:48 +0200, Colin King wrote: > > From: Colin Ian King > > Don't populate array names_to_check on the stack but instead it > static. Makes the object code smaller by 56 bytes. > > Before: > text data bss dec hex filename > 103512 34380 0 137892 21aa4 ./sound/usb/mixer.o > > After: > text data bss dec hex filename > 103264 34572 0 137836 21a6c ./sound/usb/mixer.o > > gcc version 10.2.0) > > Signed-off-by: Colin Ian King > --- > sound/usb/mixer.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c > index f4cdaf1ba44a..aec2499284a5 100644 > --- a/sound/usb/mixer.c > +++ b/sound/usb/mixer.c > @@ -1572,8 +1572,9 @@ static size_t append_ctl_name(struct snd_kcontrol *kctl, const char *str) > static void check_no_speaker_on_headset(struct snd_kcontrol *kctl, > struct snd_card *card) > { > - const char *names_to_check[] = { > - "Headset", "headset", "Headphone", "headphone", NULL}; > + static const char *names_to_check[] = { > + "Headset", "headset", "Headphone", "headphone", NULL > + }; checkpatch complains like: WARNING: static const char * array should probably be static const char * const Could you check and resubmit if it's right? thanks, Takashi