lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 19 Nov 2022 12:55:10 +0200
From:   Dafna Hirschfeld <dafna@...tmail.com>
To:     Colin Ian King <colin.i.king@...il.com>
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        Heiko Stuebner <heiko@...ech.de>, linux-media@...r.kernel.org,
        linux-rockchip@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: rkisp1: make const arrays ae_wnd_num and
 hist_wnd_num static

On 02.11.2022 15:51, Colin Ian King wrote:
>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 <colin.i.king@...il.com>

Reviewed-by: Dafna Hirschfeld <dafna@...tmail.com>

>---
> 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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ