[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2202091232550.52266@hadrien>
Date: Wed, 9 Feb 2022 12:35:20 +0100 (CET)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Amit Kumar Mahapatra <amit.kumar-mahapatra@...inx.com>,
Michal Simek <monstr@...str.eu>,
Tudor Ambarus <tudor.ambarus@...rochip.com>,
Michael Walle <michael@...le.cc>,
Pratyush Yadav <p.yadav@...com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>
cc: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
kbuild-all@...ts.01.org, linux-arm-kernel@...ts.infradead.org
Subject: [PATCH] mtd: spi-nor: fix minmax.cocci warnings
From: kernel test robot <lkp@...el.com>
Simplify the cide using min().
Generated by: scripts/coccinelle/misc/minmax.cocci
Fixes: 2747bc2106aa ("mtd: spi-nor: Add dual parallel and stacked mode support")
CC: Amit Kumar Mahapatra <amit.kumar-mahapatra@...inx.com>
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: kernel test robot <lkp@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...ia.fr>
---
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
head: 1183ce490adb103e5e569b8ebd74c50c885ddc05
commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/872] mtd: spi-nor: Add dual parallel and stacked mode support
:::::: branch date: 7 days ago
:::::: commit date: 7 days ago
core.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -2034,10 +2034,7 @@ static int spi_nor_read(struct mtd_info
(offset << nor->shift);
}
}
- if (len < rem_bank_len)
- read_len = len;
- else
- read_len = rem_bank_len;
+ read_len = min(len, rem_bank_len);
/* Wait till previous write/erase is done. */
ret = spi_nor_wait_till_ready(nor);
Powered by blists - more mailing lists