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: <ZvbTmwuW1maXdWY5@lizhi-Precision-Tower-5810>
Date: Fri, 27 Sep 2024 11:47:39 -0400
From: Frank Li <Frank.li@....com>
To: Hardevsinh Palaniya <hardevsinh.palaniya@...iconsignals.io>
Cc: linux-spi@...r.kernel.org, olteanv@...il.com, broonie@...nel.org,
	Han Xu <han.xu@....com>, Shawn Guo <shawnguo@...nel.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Pengutronix Kernel Team <kernel@...gutronix.de>,
	Fabio Estevam <festevam@...il.com>, Haibo Chen <haibo.chen@....com>,
	Yogesh Gaur <yogeshgaur.83@...il.com>, imx@...ts.linux.dev,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 4/4] spi: spi-nxp-fspi: Fix casting warnings

On Fri, Sep 27, 2024 at 06:58:35PM +0530, Hardevsinh Palaniya wrote:
> Sparse warnings:
>
> drivers/spi/spi-nxp-fspi.c:512:25: warning: cast from restricted __be32
>
> Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@...iconsignals.io>
> ---
>  drivers/spi/spi-nxp-fspi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c
> index 6585b19a4866..f602bfd11426 100644
> --- a/drivers/spi/spi-nxp-fspi.c
> +++ b/drivers/spi/spi-nxp-fspi.c
> @@ -509,7 +509,7 @@ static int fspi_readl_poll_tout(struct nxp_fspi *f, void __iomem *base,
>  	u32 reg;
>
>  	if (!f->devtype_data->little_endian)
> -		mask = (u32)cpu_to_be32(mask);
> +		mask = (__force u32)cpu_to_be32(mask);

See patch 2's comments.

Frank

>
>  	if (c)
>  		return readl_poll_timeout(base, reg, (reg & mask),
> --
> 2.43.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ