From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECA40C5475B for ; Fri, 8 Mar 2024 14:27:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 59E0A6B0395; Fri, 8 Mar 2024 09:27:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 54D0B6B0396; Fri, 8 Mar 2024 09:27:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3EE0F6B0397; Fri, 8 Mar 2024 09:27:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 2FB156B0395 for ; Fri, 8 Mar 2024 09:27:58 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D00A51A07F0 for ; Fri, 8 Mar 2024 14:27:57 +0000 (UTC) X-FDA: 81874100994.27.54E56CB Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by imf25.hostedemail.com (Postfix) with ESMTP id D16C1A0009 for ; Fri, 8 Mar 2024 14:27:54 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=gcndL4Z1; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf25.hostedemail.com: domain of lkp@intel.com designates 192.198.163.8 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709908076; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=vizl4lYee2elRj5eIT8Pq7Wgyizfp+RYd6IPc/Ax1Rg=; b=tBpW7BSk2V3//n5qjUcAiAXKJ6YX0jX3UYWSVLzBkpiCWLsxzZVxVUY0nU+vPn2WHJWLfc eQKiRg4Dabb6nVGeniwoy5/sYDsbF/WCucAMzmgTpo2vt1GODFj47bxdbSP9WcUzn88Nqy yvNckh9jm049qCCvMrDnax3iD6g+lLw= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=gcndL4Z1; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf25.hostedemail.com: domain of lkp@intel.com designates 192.198.163.8 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709908076; a=rsa-sha256; cv=none; b=8fxC62SBSbGHdF94b+qorJ7Vqso63Mcp8oFoNxnHwjHQehjBOclnoBpgQwQ26bO3oSiEg1 QTzZYammvHzU3p3+CcZxCrZpkorKN793qkqntiZip40T7jm44Haxot4Szp2rvRnqmbuin3 AaKYRYOE++0tWHAhsjnnCXU2MwDJjNY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709908075; x=1741444075; h=date:from:to:cc:subject:message-id:mime-version; bh=JehrwBSe5jpER7aEjZ7zFG79Kv0Lh6GhsbWnY4NNhEQ=; b=gcndL4Z1b6RusdWqfGQW2X3Ne5Y4IHYlDmkfekgRUYWrRA5mM92/xw4M 76aOwIY4OH41/8whyURr4dNQ0NgQPBVpnWiH1l+w+DSdYwMd0KHYXS19M ykU04BeTITziN8XidVADZ3bMDepadDeEvPUcxpaiKdQbphK1ecXUKWzAt tDHnBPvSfcPV4UZ4alG7daT6uQ2IJUV8vnSMEBF0eoqzgFM02ZvY85lRH kFhyO1iQnSdoBysjc2ns0kCISsmRpaYRswqn7lf6mMm90m4/dg7f9W92E t8OtfYS1NtuqiK17u92UUEwaXbbWICQu/i3zLETs7qYRVXuO+weOQwlJS Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="22153234" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="22153234" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 06:27:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="33614703" Received: from lkp-server01.sh.intel.com (HELO b21307750695) ([10.239.97.150]) by fmviesa002.fm.intel.com with ESMTP; 08 Mar 2024 06:27:52 -0800 Received: from kbuild by b21307750695 with local (Exim 4.96) (envelope-from ) id 1ribCP-0006RD-2I; Fri, 08 Mar 2024 14:27:49 +0000 Date: Fri, 8 Mar 2024 22:27:03 +0800 From: kernel test robot To: Daniel Golle Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Richard Weinberger Subject: [linux-next:master 9129/12944] drivers/mtd/ubi/nvmem.c:34:9: error: incompatible pointer types passing 'int *' to parameter of type 'uint64_t *' (aka 'unsigned long long *') Message-ID: <202403082209.vkIG6nqH-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: D16C1A0009 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: ex4iy6xoiqep7w3mzpxpc4gx9yaoj5iq X-HE-Tag: 1709908074-849947 X-HE-Meta: U2FsdGVkX18fQz5fQ92DZcVG6cgOWTL5tQuuEtcrKARaBn19loxd0sDogJF2CVLJWcdJSvEtqtXtezfl/3uRLHj2Sw1Qyb3GV/nzCctZOHFrj3kZLqaDvjHXBpN6pDg5LAlrIRu0Pg8x4WHg2ENxtI+kXDZWaASwMR5krmejvLjAPwZgzcdCSzsv30NOrG0/jdUus1gNWSKh9+XlKkH1xhWnM7iC0GzNk1Ibdu1QM7H9kNizlkGX67Zcn7RqsBGZrrJ5O180zT1Ittd1DthQAhkx8UVcRPTBSU+6P3wjS36vfW/1AftizVyt6ymraVWRrps1lOWb+RTMPf/T1cCwQOdKen3cdbh0WC2WMX6vnEGI0kDGAJ3GFaK3mmXms4xeFVIfnAkD0qXLaMkQdhRmynhijgMG49ahTjsf0y8rNlymKa5GfQcZhgTCM4WOe6Aybh0RvZ2b8xn6FDozzciJokXh0oDIyVjZ899U/pozWenDL73pnPb6zhJqLd4jBog2TRlVwPniPtq9G9bJ8gYn6zKawkt4ElbYZcO3EZkdDx32mLGfQM+Pk0UogekGZTyVamQbajnGFwRzbkXCREvv4fwqR0hj8GJkrRCThAT4972IUwtWuyvToGZ1j7blKHP9Bzu9uBk9zbelIgGRRaoUPFa7M0UnsZk0+OmFrpxHyvJDtYZr8VsVTXEL+c/N9amxAXd6jKcZ3QjtcXYQ4huZ1GLO5gZdnQkkIR6qr+d8Og6sKHu+2C6yt1JzmdwEQgTu17y+LfkHJmY/9vjjm+LmZEChMxuEYay/GyQ0sFXuCajDOaMDHXXzLJvJv2mO4lxOE9ieWB6kNu6GpmjDntCxtmwW9uFB8UhUEpNR8okbMmckJKwnXZSIi/ufHKQV/W+TJAPwCSWnt9c= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 8ffc8b1bbd505e27e2c8439d326b6059c906c9dd commit: 3ce485803da1b79b2692b6d0c2792829292ad838 [9129/12944] mtd: ubi: provide NVMEM layer over UBI volumes config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20240308/202403082209.vkIG6nqH-lkp@intel.com/config) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 503c55e17037436dcd45ac69dea8967e67e3f5e8) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240308/202403082209.vkIG6nqH-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/202403082209.vkIG6nqH-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from drivers/mtd/ubi/nvmem.c:7: In file included from drivers/mtd/ubi/ubi.h:28: In file included from include/linux/mtd/ubi.h:13: In file included from include/linux/scatterlist.h:8: In file included from include/linux/mm.h:2188: include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ In file included from drivers/mtd/ubi/nvmem.c:7: In file included from drivers/mtd/ubi/ubi.h:28: In file included from include/linux/mtd/ubi.h:13: In file included from include/linux/scatterlist.h:9: In file included from arch/hexagon/include/asm/io.h:328: 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/ubi/nvmem.c:7: In file included from drivers/mtd/ubi/ubi.h:28: In file included from include/linux/mtd/ubi.h:13: In file included from include/linux/scatterlist.h:9: In file included from arch/hexagon/include/asm/io.h:328: 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/ubi/nvmem.c:7: In file included from drivers/mtd/ubi/ubi.h:28: In file included from include/linux/mtd/ubi.h:13: In file included from include/linux/scatterlist.h:9: In file included from arch/hexagon/include/asm/io.h:328: 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/ubi/nvmem.c:34:9: warning: comparison of distinct pointer types ('typeof ((lnum)) *' (aka 'int *') and 'uint64_t *' (aka 'unsigned long long *')) [-Wcompare-distinct-pointer-types] 34 | offs = do_div(lnum, unv->usable_leb_size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/div64.h:222:28: note: expanded from macro 'do_div' 222 | (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \ | ~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~ >> drivers/mtd/ubi/nvmem.c:34:9: error: incompatible pointer types passing 'int *' to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types] 34 | offs = do_div(lnum, unv->usable_leb_size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/div64.h:238:22: note: expanded from macro 'do_div' 238 | __rem = __div64_32(&(n), __base); \ | ^~~~ include/asm-generic/div64.h:213:38: note: passing argument to parameter 'dividend' here 213 | extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor); | ^ drivers/mtd/ubi/nvmem.c:34:9: warning: shift count >= width of type [-Wshift-count-overflow] 34 | offs = do_div(lnum, unv->usable_leb_size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/div64.h:234:25: note: expanded from macro 'do_div' 234 | } else if (likely(((n) >> 32) == 0)) { \ | ^ ~~ include/linux/compiler.h:76:40: note: expanded from macro 'likely' 76 | # define likely(x) __builtin_expect(!!(x), 1) | ^ 9 warnings and 1 error generated. vim +34 drivers/mtd/ubi/nvmem.c 22 23 static int ubi_nvmem_reg_read(void *priv, unsigned int from, 24 void *val, size_t bytes) 25 { 26 int err = 0, lnum = from, offs, bytes_left = bytes, to_read; 27 struct ubi_nvmem *unv = priv; 28 struct ubi_volume_desc *desc; 29 30 desc = ubi_open_volume(unv->ubi_num, unv->vol_id, UBI_READONLY); 31 if (IS_ERR(desc)) 32 return PTR_ERR(desc); 33 > 34 offs = do_div(lnum, unv->usable_leb_size); 35 while (bytes_left) { 36 to_read = unv->usable_leb_size - offs; 37 38 if (to_read > bytes_left) 39 to_read = bytes_left; 40 41 err = ubi_read(desc, lnum, val, offs, to_read); 42 if (err) 43 break; 44 45 lnum += 1; 46 offs = 0; 47 bytes_left -= to_read; 48 val += to_read; 49 } 50 ubi_close_volume(desc); 51 52 if (err) 53 return err; 54 55 return bytes_left == 0 ? 0 : -EIO; 56 } 57 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki