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 2BAC8C77B76 for ; Fri, 21 Apr 2023 18:00:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8EEBE6B0071; Fri, 21 Apr 2023 14:00:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 89F536B0072; Fri, 21 Apr 2023 14:00:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 73F826B0074; Fri, 21 Apr 2023 14:00:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 657CC6B0071 for ; Fri, 21 Apr 2023 14:00:29 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 24577808D2 for ; Fri, 21 Apr 2023 18:00:29 +0000 (UTC) X-FDA: 80706162978.30.70238F5 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by imf20.hostedemail.com (Postfix) with ESMTP id 410981C002E for ; Fri, 21 Apr 2023 18:00:23 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=QgwGVoWZ; spf=pass (imf20.hostedemail.com: domain of lkp@intel.com designates 192.55.52.120 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1682100025; 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=fxSZuWxMu94RA8a9K9pB430MPQe7p2YC87BWBqElE1o=; b=WsPGNFz9U5MoscmPvc5qytiS/tUNdvgfKaG071w3wSjbyPgesNA1z68aAOx4+nl4G42AGd JlJduayHJRGI2jhaDwsa2QMfKQ6s5QzF6e07Rwz9yoyFnRJYRsn3Mb079gGzizE0SQVgEf AmZLTZfGAcrFgnNt57v2rBxaB+fI1q8= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=QgwGVoWZ; spf=pass (imf20.hostedemail.com: domain of lkp@intel.com designates 192.55.52.120 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1682100025; a=rsa-sha256; cv=none; b=59MF7Qx1P55NHMyC7dgPdJcdY5iat0sYDruDJeIvZysUkGWjimv7SbCjw88jk/0JiY5FfJ xlAyGBrwTopRHQA0+GOXWcEBoRsmvHlhpMEtIpcAZmyUoR0I0/kR492b18Q4eOtX0fbJeg /uiOJxNNDos+atMrYoKDBfj/1rLdhls= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682100024; x=1713636024; h=date:from:to:cc:subject:message-id:mime-version; bh=GlNFGHNjNG5NR5XjLfG7+NU7klkvpylfkRh5ZKRJgzI=; b=QgwGVoWZb0iTay7mETrp6bYlTvgWDScofCWTIkYSd+FY6wCYOIxEzose 1fkoEAjL6gn29jciVozzoH+k9ji831ueY1BYbhNtyvDs1pJhzCLe0cRZQ DoluwBqTPz3ee3t55RQHm0pqR22jNdMt7oWrm8GQg3aOPhM1AaklDa9/3 8HWZ9L3nSoHIS2M/pz1kpVC+KOju/vkkBERD1mgmjBQOsvIJ0FF5lE6Nu jlbugTa4hzar4CNHtUDEgTI9olHz/Ie60LseL/6FnBDCYrVl9w7eN4t2o gdDPPsbOTT2Dp39lqA7gYSdRLf/QDZ8Q4VkerArRMg5GUWqdSyTk0fHFa A==; X-IronPort-AV: E=McAfee;i="6600,9927,10687"; a="344799786" X-IronPort-AV: E=Sophos;i="5.99,214,1677571200"; d="scan'208";a="344799786" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2023 11:00:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10687"; a="722827338" X-IronPort-AV: E=Sophos;i="5.99,214,1677571200"; d="scan'208";a="722827338" Received: from lkp-server01.sh.intel.com (HELO b613635ddfff) ([10.239.97.150]) by orsmga008.jf.intel.com with ESMTP; 21 Apr 2023 11:00:19 -0700 Received: from kbuild by b613635ddfff with local (Exim 4.96) (envelope-from ) id 1ppv3S-000giS-39; Fri, 21 Apr 2023 18:00:18 +0000 Date: Sat, 22 Apr 2023 02:00:09 +0800 From: kernel test robot To: Yimin Gu Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Palmer Dabbelt , Jesse Taube , Damien Le Moal , Conor Dooley Subject: [linux-next:master 6260/13289] drivers/net/arcnet/com20020.c:74:7: warning: performing pointer arithmetic on a null pointer has undefined behavior Message-ID: <202304220118.NYuW8ip0-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 410981C002E X-Stat-Signature: zrfhrcf3yqazoqesgzjo437hrfewoyjj X-Rspam-User: X-HE-Tag: 1682100023-557060 X-HE-Meta: U2FsdGVkX18tjK+KoETsXzSR90O8Bl/Qrc1fC1YsLdi5lht4XgJhopf8eCUAyk7sb5dgGdWY+BqjByK5JM3meKRv6U4CVMt3Uq5iNeErJ4nZrnCPSBZG6ct+sDDg8XyXG5DI6Nhitbkk1EL/VbfUqgWkvAIQWCaQAy21sVWo0B808O8VuO0NFoH8jfALMtP1emvMIH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P/YzLMWc/Skcf9nWVzJwleoiTSu/BLxC4lRfbHbz11uEqIEXIbGeOzazyWNPNI3pqDMvkXq2rM6tNdY7lSjSpwsP7CbheC74MXm8rv1ozL/49iUTDqGTfS9QlIzynwwunQrtGp2+vkxvPiuic/Cqr8LFs6fZNFd+qO+8C3RKSKobqSd851yZsZmabQOXPQfG+0tLIrMVuO8K3epVy57oCJB1UbkDw== 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: Hi Yimin, FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant. tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 44bf136283e567b2b62653be7630e7511da41da2 commit: b5e2c507b06c9d36411845149162a804ae7b04a9 [6260/13289] riscv: Kconfig: Allow RV32 to build with no MMU config: riscv-randconfig-r024-20230421 (https://download.01.org/0day-ci/archive/20230422/202304220118.NYuW8ip0-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 437b7602e4a998220871de78afcb020b9c14a661) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install riscv cross compiling tool for clang build # apt-get install binutils-riscv-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b5e2c507b06c9d36411845149162a804ae7b04a9 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout b5e2c507b06c9d36411845149162a804ae7b04a9 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/net/arcnet/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202304220118.NYuW8ip0-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:751:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] insw(addr, buffer, count); ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:105:53: note: expanded from macro 'insw' #define insw(addr, buffer, count) __insw(PCI_IOBASE + (addr), buffer, count) ~~~~~~~~~~ ^ In file included from drivers/net/arcnet/com20020.c:37: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:759:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] insl(addr, buffer, count); ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:106:53: note: expanded from macro 'insl' #define insl(addr, buffer, count) __insl(PCI_IOBASE + (addr), buffer, count) ~~~~~~~~~~ ^ In file included from drivers/net/arcnet/com20020.c:37: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:768:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] outsb(addr, buffer, count); ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:118:55: note: expanded from macro 'outsb' #define outsb(addr, buffer, count) __outsb(PCI_IOBASE + (addr), buffer, count) ~~~~~~~~~~ ^ In file included from drivers/net/arcnet/com20020.c:37: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:777:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] outsw(addr, buffer, count); ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:119:55: note: expanded from macro 'outsw' #define outsw(addr, buffer, count) __outsw(PCI_IOBASE + (addr), buffer, count) ~~~~~~~~~~ ^ In file included from drivers/net/arcnet/com20020.c:37: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:786:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] outsl(addr, buffer, count); ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:120:55: note: expanded from macro 'outsl' #define outsl(addr, buffer, count) __outsl(PCI_IOBASE + (addr), buffer, count) ~~~~~~~~~~ ^ In file included from drivers/net/arcnet/com20020.c:37: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:1134:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port; ~~~~~~~~~~ ^ >> drivers/net/arcnet/com20020.c:74:7: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] arcnet_insb(ioaddr, COM20020_REG_RW_MEMDATA, buf, count)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/arcnet/arcdevice.h:389:2: note: expanded from macro 'arcnet_insb' insb((addr) + BUS_ALIGN * (offset), buffer, count) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:104:53: note: expanded from macro 'insb' #define insb(addr, buffer, count) __insb(PCI_IOBASE + (addr), buffer, count) ~~~~~~~~~~ ^ drivers/net/arcnet/arcdevice.h:103:3: note: expanded from macro 'TIME' call; \ ^~~~ >> drivers/net/arcnet/com20020.c:74:7: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] arcnet_insb(ioaddr, COM20020_REG_RW_MEMDATA, buf, count)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/arcnet/arcdevice.h:389:2: note: expanded from macro 'arcnet_insb' insb((addr) + BUS_ALIGN * (offset), buffer, count) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:104:53: note: expanded from macro 'insb' #define insb(addr, buffer, count) __insb(PCI_IOBASE + (addr), buffer, count) ~~~~~~~~~~ ^ drivers/net/arcnet/arcdevice.h:110:3: note: expanded from macro 'TIME' call; \ ^~~~ drivers/net/arcnet/com20020.c:88:7: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] arcnet_outsb(ioaddr, COM20020_REG_RW_MEMDATA, buf, count)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/arcnet/arcdevice.h:391:2: note: expanded from macro 'arcnet_outsb' outsb((addr) + BUS_ALIGN * (offset), buffer, count) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:118:55: note: expanded from macro 'outsb' #define outsb(addr, buffer, count) __outsb(PCI_IOBASE + (addr), buffer, count) ~~~~~~~~~~ ^ drivers/net/arcnet/arcdevice.h:103:3: note: expanded from macro 'TIME' call; \ ^~~~ drivers/net/arcnet/com20020.c:88:7: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] arcnet_outsb(ioaddr, COM20020_REG_RW_MEMDATA, buf, count)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/arcnet/arcdevice.h:391:2: note: expanded from macro 'arcnet_outsb' outsb((addr) + BUS_ALIGN * (offset), buffer, count) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:118:55: note: expanded from macro 'outsb' #define outsb(addr, buffer, count) __outsb(PCI_IOBASE + (addr), buffer, count) ~~~~~~~~~~ ^ drivers/net/arcnet/arcdevice.h:110:3: note: expanded from macro 'TIME' call; \ ^~~~ 17 warnings generated. vim +74 drivers/net/arcnet/com20020.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 61 ^1da177e4c3f41 Linus Torvalds 2005-04-16 62 static void com20020_copy_from_card(struct net_device *dev, int bufnum, ^1da177e4c3f41 Linus Torvalds 2005-04-16 63 int offset, void *buf, int count) ^1da177e4c3f41 Linus Torvalds 2005-04-16 64 { ^1da177e4c3f41 Linus Torvalds 2005-04-16 65 int ioaddr = dev->base_addr, ofs = 512 * bufnum + offset; ^1da177e4c3f41 Linus Torvalds 2005-04-16 66 ^1da177e4c3f41 Linus Torvalds 2005-04-16 67 /* set up the address register */ 0fec65130b9f11 Joe Perches 2015-05-05 68 arcnet_outb((ofs >> 8) | RDDATAflag | AUTOINCflag, 0fec65130b9f11 Joe Perches 2015-05-05 69 ioaddr, COM20020_REG_W_ADDR_HI); 0fec65130b9f11 Joe Perches 2015-05-05 70 arcnet_outb(ofs & 0xff, ioaddr, COM20020_REG_W_ADDR_LO); ^1da177e4c3f41 Linus Torvalds 2005-04-16 71 ^1da177e4c3f41 Linus Torvalds 2005-04-16 72 /* copy the data */ 0fec65130b9f11 Joe Perches 2015-05-05 73 TIME(dev, "insb", count, 0fec65130b9f11 Joe Perches 2015-05-05 @74 arcnet_insb(ioaddr, COM20020_REG_RW_MEMDATA, buf, count)); ^1da177e4c3f41 Linus Torvalds 2005-04-16 75 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 76 :::::: The code at line 74 was first introduced by commit :::::: 0fec65130b9f11a73d74f47025491f97f82ba070 arcnet: com20020: Use arcnet_ routines :::::: TO: Joe Perches :::::: CC: Michael Grzeschik -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests