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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5875C433F5 for ; Sat, 25 Dec 2021 20:33:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232807AbhLYUXv (ORCPT ); Sat, 25 Dec 2021 15:23:51 -0500 Received: from mga09.intel.com ([134.134.136.24]:39189 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230261AbhLYUXu (ORCPT ); Sat, 25 Dec 2021 15:23:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1640463830; x=1671999830; h=date:from:to:cc:subject:message-id:mime-version; bh=Rn+SIe/77WgixQX+nKxhtuHqbdO2OXVI1x2Y+RIHVwE=; b=YlYh+eJqu0Xrt7MGsrQWEPInZ2myr/ucioIenHWVZ5UNjty5dYZz4mw0 1e2y19Q51zjwT4tvgrmSQO8uSdnxJBOfkOcE2aUk4KcQpSykqKEqo3ypi utjDnsl9UalaYIkD+oNh7Re8zf+xyJBArVGsG+Stnz18o1FBzpG9/sKNm NTT6AhFhpIHiq5LA2OjGEeB0r+RAQlIyLX39NxyeQDBGO6cuSOG3GcL1O GwxytxP8I5SDOQi4OIHol4jKVn0nkfIZmocowvcT+mSiREeMRMZP8t4zo H8bs7qlFOQXFalZNpgSDorFSuE/2jxBqUUB/VId2cPUkivMn1NP+KVhl/ g==; X-IronPort-AV: E=McAfee;i="6200,9189,10208"; a="240864567" X-IronPort-AV: E=Sophos;i="5.88,235,1635231600"; d="scan'208";a="240864567" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Dec 2021 12:23:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,235,1635231600"; d="scan'208";a="685914070" Received: from lkp-server01.sh.intel.com (HELO e357b3ef1427) ([10.239.97.150]) by orsmga005.jf.intel.com with ESMTP; 25 Dec 2021 12:23:48 -0800 Received: from kbuild by e357b3ef1427 with local (Exim 4.92) (envelope-from ) id 1n1DZz-0004eu-2b; Sat, 25 Dec 2021 20:23:47 +0000 Date: Sun, 26 Dec 2021 04:23:32 +0800 From: kernel test robot To: Masahiro Yamada Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Andrew Morton , Linux Memory Management List Subject: drivers/pci/controller/dwc/pci-keystone.c:1064:34: warning: unused variable 'ks_pcie_of_match' Message-ID: <202112260445.8QUwFOXX-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Masahiro, First bad commit (maybe != root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: b927dfc67d05a72167ab980c375ed98b2ee9c2c6 commit: ea29b20a828511de3348334e529a3d046a180416 init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM date: 10 months ago config: s390-randconfig-r013-20211226 (https://download.01.org/0day-ci/archive/20211226/202112260445.8QUwFOXX-lkp@intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a9e8b1ee7fd44b53c555a7823ae8fd1a8209c520) 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 s390 cross compiling tool for clang build # apt-get install binutils-s390x-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ea29b20a828511de3348334e529a3d046a180416 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout ea29b20a828511de3348334e529a3d046a180416 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash drivers/pci/controller/dwc/ drivers/s390/net/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32' (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ ^ In file included from drivers/pci/controller/dwc/pci-keystone.c:17: In file included from include/linux/irqchip/chained_irq.h:10: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/s390/include/asm/io.h:80: include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) ^ include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32' ___constant_swab32(x) : \ ^ include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32' (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ ^ In file included from drivers/pci/controller/dwc/pci-keystone.c:17: In file included from include/linux/irqchip/chained_irq.h:10: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/s390/include/asm/io.h:80: include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) ^ include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32' ___constant_swab32(x) : \ ^ include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32' (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ ^ In file included from drivers/pci/controller/dwc/pci-keystone.c:17: In file included from include/linux/irqchip/chained_irq.h:10: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/s390/include/asm/io.h:80: include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) ^ include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32' ___constant_swab32(x) : \ ^ include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32' (((__u32)(x) & (__u32)0xff000000UL) >> 24))) ^ In file included from drivers/pci/controller/dwc/pci-keystone.c:17: In file included from include/linux/irqchip/chained_irq.h:10: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/s390/include/asm/io.h:80: include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) ^ include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32' __fswab32(x)) ^ In file included from drivers/pci/controller/dwc/pci-keystone.c:17: In file included from include/linux/irqchip/chained_irq.h:10: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/s390/include/asm/io.h:80: include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ >> drivers/pci/controller/dwc/pci-keystone.c:1064:34: warning: unused variable 'ks_pcie_of_match' [-Wunused-const-variable] static const struct of_device_id ks_pcie_of_match[] = { ^ 21 warnings generated. vim +/ks_pcie_of_match +1064 drivers/pci/controller/dwc/pci-keystone.c 18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1063 18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 @1064 static const struct of_device_id ks_pcie_of_match[] = { 18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1065 { 18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1066 .type = "pci", 18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1067 .data = &ks_pcie_rc_of_data, 18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1068 .compatible = "ti,keystone-pcie", 18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1069 }, 18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1070 { 18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1071 .data = &ks_pcie_am654_rc_of_data, 18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1072 .compatible = "ti,am654-pcie-rc", 18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1073 }, 23284ad677a94f Kishon Vijay Abraham I 2019-03-25 1074 { 23284ad677a94f Kishon Vijay Abraham I 2019-03-25 1075 .data = &ks_pcie_am654_ep_of_data, 23284ad677a94f Kishon Vijay Abraham I 2019-03-25 1076 .compatible = "ti,am654-pcie-ep", 23284ad677a94f Kishon Vijay Abraham I 2019-03-25 1077 }, 18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1078 { }, 18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1079 }; 18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1080 :::::: The code at line 1064 was first introduced by commit :::::: 18b0415bc802a8bab5dedba5ae2757e83259e6ee PCI: keystone: Add support for PCIe RC in AM654x Platforms :::::: TO: Kishon Vijay Abraham I :::::: CC: Lorenzo Pieralisi --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org