lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202501042024.1bBjlJCW-lkp@intel.com>
Date: Sat, 4 Jan 2025 20:20:23 +0800
From: kernel test robot <lkp@...el.com>
To: Rafał Miłecki <rafal@...ecki.pl>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Subject: drivers/firmware/broadcom/bcm47xx_nvram.c:55: warning: Function
 parameter or struct member 'flash_start' not described in
 'bcm47xx_nvram_find_and_copy'

Hi Rafał,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   63676eefb7a026d04b51dcb7aaf54f358517a2ec
commit: fb009cbdd0693bd633f11e99526617b3d392cfad firmware: bcm47xx_nvram: rename finding function and its variables
date:   3 years, 10 months ago
config: parisc-randconfig-c44-20220907 (https://download.01.org/0day-ci/archive/20250104/202501042024.1bBjlJCW-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250104/202501042024.1bBjlJCW-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501042024.1bBjlJCW-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/firmware/broadcom/bcm47xx_nvram.c:55: warning: Function parameter or struct member 'flash_start' not described in 'bcm47xx_nvram_find_and_copy'
>> drivers/firmware/broadcom/bcm47xx_nvram.c:55: warning: Function parameter or struct member 'res_size' not described in 'bcm47xx_nvram_find_and_copy'


vim +55 drivers/firmware/broadcom/bcm47xx_nvram.c

f36738ddfeea02 arch/mips/bcm47xx/nvram.c                 Hauke Mehrtens    2012-12-26   50  
fb009cbdd0693b drivers/firmware/broadcom/bcm47xx_nvram.c Rafał Miłecki     2021-03-08   51  /**
fb009cbdd0693b drivers/firmware/broadcom/bcm47xx_nvram.c Rafał Miłecki     2021-03-08   52   * bcm47xx_nvram_find_and_copy - find NVRAM on flash mapping & copy it
fb009cbdd0693b drivers/firmware/broadcom/bcm47xx_nvram.c Rafał Miłecki     2021-03-08   53   */
fb009cbdd0693b drivers/firmware/broadcom/bcm47xx_nvram.c Rafał Miłecki     2021-03-08   54  static int bcm47xx_nvram_find_and_copy(void __iomem *flash_start, size_t res_size)
121915c4ee0812 arch/mips/bcm47xx/nvram.c                 Waldemar Brodkorb 2010-06-08  @55  {
8d602dd0f984e8 arch/mips/bcm47xx/nvram.c                 Rafał Miłecki     2014-09-03   56  	struct nvram_header __iomem *header;
fb009cbdd0693b drivers/firmware/broadcom/bcm47xx_nvram.c Rafał Miłecki     2021-03-08   57  	size_t flash_size;
f36738ddfeea02 arch/mips/bcm47xx/nvram.c                 Hauke Mehrtens    2012-12-26   58  	u32 size;
121915c4ee0812 arch/mips/bcm47xx/nvram.c                 Waldemar Brodkorb 2010-06-08   59  
94a0535baf4d78 arch/mips/bcm47xx/nvram.c                 Rafał Miłecki     2015-06-06   60  	if (nvram_len) {
8d602dd0f984e8 arch/mips/bcm47xx/nvram.c                 Rafał Miłecki     2014-09-03   61  		pr_warn("nvram already initialized\n");
8d602dd0f984e8 arch/mips/bcm47xx/nvram.c                 Rafał Miłecki     2014-09-03   62  		return -EEXIST;
8d602dd0f984e8 arch/mips/bcm47xx/nvram.c                 Rafał Miłecki     2014-09-03   63  	}
8d602dd0f984e8 arch/mips/bcm47xx/nvram.c                 Rafał Miłecki     2014-09-03   64  
c4485671fbbb6f arch/mips/bcm47xx/nvram.c                 Hauke Mehrtens    2012-12-26   65  	/* TODO: when nvram is on nand flash check for bad blocks first. */
fb009cbdd0693b drivers/firmware/broadcom/bcm47xx_nvram.c Rafał Miłecki     2021-03-08   66  	flash_size = FLASH_MIN;
fb009cbdd0693b drivers/firmware/broadcom/bcm47xx_nvram.c Rafał Miłecki     2021-03-08   67  	while (flash_size <= res_size) {
121915c4ee0812 arch/mips/bcm47xx/nvram.c                 Waldemar Brodkorb 2010-06-08   68  		/* Windowed flash access */
fb009cbdd0693b drivers/firmware/broadcom/bcm47xx_nvram.c Rafał Miłecki     2021-03-08   69  		size = find_nvram_size(flash_start + flash_size);
f36738ddfeea02 arch/mips/bcm47xx/nvram.c                 Hauke Mehrtens    2012-12-26   70  		if (size) {
fb009cbdd0693b drivers/firmware/broadcom/bcm47xx_nvram.c Rafał Miłecki     2021-03-08   71  			header = (struct nvram_header *)(flash_start + flash_size - size);
121915c4ee0812 arch/mips/bcm47xx/nvram.c                 Waldemar Brodkorb 2010-06-08   72  			goto found;
f36738ddfeea02 arch/mips/bcm47xx/nvram.c                 Hauke Mehrtens    2012-12-26   73  		}
fb009cbdd0693b drivers/firmware/broadcom/bcm47xx_nvram.c Rafał Miłecki     2021-03-08   74  		flash_size <<= 1;
121915c4ee0812 arch/mips/bcm47xx/nvram.c                 Waldemar Brodkorb 2010-06-08   75  	}
121915c4ee0812 arch/mips/bcm47xx/nvram.c                 Waldemar Brodkorb 2010-06-08   76  
121915c4ee0812 arch/mips/bcm47xx/nvram.c                 Waldemar Brodkorb 2010-06-08   77  	/* Try embedded NVRAM at 4 KB and 1 KB as last resorts */
fb009cbdd0693b drivers/firmware/broadcom/bcm47xx_nvram.c Rafał Miłecki     2021-03-08   78  	header = (struct nvram_header *)(flash_start + 4096);
341097f17c76b3 arch/mips/bcm47xx/nvram.c                 Rafał Miłecki     2014-10-30   79  	if (header->magic == NVRAM_MAGIC) {
f36738ddfeea02 arch/mips/bcm47xx/nvram.c                 Hauke Mehrtens    2012-12-26   80  		size = NVRAM_SPACE;
121915c4ee0812 arch/mips/bcm47xx/nvram.c                 Waldemar Brodkorb 2010-06-08   81  		goto found;
f36738ddfeea02 arch/mips/bcm47xx/nvram.c                 Hauke Mehrtens    2012-12-26   82  	}
121915c4ee0812 arch/mips/bcm47xx/nvram.c                 Waldemar Brodkorb 2010-06-08   83  
fb009cbdd0693b drivers/firmware/broadcom/bcm47xx_nvram.c Rafał Miłecki     2021-03-08   84  	header = (struct nvram_header *)(flash_start + 1024);
341097f17c76b3 arch/mips/bcm47xx/nvram.c                 Rafał Miłecki     2014-10-30   85  	if (header->magic == NVRAM_MAGIC) {
f36738ddfeea02 arch/mips/bcm47xx/nvram.c                 Hauke Mehrtens    2012-12-26   86  		size = NVRAM_SPACE;
121915c4ee0812 arch/mips/bcm47xx/nvram.c                 Waldemar Brodkorb 2010-06-08   87  		goto found;
f36738ddfeea02 arch/mips/bcm47xx/nvram.c                 Hauke Mehrtens    2012-12-26   88  	}
121915c4ee0812 arch/mips/bcm47xx/nvram.c                 Waldemar Brodkorb 2010-06-08   89  
f36738ddfeea02 arch/mips/bcm47xx/nvram.c                 Hauke Mehrtens    2012-12-26   90  	pr_err("no nvram found\n");
cc4403e02541af arch/mips/bcm47xx/nvram.c                 Hauke Mehrtens    2012-12-26   91  	return -ENXIO;
121915c4ee0812 arch/mips/bcm47xx/nvram.c                 Waldemar Brodkorb 2010-06-08   92  
121915c4ee0812 arch/mips/bcm47xx/nvram.c                 Waldemar Brodkorb 2010-06-08   93  found:
1f330c3279004d drivers/firmware/broadcom/bcm47xx_nvram.c Stephen Boyd      2016-01-20   94  	__ioread32_copy(nvram_buf, header, sizeof(*header) / 4);
4c11e554fb894b drivers/firmware/broadcom/bcm47xx_nvram.c Aaro Koskinen     2016-03-17   95  	nvram_len = ((struct nvram_header *)(nvram_buf))->len;
94a0535baf4d78 arch/mips/bcm47xx/nvram.c                 Rafał Miłecki     2015-06-06   96  	if (nvram_len > size) {
55cab93bcf1422 arch/mips/bcm47xx/nvram.c                 Hante Meuleman    2015-05-21   97  		pr_err("The nvram size according to the header seems to be bigger than the partition on flash\n");
94a0535baf4d78 arch/mips/bcm47xx/nvram.c                 Rafał Miłecki     2015-06-06   98  		nvram_len = size;
55cab93bcf1422 arch/mips/bcm47xx/nvram.c                 Hante Meuleman    2015-05-21   99  	}
94a0535baf4d78 arch/mips/bcm47xx/nvram.c                 Rafał Miłecki     2015-06-06  100  	if (nvram_len >= NVRAM_SPACE) {
feb4eb060c3aec drivers/firmware/broadcom/bcm47xx_nvram.c Florian Fainelli  2019-05-14  101  		pr_err("nvram on flash (%zu bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n",
4c11e554fb894b drivers/firmware/broadcom/bcm47xx_nvram.c Aaro Koskinen     2016-03-17  102  		       nvram_len, NVRAM_SPACE - 1);
94a0535baf4d78 arch/mips/bcm47xx/nvram.c                 Rafał Miłecki     2015-06-06  103  		nvram_len = NVRAM_SPACE - 1;
55cab93bcf1422 arch/mips/bcm47xx/nvram.c                 Hante Meuleman    2015-05-21  104  	}
55cab93bcf1422 arch/mips/bcm47xx/nvram.c                 Hante Meuleman    2015-05-21  105  	/* proceed reading data after header */
1f330c3279004d drivers/firmware/broadcom/bcm47xx_nvram.c Stephen Boyd      2016-01-20  106  	__ioread32_copy(nvram_buf + sizeof(*header), header + 1,
1f330c3279004d drivers/firmware/broadcom/bcm47xx_nvram.c Stephen Boyd      2016-01-20  107  			DIV_ROUND_UP(nvram_len, 4));
d28c9a55c297db arch/mips/bcm47xx/nvram.c                 Rafał Miłecki     2015-05-12  108  	nvram_buf[NVRAM_SPACE - 1] = '\0';
cc4403e02541af arch/mips/bcm47xx/nvram.c                 Hauke Mehrtens    2012-12-26  109  
cc4403e02541af arch/mips/bcm47xx/nvram.c                 Hauke Mehrtens    2012-12-26  110  	return 0;
121915c4ee0812 arch/mips/bcm47xx/nvram.c                 Waldemar Brodkorb 2010-06-08  111  }
121915c4ee0812 arch/mips/bcm47xx/nvram.c                 Waldemar Brodkorb 2010-06-08  112  

:::::: The code at line 55 was first introduced by commit
:::::: 121915c4ee0812a14bc8d752bc210d0238d755c1 MIPS: BCM47xx: Add NVRAM support devices

:::::: TO: Waldemar Brodkorb <mips@...demar-brodkorb.de>
:::::: CC: Ralf Baechle <ralf@...ux-mips.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ