* drivers/mtd/spi-nor/core.c:1550 spi_nor_get_min_prot_length_sr() warn: should 'nor->info->sector_size << (bp_slots_needed - bp_slots)' be a 64 bit
@ 2020-07-31 22:00 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-07-31 22:00 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3462 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Jungseung Lee <js07.lee@samsung.com>
CC: Tudor Ambarus <tudor.ambarus@microchip.com>
CC: Michael Walle <michael@walle.cc>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: deacdb3e3979979016fcd0ffd518c320a62ad166
commit: 2d284768b49bcf1c643c08a201ff2161041178ef mtd: spi-nor: Add generic formula for SR block protection handling
date: 4 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 4 months ago
config: h8300-randconfig-m031-20200731 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/mtd/spi-nor/core.c:1550 spi_nor_get_min_prot_length_sr() warn: should 'nor->info->sector_size << (bp_slots_needed - bp_slots)' be a 64 bit type?
Old smatch warnings:
drivers/mtd/spi-nor/core.c:1356 spi_nor_init_erase_cmd_list() warn: passing a valid pointer to 'PTR_ERR'
drivers/mtd/spi-nor/core.c:1369 spi_nor_init_erase_cmd_list() warn: passing a valid pointer to 'PTR_ERR'
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2d284768b49bcf1c643c08a201ff2161041178ef
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 2d284768b49bcf1c643c08a201ff2161041178ef
vim +1550 drivers/mtd/spi-nor/core.c
b199489d37b21c5 drivers/mtd/spi-nor/spi-nor.c Huang Shijie 2014-02-24 1538
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1539 static u64 spi_nor_get_min_prot_length_sr(struct spi_nor *nor)
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1540 {
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1541 unsigned int bp_slots, bp_slots_needed;
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1542 u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1543
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1544 /* Reserved one for "protect none" and one for "protect all". */
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1545 bp_slots = (mask >> SR_BP_SHIFT) + 1 - 2;
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1546 bp_slots_needed = ilog2(nor->info->n_sectors);
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1547
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1548 if (bp_slots_needed > bp_slots)
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1549 return nor->info->sector_size <<
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 @1550 (bp_slots_needed - bp_slots);
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1551 else
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1552 return nor->info->sector_size;
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1553 }
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1554
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28888 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* drivers/mtd/spi-nor/core.c:1550 spi_nor_get_min_prot_length_sr() warn: should 'nor->info->sector_size << (bp_slots_needed - bp_slots)' be a 64 bit
@ 2020-08-01 20:44 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-08-01 20:44 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3445 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Jungseung Lee <js07.lee@samsung.com>
CC: Tudor Ambarus <tudor.ambarus@microchip.com>
CC: Michael Walle <michael@walle.cc>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d52daa8620c65960e1ef882adc1f92061326bd7a
commit: 2d284768b49bcf1c643c08a201ff2161041178ef mtd: spi-nor: Add generic formula for SR block protection handling
date: 4 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 4 months ago
config: h8300-randconfig-m031-20200731 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/mtd/spi-nor/core.c:1550 spi_nor_get_min_prot_length_sr() warn: should 'nor->info->sector_size << (bp_slots_needed - bp_slots)' be a 64 bit type?
Old smatch warnings:
drivers/mtd/spi-nor/core.c:1356 spi_nor_init_erase_cmd_list() warn: passing a valid pointer to 'PTR_ERR'
drivers/mtd/spi-nor/core.c:1369 spi_nor_init_erase_cmd_list() warn: passing a valid pointer to 'PTR_ERR'
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2d284768b49bcf1c643c08a201ff2161041178ef
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 2d284768b49bcf1c643c08a201ff2161041178ef
vim +1550 drivers/mtd/spi-nor/core.c
b199489d37b21c drivers/mtd/spi-nor/spi-nor.c Huang Shijie 2014-02-24 1538
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1539 static u64 spi_nor_get_min_prot_length_sr(struct spi_nor *nor)
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1540 {
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1541 unsigned int bp_slots, bp_slots_needed;
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1542 u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1543
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1544 /* Reserved one for "protect none" and one for "protect all". */
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1545 bp_slots = (mask >> SR_BP_SHIFT) + 1 - 2;
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1546 bp_slots_needed = ilog2(nor->info->n_sectors);
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1547
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1548 if (bp_slots_needed > bp_slots)
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1549 return nor->info->sector_size <<
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 @1550 (bp_slots_needed - bp_slots);
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1551 else
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1552 return nor->info->sector_size;
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1553 }
2d284768b49bcf drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1554
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28888 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-01 20:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-31 22:00 drivers/mtd/spi-nor/core.c:1550 spi_nor_get_min_prot_length_sr() warn: should 'nor->info->sector_size << (bp_slots_needed - bp_slots)' be a 64 bit kernel test robot
2020-08-01 20:44 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.