From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E94F16ADC for ; Sun, 19 Nov 2023 11:44:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="JUe2kUMh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700394287; x=1731930287; h=date:from:to:cc:subject:message-id:mime-version; bh=6+WT70ueV6dJ4YA6sGy6bWZPKuMeQiwHOWYpIdWUt1g=; b=JUe2kUMh+CzJQSFqSY0ZpbtpMILeutMwdS4PitfgGZfPNeSy3GjZWEuZ ZvJgGbdsmYQ6ucCoWzbDn02/UMMiwr/dXi6Z04JM3E9gjZ3GqVa9z6iGH qE5iaF+TSgz73tsw2+bR5ZXDYzhnn/0hPT1R4xiNLryX2CoFnQGmzbYWk ItlFLoPIRcU8nFwTncShksTY07csFvgOESoOHWCCZgOaKAoQMsGKvUglK NRRrLbPj+eGUG8/q5pBolMCeq5/68uedxvQG9peynpLjEIksTSuE0kzpb 7Or34rSVks4Q3bYcHRo00tIAR+E5U0IsQeHkmbcESHDhbPQBBAct+U3X1 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10898"; a="370829742" X-IronPort-AV: E=Sophos;i="6.04,210,1695711600"; d="scan'208";a="370829742" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2023 03:44:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10898"; a="836490046" X-IronPort-AV: E=Sophos;i="6.04,210,1695711600"; d="scan'208";a="836490046" Received: from lkp-server02.sh.intel.com (HELO b8de5498638e) ([10.239.97.151]) by fmsmga004.fm.intel.com with ESMTP; 19 Nov 2023 03:44:45 -0800 Received: from kbuild by b8de5498638e with local (Exim 4.96) (envelope-from ) id 1r4gDq-00053r-1Z; Sun, 19 Nov 2023 11:44:39 +0000 Date: Sun, 19 Nov 2023 19:43:28 +0800 From: kernel test robot To: Frank Wunderlich Cc: oe-kbuild-all@lists.linux.dev Subject: [frank-w-bpi-r2-4.14:6.6-dango 7031/7095] drivers/mtd/nand/spi/core.c:979:5: warning: no previous prototype for function 'spinand_cal_read' Message-ID: <202311191952.fBUo4ROU-lkp@intel.com> Precedence: bulk X-Mailing-List: oe-kbuild-all@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tree: https://github.com/frank-w/BPI-R2-4.14 6.6-dango head: c3f5b3f22933d3fdfdaced4da77348154240d88b commit: e8053513c51df65611d3654a449fa15561cbe7b7 [7031/7095] drivers: mtd: spinand: Add calibration support for spinand config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20231119/202311191952.fBUo4ROU-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231119/202311191952.fBUo4ROU-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202311191952.fBUo4ROU-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/mtd/nand/spi/core.c:16: In file included from include/linux/mtd/spinand.h:16: In file included from include/linux/spi/spi.h:17: In file included from include/linux/scatterlist.h:9: In file included from arch/hexagon/include/asm/io.h:337: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 547 | val = __raw_readb(PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' 37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) | ^ In file included from drivers/mtd/nand/spi/core.c:16: In file included from include/linux/mtd/spinand.h:16: In file included from include/linux/spi/spi.h:17: In file included from include/linux/scatterlist.h:9: In file included from arch/hexagon/include/asm/io.h:337: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' 35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) | ^ In file included from drivers/mtd/nand/spi/core.c:16: In file included from include/linux/mtd/spinand.h:16: In file included from include/linux/spi/spi.h:17: In file included from include/linux/scatterlist.h:9: In file included from arch/hexagon/include/asm/io.h:337: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 584 | __raw_writeb(value, PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ drivers/mtd/nand/spi/core.c:1020:37: error: too few arguments to function call, expected 4, have 2 1020 | ret = spinand_wait(spinand, &status); | ~~~~~~~~~~~~ ^ drivers/mtd/nand/spi/core.c:499:12: note: 'spinand_wait' declared here 499 | static int spinand_wait(struct spinand_device *spinand, | ^ >> drivers/mtd/nand/spi/core.c:979:5: warning: no previous prototype for function 'spinand_cal_read' [-Wmissing-prototypes] 979 | int spinand_cal_read(void *priv, u32 *addr, int addrlen, u8 *buf, int readlen) { | ^ drivers/mtd/nand/spi/core.c:979:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 979 | int spinand_cal_read(void *priv, u32 *addr, int addrlen, u8 *buf, int readlen) { | ^ | static 7 warnings and 1 error generated. vim +/spinand_cal_read +979 drivers/mtd/nand/spi/core.c 978 > 979 int spinand_cal_read(void *priv, u32 *addr, int addrlen, u8 *buf, int readlen) { 980 struct spinand_device *spinand = (struct spinand_device *)priv; 981 struct device *dev = &spinand->spimem->spi->dev; 982 struct spi_mem_op op = SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, buf, readlen); 983 struct nand_pos pos; 984 struct nand_page_io_req req; 985 u8 status; 986 int ret; 987 988 if(addrlen != sizeof(struct nand_addr)/sizeof(unsigned int)) { 989 dev_err(dev, "Must provide correct addr(length) for spinand calibration\n"); 990 return -EINVAL; 991 } 992 993 ret = spinand_reset_op(spinand); 994 if (ret) 995 return ret; 996 997 /* We should store our golden data in first target because 998 * we can't switch target at this moment. 999 */ 1000 pos = (struct nand_pos){ 1001 .target = 0, 1002 .lun = *addr, 1003 .plane = *(addr+1), 1004 .eraseblock = *(addr+2), 1005 .page = *(addr+3), 1006 }; 1007 1008 req = (struct nand_page_io_req){ 1009 .pos = pos, 1010 .dataoffs = *(addr+4), 1011 .datalen = readlen, 1012 .databuf.in = buf, 1013 .mode = MTD_OPS_AUTO_OOB, 1014 }; 1015 1016 ret = spinand_load_page_op(spinand, &req); 1017 if (ret) 1018 return ret; 1019 > 1020 ret = spinand_wait(spinand, &status); 1021 if (ret < 0) 1022 return ret; 1023 1024 ret = spi_mem_exec_op(spinand->spimem, &op); 1025 1026 return 0; 1027 } 1028 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki