Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp85801rwi; Wed, 2 Nov 2022 09:34:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7l5Do2yNDYsRJkVk2KDICPGXViHnWjH/x61b8V/5cBnhnZcp0Akowe4yJSOHIj8IdB339c X-Received: by 2002:a17:906:eecb:b0:73c:5bcb:8eb3 with SMTP id wu11-20020a170906eecb00b0073c5bcb8eb3mr24951681ejb.284.1667406879048; Wed, 02 Nov 2022 09:34:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667406879; cv=none; d=google.com; s=arc-20160816; b=lZcSesrzBptn7Af0mtGD+ewNbjFE2jFup3NXTRMoiI/8PpDPbWHheWNZooOT6072ED W7KgwaVCm04NH6YuHjy4vryP2SqwGiH8XWGIGp8hBZjL1MgBgzjnQxkNgSIvtAzZR58f 0Kg8xbZp6hB5HXaiwnIEVujx8mWZnMpa6MraizeLLhYa6WxHNvDcb0cbbECBS+29+0+3 /zYD5ADdxPxqZmWG6JLO5M4YA8AaA/lDOnC8v6A7PU2gXFH9HhNEpPoQxyEf4LFRYKBw ByVD4w9EMMJPKx479vHKjKF/CyfcfzG/5MbqQcUWpB/rT8nBWc4uSF6iX3jBMaRWp/RK 14TQ== 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=s+b8MGxoMM7dt63fJhCwSK3LN+dkZHgo46dIEwpUZaw=; b=C2r/Gf/popH4PvGsJtgYxLLcMAoO1DnylNbM9ImZJSvYh9qPuljXoJUxpGFvKLHmGW AM5BOun9GNp35m7itJDxhG2YCIp269o98kvHtyVzvGXgBVJDUT78mAjVk7/JTMnqxqGg +niyX1PUh/TbrTmyiPFk7x+bpnfoN3M/Rw/SOCP04As9aFgfkUnEr9wvLFyVw8gvigk9 wMYvEQ7taUjLfM1UDmtSRqGQGdOp+4+e8KvGD0KfCscUHqxUbiPMzIUTr3whzagI+8Lc xaPkQFK1AFLbT53Myri67LV2DQXpGu/6zCmMSXFQikV4uc3jNJe9qHV+AtuGY2lrYgD9 B+Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pC2K6ewv; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ec43-20020a0564020d6b00b00463d1e263a7si3570952edb.332.2022.11.02.09.34.10; Wed, 02 Nov 2022 09:34:39 -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=pC2K6ewv; 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 S230244AbiKBPvX (ORCPT + 98 others); Wed, 2 Nov 2022 11:51:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbiKBPvV (ORCPT ); Wed, 2 Nov 2022 11:51:21 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 060B22AC4E; Wed, 2 Nov 2022 08:51:20 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id y16so25146487wrt.12; Wed, 02 Nov 2022 08:51:19 -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=s+b8MGxoMM7dt63fJhCwSK3LN+dkZHgo46dIEwpUZaw=; b=pC2K6ewvN//7eO9Ct7Je49ZFsiMM1WDMN9bjl9f3ZOHKERloo4ZAEM8h1myLHMXtg9 orJsVnQiTV0NfnInGAsb8+Ocw5h3GR9uLpHAXYom0EMENPg8BNze2K0O/zAr/S6kRrss Hl5qwRZuf3YnbBx4/8QS5LLOi8fGXc29tWdH13vvfMv0rFUQYwZVm4z20idmdAZwz+P9 izQ+yVOXyRJ0uQkoII44efV+M/iE6mmtF/rv8iU2FMjIVpMtkjVrdw3tXXos7uu+vnjh N4x3yyUYKfmeUsA5knR+tihXsl4L3ZyzTATbT9I1og7ewtdA6ZxeOVr7cLA8XyWvr1O3 6uBw== 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=s+b8MGxoMM7dt63fJhCwSK3LN+dkZHgo46dIEwpUZaw=; b=eBX1CHfx4EVSRRGaVTAJK8A9FxYEtJza/l1654JKpIZZkf2XHBoPgJlkIchfoizjr+ /gU7b7FVDybxqR6IRU6U13iWXpJcS4HlmvLD8ZGgt1rffD51g1hsR2S/oUKDhHUMTBD3 44FUPah89e9a3+za+2t6uzO7ajb4XNDk5hoN8DY8aif5+CTezy1bJsKMZqIdeQANXMI/ ItlXxR2Z6FXwUi90yfIkokOT2kdjWmPpGWG/KDtNrnpO/XAbWnlxVLfVISO4u48Z3JSJ OasHEXcBbCPjeEE0fn+PxSVGp+fnsX8PIvlyRpjSLYnlpJF7BEnqkB+8s0PPJRptLirN EXcA== X-Gm-Message-State: ACrzQf1KRd+WYgGb1t+dc0dJHz7EzVxpLBPp69Tf50vKIpKflv5JewaS b0Os2ZyXC5YJX84qcv07jQk= X-Received: by 2002:adf:fe85:0:b0:236:7cde:a95d with SMTP id l5-20020adffe85000000b002367cdea95dmr15769632wrr.531.1667404278413; Wed, 02 Nov 2022 08:51:18 -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 bi19-20020a05600c3d9300b003c6f3e5ba42sm2317093wmb.46.2022.11.02.08.51.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 08:51:17 -0700 (PDT) From: Colin Ian King To: Dafna Hirschfeld , Mauro Carvalho Chehab , Heiko Stuebner , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: rkisp1: make const arrays ae_wnd_num and hist_wnd_num static Date: Wed, 2 Nov 2022 15:51:17 +0000 Message-Id: <20221102155117.144570-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 Don't populate the const arrays on the stack, instead make them static. Also makes the object code smaller. Signed-off-by: Colin Ian King --- drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c index d8731ebbf479..3482f7d707b7 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c @@ -715,7 +715,7 @@ static void rkisp1_aec_config_v12(struct rkisp1_params *params, u32 exp_ctrl; u32 block_hsize, block_vsize; u32 wnd_num_idx = 1; - const u32 ae_wnd_num[] = { 5, 9, 15, 15 }; + static const u32 ae_wnd_num[] = { 5, 9, 15, 15 }; /* avoid to override the old enable value */ exp_ctrl = rkisp1_read(params->rkisp1, RKISP1_CIF_ISP_EXP_CTRL); @@ -822,7 +822,7 @@ static void rkisp1_hst_config_v12(struct rkisp1_params *params, u32 block_hsize, block_vsize; u32 wnd_num_idx, hist_weight_num, hist_ctrl, value; u8 weight15x15[RKISP1_CIF_ISP_HIST_WEIGHT_REG_SIZE_V12]; - const u32 hist_wnd_num[] = { 5, 9, 15, 15 }; + static const u32 hist_wnd_num[] = { 5, 9, 15, 15 }; /* now we just support 9x9 window */ wnd_num_idx = 1; -- 2.37.3