From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (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 8B65F158DA7 for ; Sat, 5 Oct 2024 19:41:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728157290; cv=none; b=B0iHClMLWxaB4V2a2zhEsJlTA/Mvd0bsK80G9eSnv/PszV5Nonbma0xa02ioWbozwo8elUykHM7DcB/5y94FXO6Hpvp5JlSy5PeS45TFjsTJA7kKvWrfporvNX9ZvqjSOCJbtYCL5hi5lw5Gn93U30sNUqCyfwirw6Fv9w5PS1w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728157290; c=relaxed/simple; bh=F9ffWHOXFU+twnns7TksWrnHJMp26/yG5BdIDS9i8tQ=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=iIXEnJXgfN6HLFJh7lrizl/9naeQfYrbFmv0mNQDOkGoiPoCvumshGUang+mRSpgCjqaf0VS5Tf0CnmfWLrikGXMxzS/8g847RObNT2Zq261kUMo2MfOEIjTK5UqQmKt/WrTTjTMv7vQEaqcjLxBOLSQmHVlATsObvKwiNjTJiA= 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=OXU9H7DT; arc=none smtp.client-ip=192.198.163.9 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="OXU9H7DT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728157289; x=1759693289; h=date:from:to:cc:subject:message-id:mime-version; bh=F9ffWHOXFU+twnns7TksWrnHJMp26/yG5BdIDS9i8tQ=; b=OXU9H7DTI8jEDp3LFeh8iRXpk2pMtCBVnZxTI4DWYBex+dC5P9BeaXRx B/+dTKC43JPUsVweZZkPs4HkiwDHOAWkL6Q5M0hqi5gejma/gbOo+PM7c W1Cwiz16F1mJde+S8x9X+KDbv3WHf4fcN2CBI8F1wft2YNlQZUrGXMcIC mg2RTbbmN+5l2gDaDvY+sa/UlMcnjcBDA7sgMwws0Xa3dGW9B3y3Im5bd 18DsHdGXxHb6YRvSfvtMB3fAbY0szjmYaxVCPuqcVFCv5sn74+7h+PLS9 NUBpMxthuj76Xr674dy7GGW+s3KkyBBQJrXEVJba8SYsq8EPzdE2DTTKI w==; X-CSE-ConnectionGUID: rr07F32fQQ2eJzKltUhzKA== X-CSE-MsgGUID: kBz1xLrtSZCpPhfdaZQa6Q== X-IronPort-AV: E=McAfee;i="6700,10204,11216"; a="38008940" X-IronPort-AV: E=Sophos;i="6.11,181,1725346800"; d="scan'208";a="38008940" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2024 12:41:27 -0700 X-CSE-ConnectionGUID: er8KDNiFRkmWJIZKV4s+Ew== X-CSE-MsgGUID: N5pMxsSVQ+yKgXFgSrAueg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,181,1725346800"; d="scan'208";a="105798652" Received: from lkp-server01.sh.intel.com (HELO a48cf1aa22e8) ([10.239.97.150]) by fmviesa001.fm.intel.com with ESMTP; 05 Oct 2024 12:41:25 -0700 Received: from kbuild by a48cf1aa22e8 with local (Exim 4.96) (envelope-from ) id 1sxAeZ-0003Im-0Q; Sat, 05 Oct 2024 19:41:23 +0000 Date: Sun, 6 Oct 2024 03:40:53 +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_326' declared with 'error' attribute: FIELD_PREP: value too large for the field Message-ID: <202410060310.IDQuMDkm-lkp@intel.com> Precedence: bulk X-Mailing-List: oe-kbuild-all@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Matti, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 27cc6fdf720183dce1dbd293483ec5a9cb6b595e commit: 96e20adc43c4f81e9163a5188cee75a6dd393e09 regulator: change stubbed devm_regulator_get_enable to return Ok date: 6 months ago config: um-randconfig-r073-20241006 (https://download.01.org/0day-ci/archive/20241006/202410060310.IDQuMDkm-lkp@intel.com/config) compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project fef3566a25ff0e34fb87339ba5e13eca17cec00f) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241006/202410060310.IDQuMDkm-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/202410060310.IDQuMDkm-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from drivers/iio/light/opt4001.c:11: In file included from include/linux/i2c.h:19: In file included from include/linux/regulator/consumer.h:35: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:26: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: 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/um/include/asm/io.h:24: 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/iio/light/opt4001.c:11: In file included from include/linux/i2c.h:19: In file included from include/linux/regulator/consumer.h:35: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:26: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: 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/um/include/asm/io.h:24: 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/iio/light/opt4001.c:11: In file included from include/linux/i2c.h:19: In file included from include/linux/regulator/consumer.h:35: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:26: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: 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/um/include/asm/io.h:24: 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); | ~~~~~~~~~~ ^ include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 692 | 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] 700 | 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] 708 | 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] 717 | 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] 726 | 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] 735 | writesl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ In file included from drivers/iio/light/opt4001.c:11: In file included from include/linux/i2c.h:19: In file included from include/linux/regulator/consumer.h:35: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:21: In file included from include/linux/mm.h:2208: 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_" | ~~~~~~~~~~~ ^ ~~~ >> drivers/iio/light/opt4001.c:215:9: error: call to '__compiletime_assert_326' declared with 'error' attribute: FIELD_PREP: value too large for the field 215 | reg |= FIELD_PREP(OPT4001_CTRL_CONV_TIME_MASK, chip->int_time); | ^ include/linux/bitfield.h:115:3: note: expanded from macro 'FIELD_PREP' 115 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \ | ^ include/linux/bitfield.h:68:3: note: expanded from macro '__BF_FIELD_CHECK' 68 | BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \ | ^ include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG' 39 | #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' 437 | __compiletime_assert(condition, msg, prefix, suffix) | ^ include/linux/compiler_types.h:430:4: note: expanded from macro '__compiletime_assert' 430 | prefix ## suffix(); \ | ^ :25:1: note: expanded from here 25 | __compiletime_assert_326 | ^ 13 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