Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp1897888rwb; Sun, 6 Aug 2023 05:36:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE1+UzB3J07BeHrj4uqynmwtp4s5yBKBo68GoXFz7mKo7mW39aA/bfclqhuAD0HkfqbV83y X-Received: by 2002:a05:6a20:8f02:b0:13f:8855:d5a0 with SMTP id b2-20020a056a208f0200b0013f8855d5a0mr7212357pzk.50.1691325359900; Sun, 06 Aug 2023 05:35:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691325359; cv=none; d=google.com; s=arc-20160816; b=nH6nh3djzJaTslcjgQADkLSbYv+ZPtDETqtr3o4PiXC4Nqv8TUqvO9M9xmP8L/7nnf y2u4RDNspLRCaUP5Tzbt7YR/benmu69l+rurLHwBWvQr9S6eVCEt6GN+xRQJeeO3iIW7 aLZmSKF19CZzP00/2oG6mCvPxT7DsWR8WC0FA0VKfxQSidOoNIWleqqCCJq1v5BihVdJ QclUZunnFWTWbDiAw3YGn9VolxB1nEpuS8vuR4UfIo7qjm5ZxtXvlYyTds6EiVRmDgij W3c18DK1etRmEt8IFGR1iDH2ELPxjWuHaaosuuy5xgwmBueMe9RROuL5Ut4CbSqAMbq5 ZtpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=fPHD18CUwq6IqLamX2t9UjViTuA50EcWW025lZplAxc=; fh=ImVmTzOgDTlLB7+NK1t/fuCoVqmIku7eaxqcEYu/AUQ=; b=KRddKZR4X5o1w07FJbMWTaYFZzVVVctaM3Mv1m48Imvlpz1SnW1vsY2Iljjuin1hXs hMIcZo3DsRaRYI974UotrkyvJi8ZW/6ub2bEOgLAWRxa5Cz/iPJ0oQZqYWSdQ6M4emmy ugO9gQ5dKtx9kpxvAa13i+gIq8VCA3evhYMH60FTRtUHRj+389WjGfu+vaDzGXNIL4Wc 9wZQ4EdpUlv4dIxkIJRM2OzVvhM1MYZ4BsSKOYnyT/HcQA3o/Gk+0mi0Y2z4OMiyO8P8 UosFu3iq/JYZ4U0+l4/M27tWMjCIAubwzasv7MG13ZFMoJSg0Mkhyg6UwVYluIwWOXoe 551w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iwJlkK5L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h17-20020a633851000000b0055b43079642si4218832pgn.120.2023.08.06.05.35.48; Sun, 06 Aug 2023 05:35:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iwJlkK5L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230131AbjHFMBP (ORCPT + 99 others); Sun, 6 Aug 2023 08:01:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjHFMBO (ORCPT ); Sun, 6 Aug 2023 08:01:14 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2DE218F for ; Sun, 6 Aug 2023 05:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691323272; x=1722859272; h=date:from:to:cc:subject:message-id:mime-version; bh=bFk2Uyffzh0qINDT8S6Ck6B2YzcE0j1T2z0vk928D5U=; b=iwJlkK5LVvVY7aLkPzmTWxei5rEHAdB1spZMz7fY4aow8BteKervlGpF zEg9/LjFq+J4OevQQDWtuYNfBNsqLochgXFVsG+jFus+wKMLUALptlM7F q2wkKST6lxroN2oolS8GqBijX22FVJeMeqclvfIrTsh8r0eZCXieEGaIU UuZ/okFUFbt6FS3y1EyDl8rOx/7wnXfrT7GM81Td1zvNY7JALBLgSLXws a510GMhp2w6Sryw6WEAbsDWY4+0iDYQse48seXjoO/YEJpuk0iQlgCNmY DZShz9sBsg6TaUN58L1G9g0LQ9WxN4NORQmUuhs/H0CtAiRDBHxsbJiY9 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10794"; a="369283410" X-IronPort-AV: E=Sophos;i="6.01,259,1684825200"; d="scan'208";a="369283410" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Aug 2023 05:01:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10794"; a="795967972" X-IronPort-AV: E=Sophos;i="6.01,259,1684825200"; d="scan'208";a="795967972" Received: from lkp-server01.sh.intel.com (HELO d1ccc7e87e8f) ([10.239.97.150]) by fmsmga008.fm.intel.com with ESMTP; 06 Aug 2023 05:01:10 -0700 Received: from kbuild by d1ccc7e87e8f with local (Exim 4.96) (envelope-from ) id 1qScRZ-0004D1-1u; Sun, 06 Aug 2023 12:01:09 +0000 Date: Sun, 6 Aug 2023 20:00:10 +0800 From: kernel test robot To: Stefan Windfeldt-Prytz Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Jonathan Cameron Subject: drivers/iio/light/opt4001.c:215:9: error: call to '__compiletime_assert_355' declared with 'error' attribute: FIELD_PREP: value too large for the field Message-ID: <202308061902.0gVz6bSe-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: f0ab9f34e59e0c01a1c31142e0b336245367fd86 commit: 9a9608418292bb8733805c3f3123dfe0454fadac iio: light: Add support for TI OPT4001 light sensor date: 3 months ago config: s390-randconfig-r034-20230806 (https://download.01.org/0day-ci/archive/20230806/202308061902.0gVz6bSe-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce: (https://download.01.org/0day-ci/archive/20230806/202308061902.0gVz6bSe-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/202308061902.0gVz6bSe-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:75: 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/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu' 37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x)) | ^ include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16' 102 | #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:75: 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/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu' 35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) | ^ include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32' 115 | #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:75: 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); | ~~~~~~~~~~ ^ >> drivers/iio/light/opt4001.c:215:9: error: call to '__compiletime_assert_355' 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:114:3: note: expanded from macro 'FIELD_PREP' 114 | __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:385:2: note: expanded from macro '_compiletime_assert' 385 | __compiletime_assert(condition, msg, prefix, suffix) | ^ include/linux/compiler_types.h:378:4: note: expanded from macro '__compiletime_assert' 378 | prefix ## suffix(); \ | ^ :55:1: note: expanded from here 55 | __compiletime_assert_355 | ^ 12 warnings and 1 error generated. vim +215 drivers/iio/light/opt4001.c 207 208 static int opt4001_set_conf(struct opt4001_chip *chip) 209 { 210 struct device *dev = &chip->client->dev; 211 u16 reg; 212 int ret; 213 214 reg = FIELD_PREP(OPT4001_CTRL_RANGE_MASK, OPT4001_CTRL_LIGHT_SCALE_AUTO); > 215 reg |= FIELD_PREP(OPT4001_CTRL_CONV_TIME_MASK, chip->int_time); 216 reg |= FIELD_PREP(OPT4001_CTRL_OPER_MODE_MASK, OPT4001_CTRL_OPER_MODE_CONTINUOUS); 217 218 ret = regmap_write(chip->regmap, OPT4001_CTRL, reg); 219 if (ret) 220 dev_err(dev, "Failed to set configuration\n"); 221 222 return ret; 223 } 224 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki