From patchwork Thu Nov 3 12:06:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 14837 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp489082wru; Thu, 3 Nov 2022 05:13:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7XTsnSX9iYRtxhP/vT4Pjz+KWCBkM5Qjy6tNmK7mevVBXGXXPv4tS4iPzKPaXVKH0ERXtm X-Received: by 2002:a17:907:d10:b0:79a:a1fe:8be5 with SMTP id gn16-20020a1709070d1000b0079aa1fe8be5mr28921704ejc.125.1667477586259; Thu, 03 Nov 2022 05:13:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667477586; cv=none; d=google.com; s=arc-20160816; b=SvuhXbSEvAQ7A+gCi31rCWe2hGyb6vCZXuv+qDyK+QmRZwXxA2ff0JM5zX14UXNKVR V/sIiDVA59yYy5gzw7oJMpn5BhZ+byfKuAK77uR3t8aUiwAMGxaZzTgjpAfHislDNXkS tLo7knDrQKzRyS4FR8X0MsDFjVN6PGekh8Nq+Jy02PhXYDJYwUJl8TU7lkoWkb8fotLz JqV0B6TxGIlX3QVK9685jzygFsRYnujYl1sW0pvHQOe++kyECwuDO78hrjvZsLgjBHz/ T4SoUL52Von3PWeRm+0huN5VNft3AI5t/bsKEjKQ58vAmBcaeLgnurvJMxXjJDbvTscO VLVg== 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=DLUDsiw05g4Mq+tu60AP2NfJMNxrmmZZAuBLJdj/+ss=; b=NN821LQkU68AN1Y3l0BnxcuaOgVibmJsB4wmfGI4Md6LRW3mTFl9XJWBNg5u+Hu1Oz ggFmbiCBFY+qfIijOVQrOtEXGl/5OWnSy129sEJn3LA/k/0mSXUIy6GnURhFceHBgAyB SYhBsD6JGx2rQPvv5cusrRWAbfWXejtkibbI+KvK9CEBQohZeqlCKECvfqlyXK1EaV7w dK9S+P1B00ETmYtgUHE8lrwA+Q4EtxRTCCozGCZEGwqzP+l7GiWOqS/LEDwrNv20ul3K bZFzNxseJe02jU5V+heDBNVeYGWej+YFv5LYH2GhisrVkxdHVOyRe/dXUNBCEdOXUqn+ lsFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lxJmCasm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l19-20020a056402231300b004593c35a8bcsi1054435eda.214.2022.11.03.05.12.41; Thu, 03 Nov 2022 05:13:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lxJmCasm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231379AbiKCMGb (ORCPT + 99 others); Thu, 3 Nov 2022 08:06:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229809AbiKCMG2 (ORCPT ); Thu, 3 Nov 2022 08:06:28 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A24A12770; Thu, 3 Nov 2022 05:06:27 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id v1so2409676wrt.11; Thu, 03 Nov 2022 05:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DLUDsiw05g4Mq+tu60AP2NfJMNxrmmZZAuBLJdj/+ss=; b=lxJmCasm1+VP1Qubc/vAFKpv97dE0no8M/PO4B/C4PRfKcBMlc2+R434KHvfFOB3/1 bOXTL6xQsVrDbSV7UWZIReaB+1spj/zPvxyu0nFm6y3Gah87o/5z+ACj9+jzjj3I+gxW HBv+eXtPWCkBJuoaPWtGQXgdaw6hgEn3lWCrg4BqGSba68rjTD2R2AT62cDh8qa2cRrl ZilBB1aOl8O7jEvXZ5trIHZLscqN9/EhHTx9BN5LpJnuomX9hBAGwihANJECLWeQjgPa ffezZ8VkmQNxJGuBMrN4D9PJkosrgUp4y4CZow+9WJX32YF7E1UevLQQHTwgsMp8tec/ QGsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DLUDsiw05g4Mq+tu60AP2NfJMNxrmmZZAuBLJdj/+ss=; b=kxyCWPHBLokBV385xpAUOjbvoUMqk3hedd0uBQhJ/FgOZx5fr+9G5+Ty4vT1veJXUU qww3VsIkwOXbN9FeRVUsegroWMQM3T67p0Nty7LJUgYU1PidKGLKuamF+Q/5B17is/yn 04DNcyyFJbxtve9FeGr60ztsBAy3R7bKBbz3mQ8t1IqTAdgPuGVOjPHKqGL3odhiNNTp yA41epsXnMeMfXQ1MXDiEw6UIdS/3Y8Jmdxpl62RvrsW7dfd0gGenI/7zCsI3AiBK11k JhZ5r6a4bB41Kc6aKlOvDgPUDXA8si6rr7+iOu35sgalmMvRCNNLie5jyAWq6nopmS5p +IsA== X-Gm-Message-State: ACrzQf0547ampu9xR6w3Yan4D10hFjV6fdzjKnD8JeJafF/2CrsDzmit WEmCS0imonlmYGgfKEjfthksjTxeoKollhOl X-Received: by 2002:adf:feca:0:b0:236:b258:c19b with SMTP id q10-20020adffeca000000b00236b258c19bmr18014378wrs.57.1667477185703; Thu, 03 Nov 2022 05:06:25 -0700 (PDT) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id n5-20020a05600c3b8500b003b4935f04a4sm1537933wms.5.2022.11.03.05.06.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 05:06:25 -0700 (PDT) From: Colin Ian King To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Brent Lu , alsa-devel@alsa-project.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: Intel: cirrus-common: Make const array uid_strings static Date: Thu, 3 Nov 2022 12:06:24 +0000 Message-Id: <20221103120624.72583-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748476977499835161?= X-GMAIL-MSGID: =?utf-8?q?1748476977499835161?= Don't populate the read-only const array uid_strings on the stack but instead make it static. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Acked-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_cirrus_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/sof_cirrus_common.c b/sound/soc/intel/boards/sof_cirrus_common.c index 6e39eda77385..851c516c8f5b 100644 --- a/sound/soc/intel/boards/sof_cirrus_common.c +++ b/sound/soc/intel/boards/sof_cirrus_common.c @@ -155,7 +155,7 @@ static const char * const cs35l41_name_prefixes[] = { "WL", "WR", "TL", "TR" }; */ static int cs35l41_compute_codec_conf(void) { - const char * const uid_strings[] = { "0", "1", "2", "3" }; + static const char * const uid_strings[] = { "0", "1", "2", "3" }; unsigned int uid, sz = 0; struct acpi_device *adev; struct device *physdev;