Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9117323rwp; Wed, 19 Jul 2023 23:05:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlFsp98hkRncVAkP7D9oOfKRg9RccUQCNg0ygjnWV7tv5AwYyfwPXdjmFyL/gIPFqKeMWxSE X-Received: by 2002:a05:6358:93a7:b0:135:aed4:99b4 with SMTP id h39-20020a05635893a700b00135aed499b4mr6610597rwb.4.1689833137073; Wed, 19 Jul 2023 23:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689833137; cv=none; d=google.com; s=arc-20160816; b=Qzw9s1JOj4M87EFjhWj4pm2y51JfGptxJ704COsxbyKtIAfkpoxmsPVijTvmODKgHy HD6vn0hQ9NfLxrQq6zQ+ZXYj3uYAfEE35pcwukzk5bJj79VDAemNRyq29gNhqPkXKr7R LO9DKditoEMC7na96tLrI0yBE5Txq26HpqZhgsMWbYd307r3wUb4ziAQEvz/j2nzslYU AtClVTBaxYothY18qwfSEn16CBXhFjE6/sL7cnZMFObF7gSpJHSIc19hVAbIVUElJPUd gMwti1TNTos+fbRW+6vUmNPXSx0ymz/9qdAqTrSZQVYnLDsUqYEfr9E0/uVzT+Odyc2o AigQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=Hq2Ha3QQvIBtdgLPDKSrov82q9syxLh4IBx7LM37QSI=; fh=Vpsm+rvFtZaeaB6fwime+C3FtmotLOUqB0mQQP3llx0=; b=C6bK1896zmIiMJPwcySDobkMrbcWi9emTJeLB/5zTlZUw5Ab1xDch9qg/eopLtsypJ e0TOGDqEvbM9XRyBSUqZODAgcM10IQn3RVTMKAtawts9AlXtzO2NiuR+NKIiyCUEZ6Ah iAnNIQlHJ9vv3xK7XfDIQ2AbeTfTofOvgUaMUJC3R3BQQNgi1bGdQ8hp+hzKKiY8DGNF 2ZIr2zReo4orDIvlNvlqnmvOWpFljI7TKOVNi7TbK81WcA28gCAAkUkay8AQsgWMj7yJ LekaPd0nXHAQXZU3B1LtKSeBnVV2f4fUQ6CmKVFJ7KJaQvUviWPX4jz1W7YHhRH9I3rI /A0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=WfyOvBHs; 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=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bd6-20020a056a00278600b0067a0b355523si282495pfb.116.2023.07.19.23.05.25; Wed, 19 Jul 2023 23:05:37 -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=@gmx.de header.s=s31663417 header.b=WfyOvBHs; 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=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229652AbjGTFsH (ORCPT + 99 others); Thu, 20 Jul 2023 01:48:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229908AbjGTFr6 (ORCPT ); Thu, 20 Jul 2023 01:47:58 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E0D12107; Wed, 19 Jul 2023 22:47:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1689832054; x=1690436854; i=deller@gmx.de; bh=/Bb2ropaPWrZgW8ZarCptKpfd1MfwEElK6UW93fFvrc=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=WfyOvBHsvY9wPrwfDgQSvcR4FNoPoxygbPyCmizEK7zYHfBCHX/ygNP5ii+/zr8SqJmPTrT JOLFlZc6HI08kvyVCfpmhaoKRhdWtpfS/Fo9GuGErc8L5r1UMduKTRMEVBumIt/Vg6j4ieS2E wZapufWu8DfwURV466h1TVVN8jmvbxX54Px+ScCnCV27KYse602BTCcFsa7I27f61ZiJjtCKT DXiYoNn76kvtDLys78yTqZAJPWvxu+SoMrfXxNPaSWp/IFY8WYjuu4UNe0cyND1OqzaOdtI2v 4aPK6wVIittGMHvvGB5tJahKTOFJPbxuz8jGKKCDJV8DNr9jp5dw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.20.60] ([94.134.153.9]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M4s0t-1qOI3G3xPb-001xhq; Thu, 20 Jul 2023 07:47:34 +0200 Message-ID: <898d9b03-bcaf-ec1b-2539-a290ab89aead@gmx.de> Date: Thu, 20 Jul 2023 07:47:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH][next][V2] video: fbdev: kyro: make some const read-only arrays static and reduce type size Content-Language: en-US To: Colin Ian King , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230712161123.465713-1-colin.i.king@gmail.com> From: Helge Deller In-Reply-To: <20230712161123.465713-1-colin.i.king@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K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lF+RDCxHrwBnN9nnxgJ4z13W+EBPwFO4J0OH2lvbq0l1sHgNMEX5nRL5R+bj/eNpkZTmt34FQ HivdKnvZBciZ4kn/GopuIvzlkagfoJo4UotjuP5Jc7iAztUpXKQ4DBmguXpFmdyjBsZo9fYPF 11aYeA== X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 On 7/12/23 18:11, Colin Ian King wrote: > Don't populate the const read-only arrays on the stack but instead > make them static const. Use smaller types to use less storage for > the arrays. Also makes the object code a little smaller. > > Signed-off-by: Colin Ian King applied. Thanks! Helge > --- > > V2: Use smaller int types, kudos to Helge Deller for suggesting this > > --- > drivers/video/fbdev/kyro/STG4000InitDevice.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/video/fbdev/kyro/STG4000InitDevice.c b/drivers/vide= o/fbdev/kyro/STG4000InitDevice.c > index edfa0a04854d..79886a246638 100644 > --- a/drivers/video/fbdev/kyro/STG4000InitDevice.c > +++ b/drivers/video/fbdev/kyro/STG4000InitDevice.c > @@ -83,11 +83,11 @@ volatile u32 i,count=3D0; \ > static u32 InitSDRAMRegisters(volatile STG4000REG __iomem *pSTGReg, > u32 dwSubSysID, u32 dwRevID) > { > - u32 adwSDRAMArgCfg0[] =3D { 0xa0, 0x80, 0xa0, 0xa0, 0xa0 }; > - u32 adwSDRAMCfg1[] =3D { 0x8732, 0x8732, 0xa732, 0xa732, 0x8732 }; > - u32 adwSDRAMCfg2[] =3D { 0x87d2, 0x87d2, 0xa7d2, 0x87d2, 0xa7d2 }; > - u32 adwSDRAMRsh[] =3D { 36, 39, 40 }; > - u32 adwChipSpeed[] =3D { 110, 120, 125 }; > + static const u8 adwSDRAMArgCfg0[] =3D { 0xa0, 0x80, 0xa0, 0xa0, 0xa0 }= ; > + static const u16 adwSDRAMCfg1[] =3D { 0x8732, 0x8732, 0xa732, 0xa732, = 0x8732 }; > + static const u16 adwSDRAMCfg2[] =3D { 0x87d2, 0x87d2, 0xa7d2, 0x87d2, = 0xa7d2 }; > + static const u8 adwSDRAMRsh[] =3D { 36, 39, 40 }; > + static const u8 adwChipSpeed[] =3D { 110, 120, 125 }; > u32 dwMemTypeIdx; > u32 dwChipSpeedIdx; >