* [PATCH] mtd: spi-nor: fix minmax.cocci warnings
2022-02-08 21:07 [xilinx-xlnx:xlnx_rebase_v5.15 840/872] drivers/mtd/spi-nor/core.c:2037:10-11: WARNING opportunity for min() kernel test robot
@ 2022-02-08 21:06 ` kernel test robot
0 siblings, 0 replies; 19+ messages in thread
From: kernel test robot @ 2022-02-08 21:06 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1948 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-arm-kernel(a)lists.infradead.org
TO: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>
CC: Michal Simek <monstr@monstr.eu>
CC: Tudor Ambarus <tudor.ambarus@microchip.com>
CC: Michael Walle <michael@walle.cc>
CC: Pratyush Yadav <p.yadav@ti.com>
CC: Miquel Raynal <miquel.raynal@bootlin.com>
CC: Richard Weinberger <richard@nod.at>
CC: Vignesh Raghavendra <vigneshr@ti.com>
CC: linux-mtd(a)lists.infradead.org
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
drivers/mtd/spi-nor/core.c:2037:10-11: WARNING opportunity for min()
Check for opencoded min(), max() implementations.
Generated patches sometimes require adding a cast to fix compile warning.
Warnings/patches scope intentionally limited to a function body.
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@xilinx.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
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
Please take the patch only if it's a positive warning. Thanks!
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);
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] mtd: spi-nor: fix minmax.cocci warnings
@ 2022-02-09 11:35 ` Julia Lawall
0 siblings, 0 replies; 19+ messages in thread
From: Julia Lawall @ 2022-02-09 11:35 UTC (permalink / raw)
To: Amit Kumar Mahapatra, Michal Simek, Tudor Ambarus, Michael Walle,
Pratyush Yadav, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra
Cc: linux-mtd, linux-kernel, kbuild-all, linux-arm-kernel
From: kernel test robot <lkp@intel.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@xilinx.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.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);
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] mtd: spi-nor: fix minmax.cocci warnings
@ 2022-02-09 11:35 ` Julia Lawall
0 siblings, 0 replies; 19+ messages in thread
From: Julia Lawall @ 2022-02-09 11:35 UTC (permalink / raw)
To: Amit Kumar Mahapatra, Michal Simek, Tudor Ambarus, Michael Walle,
Pratyush Yadav, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra
Cc: linux-mtd, linux-kernel, kbuild-all, linux-arm-kernel
From: kernel test robot <lkp@intel.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@xilinx.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.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);
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] mtd: spi-nor: fix minmax.cocci warnings
@ 2022-02-09 11:35 ` Julia Lawall
0 siblings, 0 replies; 19+ messages in thread
From: Julia Lawall @ 2022-02-09 11:35 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]
From: kernel test robot <lkp@intel.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@xilinx.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.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);
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] mtd: spi-nor: fix minmax.cocci warnings
@ 2022-02-09 11:35 ` Julia Lawall
0 siblings, 0 replies; 19+ messages in thread
From: Julia Lawall @ 2022-02-09 11:35 UTC (permalink / raw)
To: Amit Kumar Mahapatra, Michal Simek, Tudor Ambarus, Michael Walle,
Pratyush Yadav, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra
Cc: linux-mtd, linux-kernel, kbuild-all, linux-arm-kernel
From: kernel test robot <lkp@intel.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@xilinx.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.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);
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] mtd: spi-nor: fix minmax.cocci warnings
2022-03-26 0:27 [xilinx-xlnx:xlnx_rebase_v5.15_LTS 840/1029] drivers/mtd/spi-nor/core.c:2037:10-11: WARNING opportunity for min() kernel test robot
@ 2022-03-26 0:18 ` kernel test robot
0 siblings, 0 replies; 19+ messages in thread
From: kernel test robot @ 2022-03-26 0:18 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1998 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-arm-kernel(a)lists.infradead.org
TO: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>
CC: Michal Simek <monstr@monstr.eu>
CC: Tudor Ambarus <tudor.ambarus@microchip.com>
CC: Michael Walle <michael@walle.cc>
CC: Pratyush Yadav <p.yadav@ti.com>
CC: Miquel Raynal <miquel.raynal@bootlin.com>
CC: Richard Weinberger <richard@nod.at>
CC: Vignesh Raghavendra <vigneshr@ti.com>
CC: linux-mtd(a)lists.infradead.org
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
drivers/mtd/spi-nor/core.c:2037:10-11: WARNING opportunity for min()
Check for opencoded min(), max() implementations.
Generated patches sometimes require adding a cast to fix compile warning.
Warnings/patches scope intentionally limited to a function body.
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@xilinx.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
head: 1870e0fa79a9d58c6748c34550f3ccea0b515933
commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/1029] mtd: spi-nor: Add dual parallel and stacked mode support
:::::: branch date: 34 hours ago
:::::: commit date: 8 weeks ago
Please take the patch only if it's a positive warning. Thanks!
drivers/mtd/spi-nor/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);
^ permalink raw reply [flat|nested] 19+ messages in thread
* [xilinx-xlnx:xlnx_rebase_v5.15_LTS 840/1029] drivers/mtd/spi-nor/core.c:2037:10-11: WARNING opportunity for min()
@ 2022-03-26 0:27 kernel test robot
2022-03-26 0:18 ` [PATCH] mtd: spi-nor: fix minmax.cocci warnings kernel test robot
0 siblings, 1 reply; 19+ messages in thread
From: kernel test robot @ 2022-03-26 0:27 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1068 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-arm-kernel(a)lists.infradead.org
TO: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>
CC: Michal Simek <monstr@monstr.eu>
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
head: 1870e0fa79a9d58c6748c34550f3ccea0b515933
commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/1029] mtd: spi-nor: Add dual parallel and stacked mode support
:::::: branch date: 34 hours ago
:::::: commit date: 8 weeks ago
config: sparc-randconfig-c024-20220324 (https://download.01.org/0day-ci/archive/20220326/202203260808.cODP9Z29-lkp(a)intel.com/config)
compiler: sparc-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> drivers/mtd/spi-nor/core.c:2037:10-11: WARNING opportunity for min()
Please review and possibly fold the followup patch.
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] mtd: spi-nor: fix minmax.cocci warnings
@ 2022-03-26 8:30 ` Julia Lawall
0 siblings, 0 replies; 19+ messages in thread
From: Julia Lawall @ 2022-03-26 8:30 UTC (permalink / raw)
To: kbuild-all, linux-arm-kernel, Amit Kumar Mahapatra, Michal Simek,
Tudor Ambarus, Michael Walle, Pratyush Yadav, Miquel Raynal,
Richard Weinberger, Vignesh Raghavendra, linux-mtd, linux-kernel
From: kernel test robot <lkp@intel.com>
Use min to simplify the code.
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@xilinx.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
head: 1870e0fa79a9d58c6748c34550f3ccea0b515933
commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/1029] mtd: spi-nor: Add dual parallel and stacked mode support
:::::: branch date: 34 hours ago
:::::: commit date: 8 weeks ago
drivers/mtd/spi-nor/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);
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] mtd: spi-nor: fix minmax.cocci warnings
@ 2022-03-26 8:30 ` Julia Lawall
0 siblings, 0 replies; 19+ messages in thread
From: Julia Lawall @ 2022-03-26 8:30 UTC (permalink / raw)
To: kbuild-all, linux-arm-kernel, Amit Kumar Mahapatra, Michal Simek,
Tudor Ambarus, Michael Walle, Pratyush Yadav, Miquel Raynal,
Richard Weinberger, Vignesh Raghavendra, linux-mtd, linux-kernel
From: kernel test robot <lkp@intel.com>
Use min to simplify the code.
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@xilinx.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
head: 1870e0fa79a9d58c6748c34550f3ccea0b515933
commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/1029] mtd: spi-nor: Add dual parallel and stacked mode support
:::::: branch date: 34 hours ago
:::::: commit date: 8 weeks ago
drivers/mtd/spi-nor/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);
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] mtd: spi-nor: fix minmax.cocci warnings
@ 2022-03-26 8:30 ` Julia Lawall
0 siblings, 0 replies; 19+ messages in thread
From: Julia Lawall @ 2022-03-26 8:30 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]
From: kernel test robot <lkp@intel.com>
Use min to simplify the code.
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@xilinx.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
head: 1870e0fa79a9d58c6748c34550f3ccea0b515933
commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/1029] mtd: spi-nor: Add dual parallel and stacked mode support
:::::: branch date: 34 hours ago
:::::: commit date: 8 weeks ago
drivers/mtd/spi-nor/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);
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] mtd: spi-nor: fix minmax.cocci warnings
@ 2022-03-26 8:30 ` Julia Lawall
0 siblings, 0 replies; 19+ messages in thread
From: Julia Lawall @ 2022-03-26 8:30 UTC (permalink / raw)
To: kbuild-all, linux-arm-kernel, Amit Kumar Mahapatra, Michal Simek,
Tudor Ambarus, Michael Walle, Pratyush Yadav, Miquel Raynal,
Richard Weinberger, Vignesh Raghavendra, linux-mtd, linux-kernel
From: kernel test robot <lkp@intel.com>
Use min to simplify the code.
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@xilinx.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
head: 1870e0fa79a9d58c6748c34550f3ccea0b515933
commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/1029] mtd: spi-nor: Add dual parallel and stacked mode support
:::::: branch date: 34 hours ago
:::::: commit date: 8 weeks ago
drivers/mtd/spi-nor/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);
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] mtd: spi-nor: fix minmax.cocci warnings
2022-03-26 8:30 ` Julia Lawall
(?)
(?)
@ 2022-03-28 5:58 ` Vignesh Raghavendra
-1 siblings, 0 replies; 19+ messages in thread
From: Vignesh Raghavendra @ 2022-03-28 5:58 UTC (permalink / raw)
To: Julia Lawall, kbuild-all, linux-arm-kernel, Amit Kumar Mahapatra,
Michal Simek, Tudor Ambarus, Michael Walle, Pratyush Yadav,
Miquel Raynal, Richard Weinberger, linux-mtd, linux-kernel
Hi.
On 26/03/22 2:00 pm, Julia Lawall wrote:
> From: kernel test robot <lkp@intel.com>
>
> Use min to simplify the code.
>
> 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@xilinx.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> ---
>
> tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
> head: 1870e0fa79a9d58c6748c34550f3ccea0b515933
> commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/1029] mtd: spi-nor: Add dual parallel and stacked mode support
> :::::: branch date: 34 hours ago
> :::::: commit date: 8 weeks ago
>
> drivers/mtd/spi-nor/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);
This chunk does not exist in mainline. Seems like xlnx local changes.
Regards
Vignesh
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] mtd: spi-nor: fix minmax.cocci warnings
@ 2022-03-28 5:58 ` Vignesh Raghavendra
0 siblings, 0 replies; 19+ messages in thread
From: Vignesh Raghavendra @ 2022-03-28 5:58 UTC (permalink / raw)
To: Julia Lawall, kbuild-all, linux-arm-kernel, Amit Kumar Mahapatra,
Michal Simek, Tudor Ambarus, Michael Walle, Pratyush Yadav,
Miquel Raynal, Richard Weinberger, linux-mtd, linux-kernel
Hi.
On 26/03/22 2:00 pm, Julia Lawall wrote:
> From: kernel test robot <lkp@intel.com>
>
> Use min to simplify the code.
>
> 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@xilinx.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> ---
>
> tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
> head: 1870e0fa79a9d58c6748c34550f3ccea0b515933
> commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/1029] mtd: spi-nor: Add dual parallel and stacked mode support
> :::::: branch date: 34 hours ago
> :::::: commit date: 8 weeks ago
>
> drivers/mtd/spi-nor/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);
This chunk does not exist in mainline. Seems like xlnx local changes.
Regards
Vignesh
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] mtd: spi-nor: fix minmax.cocci warnings
@ 2022-03-28 5:58 ` Vignesh Raghavendra
0 siblings, 0 replies; 19+ messages in thread
From: Vignesh Raghavendra @ 2022-03-28 5:58 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]
Hi.
On 26/03/22 2:00 pm, Julia Lawall wrote:
> From: kernel test robot <lkp@intel.com>
>
> Use min to simplify the code.
>
> 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@xilinx.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> ---
>
> tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
> head: 1870e0fa79a9d58c6748c34550f3ccea0b515933
> commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/1029] mtd: spi-nor: Add dual parallel and stacked mode support
> :::::: branch date: 34 hours ago
> :::::: commit date: 8 weeks ago
>
> drivers/mtd/spi-nor/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);
This chunk does not exist in mainline. Seems like xlnx local changes.
Regards
Vignesh
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] mtd: spi-nor: fix minmax.cocci warnings
@ 2022-03-28 5:58 ` Vignesh Raghavendra
0 siblings, 0 replies; 19+ messages in thread
From: Vignesh Raghavendra @ 2022-03-28 5:58 UTC (permalink / raw)
To: Julia Lawall, kbuild-all, linux-arm-kernel, Amit Kumar Mahapatra,
Michal Simek, Tudor Ambarus, Michael Walle, Pratyush Yadav,
Miquel Raynal, Richard Weinberger, linux-mtd, linux-kernel
Hi.
On 26/03/22 2:00 pm, Julia Lawall wrote:
> From: kernel test robot <lkp@intel.com>
>
> Use min to simplify the code.
>
> 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@xilinx.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> ---
>
> tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
> head: 1870e0fa79a9d58c6748c34550f3ccea0b515933
> commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/1029] mtd: spi-nor: Add dual parallel and stacked mode support
> :::::: branch date: 34 hours ago
> :::::: commit date: 8 weeks ago
>
> drivers/mtd/spi-nor/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);
This chunk does not exist in mainline. Seems like xlnx local changes.
Regards
Vignesh
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] mtd: spi-nor: fix minmax.cocci warnings
2022-03-28 5:58 ` Vignesh Raghavendra
(?)
(?)
@ 2022-03-29 11:38 ` Pratyush Yadav
-1 siblings, 0 replies; 19+ messages in thread
From: Pratyush Yadav @ 2022-03-29 11:38 UTC (permalink / raw)
To: Vignesh Raghavendra
Cc: Julia Lawall, kbuild-all, linux-arm-kernel, Amit Kumar Mahapatra,
Michal Simek, Tudor Ambarus, Michael Walle, Miquel Raynal,
Richard Weinberger, linux-mtd, linux-kernel
On 28/03/22 11:28AM, Vignesh Raghavendra wrote:
> Hi.
>
> On 26/03/22 2:00 pm, Julia Lawall wrote:
> > From: kernel test robot <lkp@intel.com>
> >
> > Use min to simplify the code.
> >
> > 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@xilinx.com>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> > ---
> >
> > tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
> > head: 1870e0fa79a9d58c6748c34550f3ccea0b515933
> > commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/1029] mtd: spi-nor: Add dual parallel and stacked mode support
> > :::::: branch date: 34 hours ago
> > :::::: commit date: 8 weeks ago
> >
> > drivers/mtd/spi-nor/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);
>
> This chunk does not exist in mainline. Seems like xlnx local changes.
Yes. I was very confused for a bit until I realized. It would be nice if
upstream maintainers and mailing lists were not Cced if the patch does
not target the mainline branch.
--
Regards,
Pratyush Yadav
Texas Instruments Inc.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] mtd: spi-nor: fix minmax.cocci warnings
@ 2022-03-29 11:38 ` Pratyush Yadav
0 siblings, 0 replies; 19+ messages in thread
From: Pratyush Yadav @ 2022-03-29 11:38 UTC (permalink / raw)
To: Vignesh Raghavendra
Cc: Julia Lawall, kbuild-all, linux-arm-kernel, Amit Kumar Mahapatra,
Michal Simek, Tudor Ambarus, Michael Walle, Miquel Raynal,
Richard Weinberger, linux-mtd, linux-kernel
On 28/03/22 11:28AM, Vignesh Raghavendra wrote:
> Hi.
>
> On 26/03/22 2:00 pm, Julia Lawall wrote:
> > From: kernel test robot <lkp@intel.com>
> >
> > Use min to simplify the code.
> >
> > 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@xilinx.com>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> > ---
> >
> > tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
> > head: 1870e0fa79a9d58c6748c34550f3ccea0b515933
> > commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/1029] mtd: spi-nor: Add dual parallel and stacked mode support
> > :::::: branch date: 34 hours ago
> > :::::: commit date: 8 weeks ago
> >
> > drivers/mtd/spi-nor/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);
>
> This chunk does not exist in mainline. Seems like xlnx local changes.
Yes. I was very confused for a bit until I realized. It would be nice if
upstream maintainers and mailing lists were not Cced if the patch does
not target the mainline branch.
--
Regards,
Pratyush Yadav
Texas Instruments Inc.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] mtd: spi-nor: fix minmax.cocci warnings
@ 2022-03-29 11:38 ` Pratyush Yadav
0 siblings, 0 replies; 19+ messages in thread
From: Pratyush Yadav @ 2022-03-29 11:38 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1683 bytes --]
On 28/03/22 11:28AM, Vignesh Raghavendra wrote:
> Hi.
>
> On 26/03/22 2:00 pm, Julia Lawall wrote:
> > From: kernel test robot <lkp@intel.com>
> >
> > Use min to simplify the code.
> >
> > 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@xilinx.com>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> > ---
> >
> > tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
> > head: 1870e0fa79a9d58c6748c34550f3ccea0b515933
> > commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/1029] mtd: spi-nor: Add dual parallel and stacked mode support
> > :::::: branch date: 34 hours ago
> > :::::: commit date: 8 weeks ago
> >
> > drivers/mtd/spi-nor/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);
>
> This chunk does not exist in mainline. Seems like xlnx local changes.
Yes. I was very confused for a bit until I realized. It would be nice if
upstream maintainers and mailing lists were not Cced if the patch does
not target the mainline branch.
--
Regards,
Pratyush Yadav
Texas Instruments Inc.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] mtd: spi-nor: fix minmax.cocci warnings
@ 2022-03-29 11:38 ` Pratyush Yadav
0 siblings, 0 replies; 19+ messages in thread
From: Pratyush Yadav @ 2022-03-29 11:38 UTC (permalink / raw)
To: Vignesh Raghavendra
Cc: Julia Lawall, kbuild-all, linux-arm-kernel, Amit Kumar Mahapatra,
Michal Simek, Tudor Ambarus, Michael Walle, Miquel Raynal,
Richard Weinberger, linux-mtd, linux-kernel
On 28/03/22 11:28AM, Vignesh Raghavendra wrote:
> Hi.
>
> On 26/03/22 2:00 pm, Julia Lawall wrote:
> > From: kernel test robot <lkp@intel.com>
> >
> > Use min to simplify the code.
> >
> > 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@xilinx.com>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> > ---
> >
> > tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
> > head: 1870e0fa79a9d58c6748c34550f3ccea0b515933
> > commit: 2747bc2106aa429773d9a932c799aa6229595148 [840/1029] mtd: spi-nor: Add dual parallel and stacked mode support
> > :::::: branch date: 34 hours ago
> > :::::: commit date: 8 weeks ago
> >
> > drivers/mtd/spi-nor/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);
>
> This chunk does not exist in mainline. Seems like xlnx local changes.
Yes. I was very confused for a bit until I realized. It would be nice if
upstream maintainers and mailing lists were not Cced if the patch does
not target the mainline branch.
--
Regards,
Pratyush Yadav
Texas Instruments Inc.
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2022-03-29 11:40 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-26 0:27 [xilinx-xlnx:xlnx_rebase_v5.15_LTS 840/1029] drivers/mtd/spi-nor/core.c:2037:10-11: WARNING opportunity for min() kernel test robot
2022-03-26 0:18 ` [PATCH] mtd: spi-nor: fix minmax.cocci warnings kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-03-26 8:30 Julia Lawall
2022-03-26 8:30 ` Julia Lawall
2022-03-26 8:30 ` Julia Lawall
2022-03-26 8:30 ` Julia Lawall
2022-03-28 5:58 ` Vignesh Raghavendra
2022-03-28 5:58 ` Vignesh Raghavendra
2022-03-28 5:58 ` Vignesh Raghavendra
2022-03-28 5:58 ` Vignesh Raghavendra
2022-03-29 11:38 ` Pratyush Yadav
2022-03-29 11:38 ` Pratyush Yadav
2022-03-29 11:38 ` Pratyush Yadav
2022-03-29 11:38 ` Pratyush Yadav
2022-02-09 11:35 Julia Lawall
2022-02-09 11:35 ` Julia Lawall
2022-02-09 11:35 ` Julia Lawall
2022-02-09 11:35 ` Julia Lawall
2022-02-08 21:07 [xilinx-xlnx:xlnx_rebase_v5.15 840/872] drivers/mtd/spi-nor/core.c:2037:10-11: WARNING opportunity for min() kernel test robot
2022-02-08 21:06 ` [PATCH] mtd: spi-nor: fix minmax.cocci warnings kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.