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] [thread-next>] [day] [month] [year] [list]
Message-ID: <15d201da37be$abae6d20$030b4760$@samsung.com>
Date: Tue, 26 Dec 2023 11:14:59 +0530
From: "Aakarsh Jain" <aakarsh.jain@...sung.com>
To: "'Krzysztof Kozlowski'" <krzysztof.kozlowski@...aro.org>, "'Marek
 Szyprowski'" <m.szyprowski@...sung.com>, "'Andrzej Hajda'"
	<andrzej.hajda@...el.com>, "'Mauro Carvalho Chehab'" <mchehab@...nel.org>
Cc: <linux-fsd@...la.coma>, <linux-samsung-soc@...r.kernel.org>, "'Smitha T
 Murthy'" <smithatmurthy@...il.com>, <linux-arm-kernel@...ts.infradead.org>,
	<linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 06/15] media: s5p-mfc: constify s5p_mfc_variant
 structures



> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> Sent: 24 December 2023 21:14
> To: Marek Szyprowski <m.szyprowski@...sung.com>; Andrzej Hajda
> <andrzej.hajda@...el.com>; Mauro Carvalho Chehab
> <mchehab@...nel.org>
> Cc: Aakarsh Jain <aakarsh.jain@...sung.com>; linux-fsd@...la.coma; linux-
> samsung-soc@...r.kernel.org; Smitha T Murthy
> <smithatmurthy@...il.com>; linux-arm-kernel@...ts.infradead.org; linux-
> media@...r.kernel.org; linux-kernel@...r.kernel.org; Krzysztof Kozlowski
> <krzysztof.kozlowski@...aro.org>
> Subject: [PATCH 06/15] media: s5p-mfc: constify s5p_mfc_variant structures
> 
> Static "s5p_mfc_variant" structures are not modified by the driver, so they
> can be made const for code safety.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> ---
>  drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
> b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
> index 6af7b812c5df..5d10c1cb8b92 100644
> --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
> +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
> @@ -1529,7 +1529,7 @@ static const struct s5p_mfc_buf_size buf_size_v5 =
> {
>  	.priv	= &mfc_buf_size_v5,
>  };
> 
> -static struct s5p_mfc_variant mfc_drvdata_v5 = {
> +static const struct s5p_mfc_variant mfc_drvdata_v5 = {
>  	.version	= MFC_VERSION,
>  	.version_bit	= MFC_V5_BIT,
>  	.port_num	= MFC_NUM_PORTS,
> @@ -1554,7 +1554,7 @@ static const struct s5p_mfc_buf_size buf_size_v6 =
> {
>  	.priv	= &mfc_buf_size_v6,
>  };
> 
> -static struct s5p_mfc_variant mfc_drvdata_v6 = {
> +static const struct s5p_mfc_variant mfc_drvdata_v6 = {
>  	.version	= MFC_VERSION_V6,
>  	.version_bit	= MFC_V6_BIT,
>  	.port_num	= MFC_NUM_PORTS_V6,
> @@ -1583,7 +1583,7 @@ static const struct s5p_mfc_buf_size buf_size_v7 =
> {
>  	.priv	= &mfc_buf_size_v7,
>  };
> 
> -static struct s5p_mfc_variant mfc_drvdata_v7 = {
> +static const struct s5p_mfc_variant mfc_drvdata_v7 = {
>  	.version	= MFC_VERSION_V7,
>  	.version_bit	= MFC_V7_BIT,
>  	.port_num	= MFC_NUM_PORTS_V7,
> @@ -1593,7 +1593,7 @@ static struct s5p_mfc_variant mfc_drvdata_v7 = {
>  	.num_clocks	= 1,
>  };
> 
> -static struct s5p_mfc_variant mfc_drvdata_v7_3250 = {
> +static const struct s5p_mfc_variant mfc_drvdata_v7_3250 = {
>  	.version        = MFC_VERSION_V7,
>  	.version_bit    = MFC_V7_BIT,
>  	.port_num       = MFC_NUM_PORTS_V7,
> @@ -1617,7 +1617,7 @@ static const struct s5p_mfc_buf_size buf_size_v8 =
> {
>  	.priv	= &mfc_buf_size_v8,
>  };
> 
> -static struct s5p_mfc_variant mfc_drvdata_v8 = {
> +static const struct s5p_mfc_variant mfc_drvdata_v8 = {
>  	.version	= MFC_VERSION_V8,
>  	.version_bit	= MFC_V8_BIT,
>  	.port_num	= MFC_NUM_PORTS_V8,
> @@ -1627,7 +1627,7 @@ static struct s5p_mfc_variant mfc_drvdata_v8 = {
>  	.num_clocks	= 1,
>  };
> 
> -static struct s5p_mfc_variant mfc_drvdata_v8_5433 = {
> +static const struct s5p_mfc_variant mfc_drvdata_v8_5433 = {
>  	.version	= MFC_VERSION_V8,
>  	.version_bit	= MFC_V8_BIT,
>  	.port_num	= MFC_NUM_PORTS_V8,
> @@ -1652,7 +1652,7 @@ static const struct s5p_mfc_buf_size buf_size_v10
> = {
>  	.priv   = &mfc_buf_size_v10,
>  };
> 
> -static struct s5p_mfc_variant mfc_drvdata_v10 = {
> +static const struct s5p_mfc_variant mfc_drvdata_v10 = {
>  	.version        = MFC_VERSION_V10,
>  	.version_bit    = MFC_V10_BIT,
>  	.port_num       = MFC_NUM_PORTS_V10,
> 
> --
> 2.34.1

Reviewed-by: Aakarsh Jain <aakarsh.jain@...sung.com>

Thanks!


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ