All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?
@ 2021-09-14  9:57 ` Dan Carpenter
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2021-09-12  6:29 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3186 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Rafał Miłecki" <rafal@milecki.pl>
CC: Miquel Raynal <miquel.raynal@bootlin.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   78e709522d2c012cb0daad2e668506637bffb7c2
commit: bb17230c61a6424b622e92006ec52ba23aa5a967 mtd: parsers: ofpart: support BCM4908 fixed partitions
date:   6 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 6 months ago
config: parisc-randconfig-m031-20210912 (attached as .config)
compiler: hppa-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: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?

vim +41 drivers/mtd/parsers/ofpart_bcm4908.c

bb17230c61a6424b Rafał Miłecki 2021-03-01  16  
bb17230c61a6424b Rafał Miłecki 2021-03-01  17  static long long bcm4908_partitions_fw_offset(void)
bb17230c61a6424b Rafał Miłecki 2021-03-01  18  {
bb17230c61a6424b Rafał Miłecki 2021-03-01  19  	struct device_node *root;
bb17230c61a6424b Rafał Miłecki 2021-03-01  20  	struct property *prop;
bb17230c61a6424b Rafał Miłecki 2021-03-01  21  	const char *s;
bb17230c61a6424b Rafał Miłecki 2021-03-01  22  
bb17230c61a6424b Rafał Miłecki 2021-03-01  23  	root = of_find_node_by_path("/");
bb17230c61a6424b Rafał Miłecki 2021-03-01  24  	if (!root)
bb17230c61a6424b Rafał Miłecki 2021-03-01  25  		return -ENOENT;
bb17230c61a6424b Rafał Miłecki 2021-03-01  26  
bb17230c61a6424b Rafał Miłecki 2021-03-01  27  	of_property_for_each_string(root, "brcm_blparms", prop, s) {
bb17230c61a6424b Rafał Miłecki 2021-03-01  28  		size_t len = strlen(BLPARAMS_FW_OFFSET);
bb17230c61a6424b Rafał Miłecki 2021-03-01  29  		unsigned long offset;
bb17230c61a6424b Rafał Miłecki 2021-03-01  30  		int err;
bb17230c61a6424b Rafał Miłecki 2021-03-01  31  
bb17230c61a6424b Rafał Miłecki 2021-03-01  32  		if (strncmp(s, BLPARAMS_FW_OFFSET, len) || s[len] != '=')
bb17230c61a6424b Rafał Miłecki 2021-03-01  33  			continue;
bb17230c61a6424b Rafał Miłecki 2021-03-01  34  
bb17230c61a6424b Rafał Miłecki 2021-03-01  35  		err = kstrtoul(s + len + 1, 0, &offset);
bb17230c61a6424b Rafał Miłecki 2021-03-01  36  		if (err) {
bb17230c61a6424b Rafał Miłecki 2021-03-01  37  			pr_err("failed to parse %s\n", s + len + 1);
bb17230c61a6424b Rafał Miłecki 2021-03-01  38  			return err;
bb17230c61a6424b Rafał Miłecki 2021-03-01  39  		}
bb17230c61a6424b Rafał Miłecki 2021-03-01  40  
bb17230c61a6424b Rafał Miłecki 2021-03-01 @41  		return offset << 10;
bb17230c61a6424b Rafał Miłecki 2021-03-01  42  	}
bb17230c61a6424b Rafał Miłecki 2021-03-01  43  
bb17230c61a6424b Rafał Miłecki 2021-03-01  44  	return -ENOENT;
bb17230c61a6424b Rafał Miłecki 2021-03-01  45  }
bb17230c61a6424b Rafał Miłecki 2021-03-01  46  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27019 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?
@ 2021-09-14  9:57 ` Dan Carpenter
  0 siblings, 0 replies; 12+ messages in thread
From: Dan Carpenter @ 2021-09-14  9:57 UTC (permalink / raw)
  To: kbuild, Rafał Miłecki
  Cc: lkp, kbuild-all, linux-kernel, Miquel Raynal

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   78e709522d2c012cb0daad2e668506637bffb7c2
commit: bb17230c61a6424b622e92006ec52ba23aa5a967 mtd: parsers: ofpart: support BCM4908 fixed partitions
config: parisc-randconfig-m031-20210912 (attached as .config)
compiler: hppa-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: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?

vim +41 drivers/mtd/parsers/ofpart_bcm4908.c

bb17230c61a6424b Rafał Miłecki 2021-03-01  17  static long long bcm4908_partitions_fw_offset(void)
bb17230c61a6424b Rafał Miłecki 2021-03-01  18  {
bb17230c61a6424b Rafał Miłecki 2021-03-01  19  	struct device_node *root;
bb17230c61a6424b Rafał Miłecki 2021-03-01  20  	struct property *prop;
bb17230c61a6424b Rafał Miłecki 2021-03-01  21  	const char *s;
bb17230c61a6424b Rafał Miłecki 2021-03-01  22  
bb17230c61a6424b Rafał Miłecki 2021-03-01  23  	root = of_find_node_by_path("/");
bb17230c61a6424b Rafał Miłecki 2021-03-01  24  	if (!root)
bb17230c61a6424b Rafał Miłecki 2021-03-01  25  		return -ENOENT;
bb17230c61a6424b Rafał Miłecki 2021-03-01  26  
bb17230c61a6424b Rafał Miłecki 2021-03-01  27  	of_property_for_each_string(root, "brcm_blparms", prop, s) {
bb17230c61a6424b Rafał Miłecki 2021-03-01  28  		size_t len = strlen(BLPARAMS_FW_OFFSET);
bb17230c61a6424b Rafał Miłecki 2021-03-01  29  		unsigned long offset;
bb17230c61a6424b Rafał Miłecki 2021-03-01  30  		int err;
bb17230c61a6424b Rafał Miłecki 2021-03-01  31  
bb17230c61a6424b Rafał Miłecki 2021-03-01  32  		if (strncmp(s, BLPARAMS_FW_OFFSET, len) || s[len] != '=')
bb17230c61a6424b Rafał Miłecki 2021-03-01  33  			continue;
bb17230c61a6424b Rafał Miłecki 2021-03-01  34  
bb17230c61a6424b Rafał Miłecki 2021-03-01  35  		err = kstrtoul(s + len + 1, 0, &offset);
bb17230c61a6424b Rafał Miłecki 2021-03-01  36  		if (err) {
bb17230c61a6424b Rafał Miłecki 2021-03-01  37  			pr_err("failed to parse %s\n", s + len + 1);
bb17230c61a6424b Rafał Miłecki 2021-03-01  38  			return err;
bb17230c61a6424b Rafał Miłecki 2021-03-01  39  		}
bb17230c61a6424b Rafał Miłecki 2021-03-01  40  
bb17230c61a6424b Rafał Miłecki 2021-03-01 @41  		return offset << 10;

There is a kind of mismatch between offset which is unsigned long and
bcm4908_partitions_fw_offset() which returns u64.

bb17230c61a6424b Rafał Miłecki 2021-03-01  42  	}
bb17230c61a6424b Rafał Miłecki 2021-03-01  43  
bb17230c61a6424b Rafał Miłecki 2021-03-01  44  	return -ENOENT;
bb17230c61a6424b Rafał Miłecki 2021-03-01  45  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


^ permalink raw reply	[flat|nested] 12+ messages in thread

* drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?
@ 2021-09-14  9:57 ` Dan Carpenter
  0 siblings, 0 replies; 12+ messages in thread
From: Dan Carpenter @ 2021-09-14  9:57 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2963 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   78e709522d2c012cb0daad2e668506637bffb7c2
commit: bb17230c61a6424b622e92006ec52ba23aa5a967 mtd: parsers: ofpart: support BCM4908 fixed partitions
config: parisc-randconfig-m031-20210912 (attached as .config)
compiler: hppa-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: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?

vim +41 drivers/mtd/parsers/ofpart_bcm4908.c

bb17230c61a6424b Rafał Miłecki 2021-03-01  17  static long long bcm4908_partitions_fw_offset(void)
bb17230c61a6424b Rafał Miłecki 2021-03-01  18  {
bb17230c61a6424b Rafał Miłecki 2021-03-01  19  	struct device_node *root;
bb17230c61a6424b Rafał Miłecki 2021-03-01  20  	struct property *prop;
bb17230c61a6424b Rafał Miłecki 2021-03-01  21  	const char *s;
bb17230c61a6424b Rafał Miłecki 2021-03-01  22  
bb17230c61a6424b Rafał Miłecki 2021-03-01  23  	root = of_find_node_by_path("/");
bb17230c61a6424b Rafał Miłecki 2021-03-01  24  	if (!root)
bb17230c61a6424b Rafał Miłecki 2021-03-01  25  		return -ENOENT;
bb17230c61a6424b Rafał Miłecki 2021-03-01  26  
bb17230c61a6424b Rafał Miłecki 2021-03-01  27  	of_property_for_each_string(root, "brcm_blparms", prop, s) {
bb17230c61a6424b Rafał Miłecki 2021-03-01  28  		size_t len = strlen(BLPARAMS_FW_OFFSET);
bb17230c61a6424b Rafał Miłecki 2021-03-01  29  		unsigned long offset;
bb17230c61a6424b Rafał Miłecki 2021-03-01  30  		int err;
bb17230c61a6424b Rafał Miłecki 2021-03-01  31  
bb17230c61a6424b Rafał Miłecki 2021-03-01  32  		if (strncmp(s, BLPARAMS_FW_OFFSET, len) || s[len] != '=')
bb17230c61a6424b Rafał Miłecki 2021-03-01  33  			continue;
bb17230c61a6424b Rafał Miłecki 2021-03-01  34  
bb17230c61a6424b Rafał Miłecki 2021-03-01  35  		err = kstrtoul(s + len + 1, 0, &offset);
bb17230c61a6424b Rafał Miłecki 2021-03-01  36  		if (err) {
bb17230c61a6424b Rafał Miłecki 2021-03-01  37  			pr_err("failed to parse %s\n", s + len + 1);
bb17230c61a6424b Rafał Miłecki 2021-03-01  38  			return err;
bb17230c61a6424b Rafał Miłecki 2021-03-01  39  		}
bb17230c61a6424b Rafał Miłecki 2021-03-01  40  
bb17230c61a6424b Rafał Miłecki 2021-03-01 @41  		return offset << 10;

There is a kind of mismatch between offset which is unsigned long and
bcm4908_partitions_fw_offset() which returns u64.

bb17230c61a6424b Rafał Miłecki 2021-03-01  42  	}
bb17230c61a6424b Rafał Miłecki 2021-03-01  43  
bb17230c61a6424b Rafał Miłecki 2021-03-01  44  	return -ENOENT;
bb17230c61a6424b Rafał Miłecki 2021-03-01  45  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?
@ 2022-02-26  3:23 kernel test robot
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2022-02-26  3:23 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3248 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: "Rafał Miłecki" <rafal@milecki.pl>
CC: Miquel Raynal <miquel.raynal@bootlin.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   53ab78cd6d5aba25575a7cfb95729336ba9497d8
commit: bb17230c61a6424b622e92006ec52ba23aa5a967 mtd: parsers: ofpart: support BCM4908 fixed partitions
date:   12 months ago
:::::: branch date: 26 hours ago
:::::: commit date: 12 months ago
config: arc-randconfig-m031-20220226 (https://download.01.org/0day-ci/archive/20220226/202202261158.HThoJHbt-lkp(a)intel.com/config)
compiler: arceb-elf-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: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?

vim +41 drivers/mtd/parsers/ofpart_bcm4908.c

bb17230c61a6424 Rafał Miłecki 2021-03-01  16  
bb17230c61a6424 Rafał Miłecki 2021-03-01  17  static long long bcm4908_partitions_fw_offset(void)
bb17230c61a6424 Rafał Miłecki 2021-03-01  18  {
bb17230c61a6424 Rafał Miłecki 2021-03-01  19  	struct device_node *root;
bb17230c61a6424 Rafał Miłecki 2021-03-01  20  	struct property *prop;
bb17230c61a6424 Rafał Miłecki 2021-03-01  21  	const char *s;
bb17230c61a6424 Rafał Miłecki 2021-03-01  22  
bb17230c61a6424 Rafał Miłecki 2021-03-01  23  	root = of_find_node_by_path("/");
bb17230c61a6424 Rafał Miłecki 2021-03-01  24  	if (!root)
bb17230c61a6424 Rafał Miłecki 2021-03-01  25  		return -ENOENT;
bb17230c61a6424 Rafał Miłecki 2021-03-01  26  
bb17230c61a6424 Rafał Miłecki 2021-03-01  27  	of_property_for_each_string(root, "brcm_blparms", prop, s) {
bb17230c61a6424 Rafał Miłecki 2021-03-01  28  		size_t len = strlen(BLPARAMS_FW_OFFSET);
bb17230c61a6424 Rafał Miłecki 2021-03-01  29  		unsigned long offset;
bb17230c61a6424 Rafał Miłecki 2021-03-01  30  		int err;
bb17230c61a6424 Rafał Miłecki 2021-03-01  31  
bb17230c61a6424 Rafał Miłecki 2021-03-01  32  		if (strncmp(s, BLPARAMS_FW_OFFSET, len) || s[len] != '=')
bb17230c61a6424 Rafał Miłecki 2021-03-01  33  			continue;
bb17230c61a6424 Rafał Miłecki 2021-03-01  34  
bb17230c61a6424 Rafał Miłecki 2021-03-01  35  		err = kstrtoul(s + len + 1, 0, &offset);
bb17230c61a6424 Rafał Miłecki 2021-03-01  36  		if (err) {
bb17230c61a6424 Rafał Miłecki 2021-03-01  37  			pr_err("failed to parse %s\n", s + len + 1);
bb17230c61a6424 Rafał Miłecki 2021-03-01  38  			return err;
bb17230c61a6424 Rafał Miłecki 2021-03-01  39  		}
bb17230c61a6424 Rafał Miłecki 2021-03-01  40  
bb17230c61a6424 Rafał Miłecki 2021-03-01 @41  		return offset << 10;
bb17230c61a6424 Rafał Miłecki 2021-03-01  42  	}
bb17230c61a6424 Rafał Miłecki 2021-03-01  43  
bb17230c61a6424 Rafał Miłecki 2021-03-01  44  	return -ENOENT;
bb17230c61a6424 Rafał Miłecki 2021-03-01  45  }
bb17230c61a6424 Rafał Miłecki 2021-03-01  46  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?
@ 2021-12-07 18:02 kernel test robot
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2021-12-07 18:02 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3197 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Rafał Miłecki" <rafal@milecki.pl>
CC: Miquel Raynal <miquel.raynal@bootlin.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cd8c917a56f20f48748dd43d9ae3caff51d5b987
commit: bb17230c61a6424b622e92006ec52ba23aa5a967 mtd: parsers: ofpart: support BCM4908 fixed partitions
date:   9 months ago
:::::: branch date: 17 hours ago
:::::: commit date: 9 months ago
config: nios2-randconfig-m031-20211202 (https://download.01.org/0day-ci/archive/20211208/202112080139.hREpRBPY-lkp(a)intel.com/config)
compiler: nios2-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: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?

vim +41 drivers/mtd/parsers/ofpart_bcm4908.c

bb17230c61a642 Rafał Miłecki 2021-03-01  16  
bb17230c61a642 Rafał Miłecki 2021-03-01  17  static long long bcm4908_partitions_fw_offset(void)
bb17230c61a642 Rafał Miłecki 2021-03-01  18  {
bb17230c61a642 Rafał Miłecki 2021-03-01  19  	struct device_node *root;
bb17230c61a642 Rafał Miłecki 2021-03-01  20  	struct property *prop;
bb17230c61a642 Rafał Miłecki 2021-03-01  21  	const char *s;
bb17230c61a642 Rafał Miłecki 2021-03-01  22  
bb17230c61a642 Rafał Miłecki 2021-03-01  23  	root = of_find_node_by_path("/");
bb17230c61a642 Rafał Miłecki 2021-03-01  24  	if (!root)
bb17230c61a642 Rafał Miłecki 2021-03-01  25  		return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  26  
bb17230c61a642 Rafał Miłecki 2021-03-01  27  	of_property_for_each_string(root, "brcm_blparms", prop, s) {
bb17230c61a642 Rafał Miłecki 2021-03-01  28  		size_t len = strlen(BLPARAMS_FW_OFFSET);
bb17230c61a642 Rafał Miłecki 2021-03-01  29  		unsigned long offset;
bb17230c61a642 Rafał Miłecki 2021-03-01  30  		int err;
bb17230c61a642 Rafał Miłecki 2021-03-01  31  
bb17230c61a642 Rafał Miłecki 2021-03-01  32  		if (strncmp(s, BLPARAMS_FW_OFFSET, len) || s[len] != '=')
bb17230c61a642 Rafał Miłecki 2021-03-01  33  			continue;
bb17230c61a642 Rafał Miłecki 2021-03-01  34  
bb17230c61a642 Rafał Miłecki 2021-03-01  35  		err = kstrtoul(s + len + 1, 0, &offset);
bb17230c61a642 Rafał Miłecki 2021-03-01  36  		if (err) {
bb17230c61a642 Rafał Miłecki 2021-03-01  37  			pr_err("failed to parse %s\n", s + len + 1);
bb17230c61a642 Rafał Miłecki 2021-03-01  38  			return err;
bb17230c61a642 Rafał Miłecki 2021-03-01  39  		}
bb17230c61a642 Rafał Miłecki 2021-03-01  40  
bb17230c61a642 Rafał Miłecki 2021-03-01 @41  		return offset << 10;
bb17230c61a642 Rafał Miłecki 2021-03-01  42  	}
bb17230c61a642 Rafał Miłecki 2021-03-01  43  
bb17230c61a642 Rafał Miłecki 2021-03-01  44  	return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  45  }
bb17230c61a642 Rafał Miłecki 2021-03-01  46  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?
@ 2021-12-06 13:18 ` Dan Carpenter
  0 siblings, 0 replies; 12+ messages in thread
From: Dan Carpenter @ 2021-12-06 13:18 UTC (permalink / raw)
  To: kbuild, Rafał Miłecki
  Cc: lkp, kbuild-all, linux-kernel, Miquel Raynal

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   5f58da2befa58edf3a70b91ed87ed9bf77f1e70e
commit: bb17230c61a6424b622e92006ec52ba23aa5a967 mtd: parsers: ofpart: support BCM4908 fixed partitions
date:   9 months ago
config: nios2-randconfig-m031-20211202 (https://download.01.org/0day-ci/archive/20211204/202112040342.AvFc4SDJ-lkp@intel.com/config)
compiler: nios2-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: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?

vim +41 drivers/mtd/parsers/ofpart_bcm4908.c

bb17230c61a642 Rafał Miłecki 2021-03-01  17  static long long bcm4908_partitions_fw_offset(void)
                                                    ^^^^^^^^^
This is long long.

bb17230c61a642 Rafał Miłecki 2021-03-01  18  {
bb17230c61a642 Rafał Miłecki 2021-03-01  19  	struct device_node *root;
bb17230c61a642 Rafał Miłecki 2021-03-01  20  	struct property *prop;
bb17230c61a642 Rafał Miłecki 2021-03-01  21  	const char *s;
bb17230c61a642 Rafał Miłecki 2021-03-01  22  
bb17230c61a642 Rafał Miłecki 2021-03-01  23  	root = of_find_node_by_path("/");
bb17230c61a642 Rafał Miłecki 2021-03-01  24  	if (!root)
bb17230c61a642 Rafał Miłecki 2021-03-01  25  		return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  26  
bb17230c61a642 Rafał Miłecki 2021-03-01  27  	of_property_for_each_string(root, "brcm_blparms", prop, s) {
bb17230c61a642 Rafał Miłecki 2021-03-01  28  		size_t len = strlen(BLPARAMS_FW_OFFSET);
bb17230c61a642 Rafał Miłecki 2021-03-01  29  		unsigned long offset;
bb17230c61a642 Rafał Miłecki 2021-03-01  30  		int err;
bb17230c61a642 Rafał Miłecki 2021-03-01  31  
bb17230c61a642 Rafał Miłecki 2021-03-01  32  		if (strncmp(s, BLPARAMS_FW_OFFSET, len) || s[len] != '=')
bb17230c61a642 Rafał Miłecki 2021-03-01  33  			continue;
bb17230c61a642 Rafał Miłecki 2021-03-01  34  
bb17230c61a642 Rafał Miłecki 2021-03-01  35  		err = kstrtoul(s + len + 1, 0, &offset);
bb17230c61a642 Rafał Miłecki 2021-03-01  36  		if (err) {
bb17230c61a642 Rafał Miłecki 2021-03-01  37  			pr_err("failed to parse %s\n", s + len + 1);
bb17230c61a642 Rafał Miłecki 2021-03-01  38  			return err;
bb17230c61a642 Rafał Miłecki 2021-03-01  39  		}
bb17230c61a642 Rafał Miłecki 2021-03-01  40  
bb17230c61a642 Rafał Miłecki 2021-03-01 @41  		return offset << 10;
                                                               ^^^^^^^^^^^^
So this should be long long.  Although 32bit systems are not really
common in real life any more...

bb17230c61a642 Rafał Miłecki 2021-03-01  42  	}
bb17230c61a642 Rafał Miłecki 2021-03-01  43  
bb17230c61a642 Rafał Miłecki 2021-03-01  44  	return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  45  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


^ permalink raw reply	[flat|nested] 12+ messages in thread

* drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?
@ 2021-12-06 13:18 ` Dan Carpenter
  0 siblings, 0 replies; 12+ messages in thread
From: Dan Carpenter @ 2021-12-06 13:18 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3141 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   5f58da2befa58edf3a70b91ed87ed9bf77f1e70e
commit: bb17230c61a6424b622e92006ec52ba23aa5a967 mtd: parsers: ofpart: support BCM4908 fixed partitions
date:   9 months ago
config: nios2-randconfig-m031-20211202 (https://download.01.org/0day-ci/archive/20211204/202112040342.AvFc4SDJ-lkp(a)intel.com/config)
compiler: nios2-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: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?

vim +41 drivers/mtd/parsers/ofpart_bcm4908.c

bb17230c61a642 Rafał Miłecki 2021-03-01  17  static long long bcm4908_partitions_fw_offset(void)
                                                    ^^^^^^^^^
This is long long.

bb17230c61a642 Rafał Miłecki 2021-03-01  18  {
bb17230c61a642 Rafał Miłecki 2021-03-01  19  	struct device_node *root;
bb17230c61a642 Rafał Miłecki 2021-03-01  20  	struct property *prop;
bb17230c61a642 Rafał Miłecki 2021-03-01  21  	const char *s;
bb17230c61a642 Rafał Miłecki 2021-03-01  22  
bb17230c61a642 Rafał Miłecki 2021-03-01  23  	root = of_find_node_by_path("/");
bb17230c61a642 Rafał Miłecki 2021-03-01  24  	if (!root)
bb17230c61a642 Rafał Miłecki 2021-03-01  25  		return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  26  
bb17230c61a642 Rafał Miłecki 2021-03-01  27  	of_property_for_each_string(root, "brcm_blparms", prop, s) {
bb17230c61a642 Rafał Miłecki 2021-03-01  28  		size_t len = strlen(BLPARAMS_FW_OFFSET);
bb17230c61a642 Rafał Miłecki 2021-03-01  29  		unsigned long offset;
bb17230c61a642 Rafał Miłecki 2021-03-01  30  		int err;
bb17230c61a642 Rafał Miłecki 2021-03-01  31  
bb17230c61a642 Rafał Miłecki 2021-03-01  32  		if (strncmp(s, BLPARAMS_FW_OFFSET, len) || s[len] != '=')
bb17230c61a642 Rafał Miłecki 2021-03-01  33  			continue;
bb17230c61a642 Rafał Miłecki 2021-03-01  34  
bb17230c61a642 Rafał Miłecki 2021-03-01  35  		err = kstrtoul(s + len + 1, 0, &offset);
bb17230c61a642 Rafał Miłecki 2021-03-01  36  		if (err) {
bb17230c61a642 Rafał Miłecki 2021-03-01  37  			pr_err("failed to parse %s\n", s + len + 1);
bb17230c61a642 Rafał Miłecki 2021-03-01  38  			return err;
bb17230c61a642 Rafał Miłecki 2021-03-01  39  		}
bb17230c61a642 Rafał Miłecki 2021-03-01  40  
bb17230c61a642 Rafał Miłecki 2021-03-01 @41  		return offset << 10;
                                                               ^^^^^^^^^^^^
So this should be long long.  Although 32bit systems are not really
common in real life any more...

bb17230c61a642 Rafał Miłecki 2021-03-01  42  	}
bb17230c61a642 Rafał Miłecki 2021-03-01  43  
bb17230c61a642 Rafał Miłecki 2021-03-01  44  	return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  45  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?
@ 2021-12-06 13:18 ` Dan Carpenter
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2021-12-03 19:02 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3197 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Rafał Miłecki" <rafal@milecki.pl>
CC: Miquel Raynal <miquel.raynal@bootlin.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   5f58da2befa58edf3a70b91ed87ed9bf77f1e70e
commit: bb17230c61a6424b622e92006ec52ba23aa5a967 mtd: parsers: ofpart: support BCM4908 fixed partitions
date:   9 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 9 months ago
config: nios2-randconfig-m031-20211202 (https://download.01.org/0day-ci/archive/20211204/202112040342.AvFc4SDJ-lkp(a)intel.com/config)
compiler: nios2-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: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?

vim +41 drivers/mtd/parsers/ofpart_bcm4908.c

bb17230c61a642 Rafał Miłecki 2021-03-01  16  
bb17230c61a642 Rafał Miłecki 2021-03-01  17  static long long bcm4908_partitions_fw_offset(void)
bb17230c61a642 Rafał Miłecki 2021-03-01  18  {
bb17230c61a642 Rafał Miłecki 2021-03-01  19  	struct device_node *root;
bb17230c61a642 Rafał Miłecki 2021-03-01  20  	struct property *prop;
bb17230c61a642 Rafał Miłecki 2021-03-01  21  	const char *s;
bb17230c61a642 Rafał Miłecki 2021-03-01  22  
bb17230c61a642 Rafał Miłecki 2021-03-01  23  	root = of_find_node_by_path("/");
bb17230c61a642 Rafał Miłecki 2021-03-01  24  	if (!root)
bb17230c61a642 Rafał Miłecki 2021-03-01  25  		return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  26  
bb17230c61a642 Rafał Miłecki 2021-03-01  27  	of_property_for_each_string(root, "brcm_blparms", prop, s) {
bb17230c61a642 Rafał Miłecki 2021-03-01  28  		size_t len = strlen(BLPARAMS_FW_OFFSET);
bb17230c61a642 Rafał Miłecki 2021-03-01  29  		unsigned long offset;
bb17230c61a642 Rafał Miłecki 2021-03-01  30  		int err;
bb17230c61a642 Rafał Miłecki 2021-03-01  31  
bb17230c61a642 Rafał Miłecki 2021-03-01  32  		if (strncmp(s, BLPARAMS_FW_OFFSET, len) || s[len] != '=')
bb17230c61a642 Rafał Miłecki 2021-03-01  33  			continue;
bb17230c61a642 Rafał Miłecki 2021-03-01  34  
bb17230c61a642 Rafał Miłecki 2021-03-01  35  		err = kstrtoul(s + len + 1, 0, &offset);
bb17230c61a642 Rafał Miłecki 2021-03-01  36  		if (err) {
bb17230c61a642 Rafał Miłecki 2021-03-01  37  			pr_err("failed to parse %s\n", s + len + 1);
bb17230c61a642 Rafał Miłecki 2021-03-01  38  			return err;
bb17230c61a642 Rafał Miłecki 2021-03-01  39  		}
bb17230c61a642 Rafał Miłecki 2021-03-01  40  
bb17230c61a642 Rafał Miłecki 2021-03-01 @41  		return offset << 10;
bb17230c61a642 Rafał Miłecki 2021-03-01  42  	}
bb17230c61a642 Rafał Miłecki 2021-03-01  43  
bb17230c61a642 Rafał Miłecki 2021-03-01  44  	return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  45  }
bb17230c61a642 Rafał Miłecki 2021-03-01  46  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?
@ 2021-11-19 17:52 kernel test robot
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2021-11-19 17:52 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3135 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Rafał Miłecki" <rafal@milecki.pl>
CC: Miquel Raynal <miquel.raynal@bootlin.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4c388a8e740d3235a194f330c8ef327deef710f6
commit: bb17230c61a6424b622e92006ec52ba23aa5a967 mtd: parsers: ofpart: support BCM4908 fixed partitions
date:   8 months ago
:::::: branch date: 17 hours ago
:::::: commit date: 8 months ago
config: microblaze-randconfig-m031-20211019 (attached as .config)
compiler: microblaze-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: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?

vim +41 drivers/mtd/parsers/ofpart_bcm4908.c

bb17230c61a642 Rafał Miłecki 2021-03-01  16  
bb17230c61a642 Rafał Miłecki 2021-03-01  17  static long long bcm4908_partitions_fw_offset(void)
bb17230c61a642 Rafał Miłecki 2021-03-01  18  {
bb17230c61a642 Rafał Miłecki 2021-03-01  19  	struct device_node *root;
bb17230c61a642 Rafał Miłecki 2021-03-01  20  	struct property *prop;
bb17230c61a642 Rafał Miłecki 2021-03-01  21  	const char *s;
bb17230c61a642 Rafał Miłecki 2021-03-01  22  
bb17230c61a642 Rafał Miłecki 2021-03-01  23  	root = of_find_node_by_path("/");
bb17230c61a642 Rafał Miłecki 2021-03-01  24  	if (!root)
bb17230c61a642 Rafał Miłecki 2021-03-01  25  		return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  26  
bb17230c61a642 Rafał Miłecki 2021-03-01  27  	of_property_for_each_string(root, "brcm_blparms", prop, s) {
bb17230c61a642 Rafał Miłecki 2021-03-01  28  		size_t len = strlen(BLPARAMS_FW_OFFSET);
bb17230c61a642 Rafał Miłecki 2021-03-01  29  		unsigned long offset;
bb17230c61a642 Rafał Miłecki 2021-03-01  30  		int err;
bb17230c61a642 Rafał Miłecki 2021-03-01  31  
bb17230c61a642 Rafał Miłecki 2021-03-01  32  		if (strncmp(s, BLPARAMS_FW_OFFSET, len) || s[len] != '=')
bb17230c61a642 Rafał Miłecki 2021-03-01  33  			continue;
bb17230c61a642 Rafał Miłecki 2021-03-01  34  
bb17230c61a642 Rafał Miłecki 2021-03-01  35  		err = kstrtoul(s + len + 1, 0, &offset);
bb17230c61a642 Rafał Miłecki 2021-03-01  36  		if (err) {
bb17230c61a642 Rafał Miłecki 2021-03-01  37  			pr_err("failed to parse %s\n", s + len + 1);
bb17230c61a642 Rafał Miłecki 2021-03-01  38  			return err;
bb17230c61a642 Rafał Miłecki 2021-03-01  39  		}
bb17230c61a642 Rafał Miłecki 2021-03-01  40  
bb17230c61a642 Rafał Miłecki 2021-03-01 @41  		return offset << 10;
bb17230c61a642 Rafał Miłecki 2021-03-01  42  	}
bb17230c61a642 Rafał Miłecki 2021-03-01  43  
bb17230c61a642 Rafał Miłecki 2021-03-01  44  	return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  45  }
bb17230c61a642 Rafał Miłecki 2021-03-01  46  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35349 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?
@ 2021-11-12  0:18 kernel test robot
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2021-11-12  0:18 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3166 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Rafał Miłecki" <rafal@milecki.pl>
CC: Miquel Raynal <miquel.raynal@bootlin.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   debe436e77c72fcee804fb867f275e6d31aa999c
commit: bb17230c61a6424b622e92006ec52ba23aa5a967 mtd: parsers: ofpart: support BCM4908 fixed partitions
date:   8 months ago
:::::: branch date: 23 hours ago
:::::: commit date: 8 months ago
config: microblaze-randconfig-m031-20211019 (attached as .config)
compiler: microblaze-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: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?

vim +41 drivers/mtd/parsers/ofpart_bcm4908.c

bb17230c61a6424 Rafał Miłecki 2021-03-01  16  
bb17230c61a6424 Rafał Miłecki 2021-03-01  17  static long long bcm4908_partitions_fw_offset(void)
bb17230c61a6424 Rafał Miłecki 2021-03-01  18  {
bb17230c61a6424 Rafał Miłecki 2021-03-01  19  	struct device_node *root;
bb17230c61a6424 Rafał Miłecki 2021-03-01  20  	struct property *prop;
bb17230c61a6424 Rafał Miłecki 2021-03-01  21  	const char *s;
bb17230c61a6424 Rafał Miłecki 2021-03-01  22  
bb17230c61a6424 Rafał Miłecki 2021-03-01  23  	root = of_find_node_by_path("/");
bb17230c61a6424 Rafał Miłecki 2021-03-01  24  	if (!root)
bb17230c61a6424 Rafał Miłecki 2021-03-01  25  		return -ENOENT;
bb17230c61a6424 Rafał Miłecki 2021-03-01  26  
bb17230c61a6424 Rafał Miłecki 2021-03-01  27  	of_property_for_each_string(root, "brcm_blparms", prop, s) {
bb17230c61a6424 Rafał Miłecki 2021-03-01  28  		size_t len = strlen(BLPARAMS_FW_OFFSET);
bb17230c61a6424 Rafał Miłecki 2021-03-01  29  		unsigned long offset;
bb17230c61a6424 Rafał Miłecki 2021-03-01  30  		int err;
bb17230c61a6424 Rafał Miłecki 2021-03-01  31  
bb17230c61a6424 Rafał Miłecki 2021-03-01  32  		if (strncmp(s, BLPARAMS_FW_OFFSET, len) || s[len] != '=')
bb17230c61a6424 Rafał Miłecki 2021-03-01  33  			continue;
bb17230c61a6424 Rafał Miłecki 2021-03-01  34  
bb17230c61a6424 Rafał Miłecki 2021-03-01  35  		err = kstrtoul(s + len + 1, 0, &offset);
bb17230c61a6424 Rafał Miłecki 2021-03-01  36  		if (err) {
bb17230c61a6424 Rafał Miłecki 2021-03-01  37  			pr_err("failed to parse %s\n", s + len + 1);
bb17230c61a6424 Rafał Miłecki 2021-03-01  38  			return err;
bb17230c61a6424 Rafał Miłecki 2021-03-01  39  		}
bb17230c61a6424 Rafał Miłecki 2021-03-01  40  
bb17230c61a6424 Rafał Miłecki 2021-03-01 @41  		return offset << 10;
bb17230c61a6424 Rafał Miłecki 2021-03-01  42  	}
bb17230c61a6424 Rafał Miłecki 2021-03-01  43  
bb17230c61a6424 Rafał Miłecki 2021-03-01  44  	return -ENOENT;
bb17230c61a6424 Rafał Miłecki 2021-03-01  45  }
bb17230c61a6424 Rafał Miłecki 2021-03-01  46  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35349 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?
@ 2021-06-28 18:19 kernel test robot
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2021-06-28 18:19 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3134 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Rafał Miłecki" <rafal@milecki.pl>
CC: Miquel Raynal <miquel.raynal@bootlin.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   62fb9874f5da54fdb243003b386128037319b219
commit: bb17230c61a6424b622e92006ec52ba23aa5a967 mtd: parsers: ofpart: support BCM4908 fixed partitions
date:   4 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 4 months ago
config: microblaze-randconfig-m031-20210628 (attached as .config)
compiler: microblaze-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>

smatch warnings:
drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?

vim +41 drivers/mtd/parsers/ofpart_bcm4908.c

bb17230c61a642 Rafał Miłecki 2021-03-01  16  
bb17230c61a642 Rafał Miłecki 2021-03-01  17  static long long bcm4908_partitions_fw_offset(void)
bb17230c61a642 Rafał Miłecki 2021-03-01  18  {
bb17230c61a642 Rafał Miłecki 2021-03-01  19  	struct device_node *root;
bb17230c61a642 Rafał Miłecki 2021-03-01  20  	struct property *prop;
bb17230c61a642 Rafał Miłecki 2021-03-01  21  	const char *s;
bb17230c61a642 Rafał Miłecki 2021-03-01  22  
bb17230c61a642 Rafał Miłecki 2021-03-01  23  	root = of_find_node_by_path("/");
bb17230c61a642 Rafał Miłecki 2021-03-01  24  	if (!root)
bb17230c61a642 Rafał Miłecki 2021-03-01  25  		return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  26  
bb17230c61a642 Rafał Miłecki 2021-03-01  27  	of_property_for_each_string(root, "brcm_blparms", prop, s) {
bb17230c61a642 Rafał Miłecki 2021-03-01  28  		size_t len = strlen(BLPARAMS_FW_OFFSET);
bb17230c61a642 Rafał Miłecki 2021-03-01  29  		unsigned long offset;
bb17230c61a642 Rafał Miłecki 2021-03-01  30  		int err;
bb17230c61a642 Rafał Miłecki 2021-03-01  31  
bb17230c61a642 Rafał Miłecki 2021-03-01  32  		if (strncmp(s, BLPARAMS_FW_OFFSET, len) || s[len] != '=')
bb17230c61a642 Rafał Miłecki 2021-03-01  33  			continue;
bb17230c61a642 Rafał Miłecki 2021-03-01  34  
bb17230c61a642 Rafał Miłecki 2021-03-01  35  		err = kstrtoul(s + len + 1, 0, &offset);
bb17230c61a642 Rafał Miłecki 2021-03-01  36  		if (err) {
bb17230c61a642 Rafał Miłecki 2021-03-01  37  			pr_err("failed to parse %s\n", s + len + 1);
bb17230c61a642 Rafał Miłecki 2021-03-01  38  			return err;
bb17230c61a642 Rafał Miłecki 2021-03-01  39  		}
bb17230c61a642 Rafał Miłecki 2021-03-01  40  
bb17230c61a642 Rafał Miłecki 2021-03-01 @41  		return offset << 10;
bb17230c61a642 Rafał Miłecki 2021-03-01  42  	}
bb17230c61a642 Rafał Miłecki 2021-03-01  43  
bb17230c61a642 Rafał Miłecki 2021-03-01  44  	return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  45  }
bb17230c61a642 Rafał Miłecki 2021-03-01  46  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30574 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?
@ 2021-05-03  0:53 kernel test robot
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2021-05-03  0:53 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3125 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Rafał Miłecki" <rafal@milecki.pl>
CC: Miquel Raynal <miquel.raynal@bootlin.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   9ccce092fc64d19504fa54de4fd659e279cc92e7
commit: bb17230c61a6424b622e92006ec52ba23aa5a967 mtd: parsers: ofpart: support BCM4908 fixed partitions
date:   8 weeks ago
:::::: branch date: 4 hours ago
:::::: commit date: 8 weeks ago
config: arm-randconfig-m031-20210503 (attached as .config)
compiler: arm-linux-gnueabi-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>

smatch warnings:
drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?

vim +41 drivers/mtd/parsers/ofpart_bcm4908.c

bb17230c61a642 Rafał Miłecki 2021-03-01  16  
bb17230c61a642 Rafał Miłecki 2021-03-01  17  static long long bcm4908_partitions_fw_offset(void)
bb17230c61a642 Rafał Miłecki 2021-03-01  18  {
bb17230c61a642 Rafał Miłecki 2021-03-01  19  	struct device_node *root;
bb17230c61a642 Rafał Miłecki 2021-03-01  20  	struct property *prop;
bb17230c61a642 Rafał Miłecki 2021-03-01  21  	const char *s;
bb17230c61a642 Rafał Miłecki 2021-03-01  22  
bb17230c61a642 Rafał Miłecki 2021-03-01  23  	root = of_find_node_by_path("/");
bb17230c61a642 Rafał Miłecki 2021-03-01  24  	if (!root)
bb17230c61a642 Rafał Miłecki 2021-03-01  25  		return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  26  
bb17230c61a642 Rafał Miłecki 2021-03-01  27  	of_property_for_each_string(root, "brcm_blparms", prop, s) {
bb17230c61a642 Rafał Miłecki 2021-03-01  28  		size_t len = strlen(BLPARAMS_FW_OFFSET);
bb17230c61a642 Rafał Miłecki 2021-03-01  29  		unsigned long offset;
bb17230c61a642 Rafał Miłecki 2021-03-01  30  		int err;
bb17230c61a642 Rafał Miłecki 2021-03-01  31  
bb17230c61a642 Rafał Miłecki 2021-03-01  32  		if (strncmp(s, BLPARAMS_FW_OFFSET, len) || s[len] != '=')
bb17230c61a642 Rafał Miłecki 2021-03-01  33  			continue;
bb17230c61a642 Rafał Miłecki 2021-03-01  34  
bb17230c61a642 Rafał Miłecki 2021-03-01  35  		err = kstrtoul(s + len + 1, 0, &offset);
bb17230c61a642 Rafał Miłecki 2021-03-01  36  		if (err) {
bb17230c61a642 Rafał Miłecki 2021-03-01  37  			pr_err("failed to parse %s\n", s + len + 1);
bb17230c61a642 Rafał Miłecki 2021-03-01  38  			return err;
bb17230c61a642 Rafał Miłecki 2021-03-01  39  		}
bb17230c61a642 Rafał Miłecki 2021-03-01  40  
bb17230c61a642 Rafał Miłecki 2021-03-01 @41  		return offset << 10;
bb17230c61a642 Rafał Miłecki 2021-03-01  42  	}
bb17230c61a642 Rafał Miłecki 2021-03-01  43  
bb17230c61a642 Rafał Miłecki 2021-03-01  44  	return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  45  }
bb17230c61a642 Rafał Miłecki 2021-03-01  46  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 40140 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-02-26  3:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-12  6:29 drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type? kernel test robot
2021-09-14  9:57 ` Dan Carpenter
2021-09-14  9:57 ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2022-02-26  3:23 kernel test robot
2021-12-07 18:02 kernel test robot
2021-12-06 13:18 Dan Carpenter
2021-12-03 19:02 ` kernel test robot
2021-12-06 13:18 ` Dan Carpenter
2021-11-19 17:52 kernel test robot
2021-11-12  0:18 kernel test robot
2021-06-28 18:19 kernel test robot
2021-05-03  0:53 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.