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 62387CCA47F for ; Tue, 19 Jul 2022 23:11:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240590AbiGSXLs (ORCPT ); Tue, 19 Jul 2022 19:11:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233316AbiGSXLl (ORCPT ); Tue, 19 Jul 2022 19:11:41 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5953043E44 for ; Tue, 19 Jul 2022 16:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658272300; x=1689808300; h=date:from:to:cc:subject:message-id:mime-version; bh=gX+aXuy904qG7zowrwsZjreWxsmEUI/cyuZC9ZNlVr8=; b=KRBVwZ/xh8kYUZaEuVfClVqmT+Fe98teVqBUQdNMWuPtMgTjcXC0mQDn Y84xfLPYrIfAkkIYtf/Z653a42V/kUr+6vHN8P5TV4/9mGkVgV8DC0dB+ /6L5nviRgKxYXbAU/Yxej1nXSc0ivGP1hOoVrjEQYI/TTGndfAH/tB5KF oX8sChTAIeOS/+20VNHmPGmHh4dnDEPDb/LONzLFO5/s5X3cJ299KlYwU HloBFaTrRgaEe7H5tT5Nnxv8OkIrszi/oYkOFVH1fjZLkQMYWWEe+hJbP SS1WMSo8+0IrNs9bWJ8kgPpD1EI1xIuNlkyq6/4kb0l4hGoCNAAoNAgSF A==; X-IronPort-AV: E=McAfee;i="6400,9594,10413"; a="285392788" X-IronPort-AV: E=Sophos;i="5.92,285,1650956400"; d="scan'208";a="285392788" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2022 16:11:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,285,1650956400"; d="scan'208";a="924983401" Received: from lkp-server02.sh.intel.com (HELO ff137eb26ff1) ([10.239.97.151]) by fmsmga005.fm.intel.com with ESMTP; 19 Jul 2022 16:11:38 -0700 Received: from kbuild by ff137eb26ff1 with local (Exim 4.95) (envelope-from ) id 1oDwNN-0006D5-DZ; Tue, 19 Jul 2022 23:11:37 +0000 Date: Wed, 20 Jul 2022 07:11:19 +0800 From: kernel test robot To: Alexander Lobakin Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Vladimir Oltean , Florian Fainelli Subject: drivers/net/dsa/lan9303_i2c.c:87:34: warning: unused variable 'lan9303_i2c_of_match' Message-ID: <202207200746.F1Qd6rbA-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alexander, First bad commit (maybe != root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: ca85855bdcae8f84f1512e88b4c75009ea17ea2f commit: 227d72063fccb2d19b30fb4197fba478514f7d83 dsa: simplify Kconfig symbols and dependencies date: 1 year, 4 months ago config: s390-randconfig-r002-20220718 (https://download.01.org/0day-ci/archive/20220720/202207200746.F1Qd6rbA-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d74b88c69dc2644bd0dc5d64e2d7413a0d4040e5) 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=227d72063fccb2d19b30fb4197fba478514f7d83 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 227d72063fccb2d19b30fb4197fba478514f7d83 # 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=s390 SHELL=/bin/bash drivers/net/dsa/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from include/linux/regmap.h:20: In file included from include/linux/iopoll.h:14: 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/net/dsa/lan9303_i2c.c:10: In file included from drivers/net/dsa/lan9303.h:2: In file included from include/linux/regmap.h:20: In file included from include/linux/iopoll.h:14: 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/net/dsa/lan9303_i2c.c:10: In file included from drivers/net/dsa/lan9303.h:2: In file included from include/linux/regmap.h:20: In file included from include/linux/iopoll.h:14: 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/net/dsa/lan9303_i2c.c:10: In file included from drivers/net/dsa/lan9303.h:2: In file included from include/linux/regmap.h:20: In file included from include/linux/iopoll.h:14: 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/net/dsa/lan9303_i2c.c:10: In file included from drivers/net/dsa/lan9303.h:2: In file included from include/linux/regmap.h:20: In file included from include/linux/iopoll.h:14: 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/net/dsa/lan9303_i2c.c:87:34: warning: unused variable 'lan9303_i2c_of_match' [-Wunused-const-variable] static const struct of_device_id lan9303_i2c_of_match[] = { ^ 21 warnings generated. vim +/lan9303_i2c_of_match +87 drivers/net/dsa/lan9303_i2c.c be4e119f991451 Juergen Beisert 2017-04-18 86 be4e119f991451 Juergen Beisert 2017-04-18 @87 static const struct of_device_id lan9303_i2c_of_match[] = { be4e119f991451 Juergen Beisert 2017-04-18 88 { .compatible = "smsc,lan9303-i2c", }, be4e119f991451 Juergen Beisert 2017-04-18 89 { /* sentinel */ }, be4e119f991451 Juergen Beisert 2017-04-18 90 }; be4e119f991451 Juergen Beisert 2017-04-18 91 MODULE_DEVICE_TABLE(of, lan9303_i2c_of_match); be4e119f991451 Juergen Beisert 2017-04-18 92 :::::: The code at line 87 was first introduced by commit :::::: be4e119f991451a3f3385b4d167c016c6eb49e78 net: dsa: LAN9303: add I2C managed mode support :::::: TO: Juergen Beisert :::::: CC: David S. Miller -- 0-DAY CI Kernel Test Service https://01.org/lkp