Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp711936pxy; Sat, 31 Jul 2021 23:29:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAjFtq7RIB0KEf/5YCXcd/xss58sNTiKNQk9CPdVljgYllUQV5WZnbqn+4UlKI8GPtBDTj X-Received: by 2002:aa7:c0d1:: with SMTP id j17mr12415101edp.217.1627799362935; Sat, 31 Jul 2021 23:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627799362; cv=none; d=google.com; s=arc-20160816; b=PCeSJdLvga0Ekg7iwbaCrePrJZ6OX/yxvRN0x/pJuTBXX2ZA84Il2ePwrT2ZHKtHZK sTa0PF+BkM313UaQxGEpdhDt8HMM3jyuvgSebd4iFm8FUcvR9VwEtr7qxKABnmyZqFgR Z73Z5dO6QZ/LhRGbUAXPUJjcHHM9Fet5d9uit+0CxZPXtD52vtSKS9IE+Y7QDhYnlK7y izNmcLXNm8FNNRhl0qE9L08UJmntELTsnbbG/RK+WRbsNGZPKl0ph/xdNIZrlcs1nsdH tLIpuwlo3Q4p6PFhJGHg1kwVAW/yPQEi0gX+0AoKuSjUOUrZGtJFi11lzuXMAvhJxSt7 wA8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CzjCXhgl0a3d1ieMBVQ+XZEZoQi8gWaJjxi2fu4cq5E=; b=ljaI23P9BXBwUF2dsxUKkAiZ2aGE6DYRrmHvrdrMtXebX6uJx0WLOXJ1gXcFYnmCjY rfbl8uSpBVP6UswEhE4edQDN0IlX6pdm19iipQpbW3YwKOBiWchp4+egY4eKsZ7ApGk+ DHP8xMT2rWX7/wZKpQnv+XVLQ/I1gkh/wuzfOBugC3H7c66UBfEBPMwyeNSkuoblAv+U Piqqr6X7WKUaV+mjWrxFYISr3nM6mpMThzNAQg0I7QtsLjF6HwtCDJUkcLivI76wYCpy ZHfXbBYZxCMHh7cTmRljvyrnouE90mjWh+OD+nGs7IWyMLbOytbWxNZYu1Ipvf2+yFXl HXfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=l0vqmorM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e15si6465351ejx.19.2021.07.31.23.28.59; Sat, 31 Jul 2021 23:29:22 -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=@canonical.com header.s=20210705 header.b=l0vqmorM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230416AbhHAG0V (ORCPT + 99 others); Sun, 1 Aug 2021 02:26:21 -0400 Received: from smtp-relay-canonical-0.canonical.com ([185.125.188.120]:34098 "EHLO smtp-relay-canonical-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230356AbhHAG0E (ORCPT ); Sun, 1 Aug 2021 02:26:04 -0400 Received: from localhost (1.general.cking.uk.vpn [10.172.193.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 5BF423F10D; Sun, 1 Aug 2021 06:25:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1627799154; bh=CzjCXhgl0a3d1ieMBVQ+XZEZoQi8gWaJjxi2fu4cq5E=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=l0vqmorMAPZIl0H+3yk13NHRpVICt/c0IN+RqRegnFA+u0JzXwm4dk4mLCtDT2rOp CxEdQK8FwEd99CZTNgmKXlzHcPC16tLId1N+7Hgh3M5laWu3nQnXrnypgy2ojYCFPQ Dflzt9tyWBBVB7lwGoPaG6MXF2puGBFv2PJtzZamtt7BZOpNeDR7sGbgszKMen+gjJ MdnwF+3uE2M9gqJlLa3qwNT0MTIH8aheCZ5qXZcv8lhKDRA8slOEgedO5XHKnDzL7g EW0T2pM3VI2400orB+tYgVyqueIEAt9yKsLMHzD2S1hFnyPBDWtQoM4x3ecHKsvkMN yxo1jryPTC9hg== From: Colin King To: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ALSA: usb-audio: make array static const, makes object smaller Date: Sun, 1 Aug 2021 07:25:48 +0100 Message-Id: <20210801062548.137770-1-colin.king@canonical.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 + }; const char **s; bool found = false; -- 2.31.1