From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 B801F3FB87 for ; Sat, 27 Jul 2024 21:59:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722117585; cv=none; b=H3/Ed2UcD3q6jN+Q1tsEh8QlGXC3zOm9vWoFxJe2TDRcIT/WS4axIRX0L6qCLrSDRrrL9VPrn38+EQ4BPKxykAnP8dRfoxfPTqtqrJmVq1raifgoc76EuFVlsTzd4XqvgCTRKRhUFX/a9Gz7QQFMsG0TeB2X9yr7kcdzMcM/yko= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722117585; c=relaxed/simple; bh=ic5eT7Y78u9DeduycJvq4GjMIBZtjACr7MlpLyQVzi4=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=nf3wQ/rvoLo3SYphTmLvYDTWIBD9tWMxbssaiJ0NJ4evki3yNjAWq11ZCmN1r6pEgr1cvMmZZp7/P9Uft9GFKFIU/GPlmv0ZxhhH4fiG3oXnKkK9VOLblOaDVZ6NvbGODdfCGzrlvZ9vKRxbbtjMPADYhkpzQsaULyRLN+XlI/U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=MvOe417P; arc=none smtp.client-ip=192.198.163.10 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="MvOe417P" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722117583; x=1753653583; h=date:from:to:cc:subject:message-id:mime-version; bh=ic5eT7Y78u9DeduycJvq4GjMIBZtjACr7MlpLyQVzi4=; b=MvOe417P0WOJiAQT5mQvF9/c9k1h/iliawP92LmBSwlfm2lrAS/eDLxh 5YKNiCKQYp/WdI5BElSNS8yYw4qiPeoBtogMN0H7S5sF5d5ak6HKdFM+K s6xSwKcHIePlr6ldKuY+SwsH9Kfpw+itqwq5IhAdUdbs7V/RCVZOoND5h C0nJ6wsUStybZlyUgv/JfI4GRnI4BOWCPi3RTvGJZpgfogeg3EbCwpy2/ 9WN4VvgabxfZzw2tZrPk6E4o/6UNrUhQwaiqfgxCgORa6VhpA+1hp9fs0 l6KZ3/Htfjbm/H9YFTn5QXLx6dkXwQUk2GcUkHoxEoC2rpydC0vf1ZRaR g==; X-CSE-ConnectionGUID: Hw/Kn07GRduKibzaM4ZMhg== X-CSE-MsgGUID: 012aYcH1QCyLyBghILlPTg== X-IronPort-AV: E=McAfee;i="6700,10204,11146"; a="31293267" X-IronPort-AV: E=Sophos;i="6.09,242,1716274800"; d="scan'208";a="31293267" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2024 14:59:43 -0700 X-CSE-ConnectionGUID: RI2SKwuxRNWt6Y/SNg+9qQ== X-CSE-MsgGUID: gfEmJfQdRrerJzznfFE2Ww== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,242,1716274800"; d="scan'208";a="58369300" Received: from lkp-server01.sh.intel.com (HELO 68891e0c336b) ([10.239.97.150]) by orviesa005.jf.intel.com with ESMTP; 27 Jul 2024 14:59:41 -0700 Received: from kbuild by 68891e0c336b with local (Exim 4.96) (envelope-from ) id 1sXpRy-000qH2-25; Sat, 27 Jul 2024 21:59:38 +0000 Date: Sun, 28 Jul 2024 05:59:07 +0800 From: kernel test robot To: Matti Vaittinen , Matti Vaittinen Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Mark Brown , Guenter Roeck Subject: drivers/iio/light/opt4001.c:215:9: error: call to '__compiletime_assert_529' declared with 'error' attribute: FIELD_PREP: value too large for the field Message-ID: <202407280532.J67mvOsV-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: ff30564411ffdcee49d579cb15eb13185a36e253 commit: 96e20adc43c4f81e9163a5188cee75a6dd393e09 regulator: change stubbed devm_regulator_get_enable to return Ok date: 3 months ago config: s390-randconfig-r064-20240727 (https://download.01.org/0day-ci/archive/20240728/202407280532.J67mvOsV-lkp@intel.com/config) compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240728/202407280532.J67mvOsV-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/202407280532.J67mvOsV-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from drivers/iio/light/opt4001.c:16: 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:78: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 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] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x)) ^ include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16' #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x)) ^ In file included from drivers/iio/light/opt4001.c:16: 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:78: include/asm-generic/io.h:573: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:35:59: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) ^ include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32' #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x)) ^ In file included from drivers/iio/light/opt4001.c:16: 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:78: include/asm-generic/io.h:584: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:594: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:604: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:692: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:700: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:708: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:717: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:726: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:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ >> drivers/iio/light/opt4001.c:215:9: error: call to '__compiletime_assert_529' declared with 'error' attribute: FIELD_PREP: value too large for the field reg |= FIELD_PREP(OPT4001_CTRL_CONV_TIME_MASK, chip->int_time); ^ include/linux/bitfield.h:115:3: note: expanded from macro 'FIELD_PREP' __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \ ^ include/linux/bitfield.h:68:3: note: expanded from macro '__BF_FIELD_CHECK' BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \ ^ include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:437:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:430:4: note: expanded from macro '__compiletime_assert' prefix ## suffix(); \ ^ :36:1: note: expanded from here __compiletime_assert_529 ^ 12 warnings and 1 error generated. vim +215 drivers/iio/light/opt4001.c 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 207 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 208 static int opt4001_set_conf(struct opt4001_chip *chip) 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 209 { 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 210 struct device *dev = &chip->client->dev; 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 211 u16 reg; 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 212 int ret; 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 213 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 214 reg = FIELD_PREP(OPT4001_CTRL_RANGE_MASK, OPT4001_CTRL_LIGHT_SCALE_AUTO); 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 @215 reg |= FIELD_PREP(OPT4001_CTRL_CONV_TIME_MASK, chip->int_time); 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 216 reg |= FIELD_PREP(OPT4001_CTRL_OPER_MODE_MASK, OPT4001_CTRL_OPER_MODE_CONTINUOUS); 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 217 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 218 ret = regmap_write(chip->regmap, OPT4001_CTRL, reg); 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 219 if (ret) 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 220 dev_err(dev, "Failed to set configuration\n"); 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 221 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 222 return ret; 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 223 } 9a9608418292bb Stefan Windfeldt-Prytz 2023-04-26 224 :::::: The code at line 215 was first introduced by commit :::::: 9a9608418292bb8733805c3f3123dfe0454fadac iio: light: Add support for TI OPT4001 light sensor :::::: TO: Stefan Windfeldt-Prytz :::::: CC: Jonathan Cameron -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki