From patchwork Wed Aug 18 15:17:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 12444673 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F9FAC4338F for ; Wed, 18 Aug 2021 15:19:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE32161042 for ; Wed, 18 Aug 2021 15:19:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CE32161042 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ZiN4jolZHofIovwpdkBnrJHNmqnk1pMfBw5FFO7Xp5k=; b=Nc6loB4H205xPN ulsBBNugpPW66yU+lp4wgPsbJWJcn+ipWm1ZGblUoUfM+VOJhwHHSRLU5hdWbX7IPRJtf8a3tEV0e IOEDEJ5ciQzoC6aMLoyjZxQhKHc74x+AN2oFo7MswxiynPA9oZjUU2cnc72mx0OYrGi1rNKtSszFw L/FAajBXXdRuH+FyhnR+m2S3Mdl/D8pKGyHW44svwHdj7MK0xiiX9NH+3VWowaq7NCp6X7hCoMeA9 y21WDDs1Lsal8EIUgPiH/96IXlHoqXtYhIzUoRZ5t+MGRlv4Crw0AY2FVR8CrTOrBIOsq7/n4wJud 7bLdzdKXKrsmcDSQb3Ow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mGNKF-0061UR-C9; Wed, 18 Aug 2021 15:17:55 +0000 Received: from smtp-relay-canonical-1.canonical.com ([185.125.188.121]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mGNK8-0061ST-6j for linux-arm-kernel@lists.infradead.org; Wed, 18 Aug 2021 15:17:52 +0000 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-1.canonical.com (Postfix) with ESMTPSA id B0AE13F361; Wed, 18 Aug 2021 15:17:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1629299866; bh=z5jVFxsMugjMYW/N4BEa1uHFJbg9/7T7WDVguO5VseE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=hf4+LckNw4pkWkuwMlwbVkmrw9okQEDxKdkcCSMAUMHNySVa0i9QPu/En3qJSZJeU t4x9CtV6yubBhn1kFq/mRQfK6GOUMNmhDMO2fqqQznJY8/6lzi1aBQLByu44/Z2wvL ANfox6rDlHHMKnaVrXgSyWkagjTYyfQwiDgYn+Fj18bLYDG1mi8N9Iq49Zr3a7wC8l ieDDfsYsU1JlKDn+UgEryq+2MxlIBOV/7jUFqJokvreB2WX0HK+ovS+nSTCwlZc5VN u6tPsLrb9BOrni6AFUdKYYdQ17RQqbv6lhowtZgfydvFxbv8Do9muwQATqUbd31ii5 3ANfJY9nwOIyQ== From: Colin King To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Kunihiko Hayashi , Masami Hiramatsu , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: uniphier: make arrays mul and div static const, makes object smaller Date: Wed, 18 Aug 2021 16:17:46 +0100 Message-Id: <20210818151746.38520-1-colin.king@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210818_081748_493589_D5F33AC5 X-CRM114-Status: GOOD ( 12.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Colin Ian King Don't populate the arrays mul and div on the stack but instead make them static const. Makes the object code smaller by 4 bytes. Before: text data bss dec hex filename 16226 4984 64 21274 531a ./sound/soc/uniphier/aio-cpu.o After: text data bss dec hex filename 16062 5144 64 21270 5316 ./sound/soc/uniphier/aio-cpu.o (gcc version 10.2.0) Signed-off-by: Colin Ian King Acked-by: Masami Hiramatsu --- sound/soc/uniphier/aio-cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/uniphier/aio-cpu.c b/sound/soc/uniphier/aio-cpu.c index cf9814130067..4e8d5f7532ba 100644 --- a/sound/soc/uniphier/aio-cpu.c +++ b/sound/soc/uniphier/aio-cpu.c @@ -128,8 +128,8 @@ static const struct uniphier_aio_spec *find_spec(struct uniphier_aio *aio, static int find_divider(struct uniphier_aio *aio, int pll_id, unsigned int freq) { struct uniphier_aio_pll *pll; - int mul[] = { 1, 1, 1, 2, }; - int div[] = { 2, 3, 1, 3, }; + static const int mul[] = { 1, 1, 1, 2, }; + static const int div[] = { 2, 3, 1, 3, }; int i; if (!is_valid_pll(aio->chip, pll_id))