[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<DU0PR04MB9496C6F0C4EA217BE99914B690942@DU0PR04MB9496.eurprd04.prod.outlook.com>
Date: Tue, 27 Aug 2024 09:30:25 +0000
From: Bough Chen <haibo.chen@....com>
To: Yan Zhen <yanzhen@...o.com>, Han Xu <han.xu@....com>, "broonie@...nel.org"
<broonie@...nel.org>
CC: "yogeshgaur.83@...il.com" <yogeshgaur.83@...il.com>,
"linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"opensource.kernel@...o.com" <opensource.kernel@...o.com>
Subject: RE: [PATCH v1] spi: nxp-fspi: Use min macro
> -----Original Message-----
> From: Yan Zhen <yanzhen@...o.com>
> Sent: 2024年8月27日 16:58
> To: Han Xu <han.xu@....com>; Bough Chen <haibo.chen@....com>;
> broonie@...nel.org
> Cc: yogeshgaur.83@...il.com; linux-spi@...r.kernel.org;
> linux-kernel@...r.kernel.org; opensource.kernel@...o.com; Yan Zhen
> <yanzhen@...o.com>
> Subject: [PATCH v1] spi: nxp-fspi: Use min macro
>
> When the original file is guaranteed to contain the minmax.h header file and
> compile correctly, using the real macro is usually more intuitive and readable.
>
> Signed-off-by: Yan Zhen <yanzhen@...o.com>
> ---
> drivers/spi/spi-nxp-fspi.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c index
> 88397f712a3b..fda902aa5815 100644
> --- a/drivers/spi/spi-nxp-fspi.c
> +++ b/drivers/spi/spi-nxp-fspi.c
> @@ -756,8 +756,7 @@ static int nxp_fspi_read_ahb(struct nxp_fspi *f, const
> struct spi_mem_op *op)
> iounmap(f->ahb_addr);
>
> f->memmap_start = start;
> - f->memmap_len = len > NXP_FSPI_MIN_IOMAP ?
> - len : NXP_FSPI_MIN_IOMAP;
> + f->memmap_len = max(len, NXP_FSPI_MIN_IOMAP);
Reviewed-by: Haibo Chen <haibo.chen@....com>
Thanks!
Haibo Chen
>
> f->ahb_addr = ioremap(f->memmap_phy + f->memmap_start,
> f->memmap_len);
> --
> 2.34.1
Powered by blists - more mailing lists