From patchwork Wed May 5 19:01:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 12240861 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 4C036C433B4 for ; Wed, 5 May 2021 19:04:01 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 ED87A6112D for ; Wed, 5 May 2021 19:04:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED87A6112D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=WL0GKux7EzaNHAusDB0esovCBe4GtABkQKR8py8XF+s=; b=ffpJRmZLtQxSD1kuXtuQKLhpEY yiIMFFbDIoMfvEt8EaWkA4EsiXyTLKIxkxq+vaKRiCuIKgV6aj5g4dSZtYkxYwE0BR8mn6VZfcVF6 ZEGBissOrY8/SJGlyJYa/F8wtwb3V5itUI+b/w07amqIqAsTTWSAH4nbP28t3XmE3LbBcZa/HmOgz rSgcp9RQDMxo32bxLSu/9uHyxWuazG9oVWQJss1bxDYSReiyKiM4f5aKzbec9qllIhcbIDxapm40m tOKC5URUxqJXxHJ1HJi0n/rUFuyONcXZ6EH8vdmNRvhzAGNVgwueKK1Z+ewgtXkywkhMdUtwOC9Ie mXx96WMw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1leMlt-00268F-Bx; Wed, 05 May 2021 19:01:23 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leMlq-002685-2U for linux-arm-kernel@desiato.infradead.org; Wed, 05 May 2021 19:01:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=T1yxZY6y021ZUW75jtOr93P0XvIVYjyosMLBc8JEF+Y=; b=K7fgP10iQ2xXXS6kMPBa1Qcmw/ 9NPtG0EkvThyabNpZzEyYkL/G7GG/UR2vIuFoV7heuuf7NRMV/kIKQFUAEwWAIgXXgktMPyro/tUP KJBuoU746RTCo+GBAmYci2U2immMce1hBNShC0Nkye5M/nO8o2YFfg3kBw4Q1jAUAY20dKyVpxn8g snOzU9hR//PC8zzQML/iNdwZyEABK22jOLziAnoFkKUeM4MkxLxMOWImH/SZiJWdDIdnpoiUSU6oC +rFk3DdJV6EcWojLbwYAwsKx2nLn+dKcdz3gdBQLTF8AFsYyeNqf++lFLK56rfDn3jyl1zthSX5PF kaOWLuSA==; Received: from youngberry.canonical.com ([91.189.89.112]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leMln-005Ayw-Da for linux-arm-kernel@lists.infradead.org; Wed, 05 May 2021 19:01:16 +0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1leMlc-0007o1-Hf; Wed, 05 May 2021 19:01:04 +0000 From: Colin King To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski , linux-scsi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: ufs: ufs-exynos: make a const array static, makes object smaller Date: Wed, 5 May 2021 20:01:04 +0100 Message-Id: <20210505190104.70112-1-colin.king@canonical.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210505_120115_479330_15259A13 X-CRM114-Status: GOOD ( 10.93 ) 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 const array granularity_tbl on the stack but instead it static. Makes the object code smaller by 190 bytes: Before: text data bss dec hex filename 25563 6908 0 32471 7ed7 ./drivers/scsi/ufs/ufs-exynos.o After: text data bss dec hex filename 25213 7068 0 32281 7e19 ./drivers/scsi/ufs/ufs-exynos.o (gcc version 10.3.0) Signed-off-by: Colin Ian King --- drivers/scsi/ufs/ufs-exynos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index 70647eacf195..f2f342d496c7 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -1048,7 +1048,7 @@ static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, u8 enter) exynos_ufs_ungate_clks(ufs); if (ufs->opts & EXYNOS_UFS_OPT_USE_SW_HIBERN8_TIMER) { - const unsigned int granularity_tbl[] = { + static const unsigned int granularity_tbl[] = { 1, 4, 8, 16, 32, 100 }; int h8_time = attr->pa_hibern8time *