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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FA4FC32771 for ; Wed, 28 Sep 2022 07:17:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 67C738E012B; Wed, 28 Sep 2022 03:17:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6358A8E0120; Wed, 28 Sep 2022 03:17:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4F43B8E012B; Wed, 28 Sep 2022 03:17:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 4057F8E0120 for ; Wed, 28 Sep 2022 03:17:29 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id F1ABC140840 for ; Wed, 28 Sep 2022 07:17:28 +0000 (UTC) X-FDA: 79960638576.20.7459950 Received: from mailgw02.mediatek.com (mailgw02.mediatek.com [216.200.240.185]) by imf28.hostedemail.com (Postfix) with ESMTP id 80C65C0010 for ; Wed, 28 Sep 2022 07:17:27 +0000 (UTC) X-UUID: daf2e5567bae4b5f8145452c3506f487-20220928 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=1aTaCCrl7rYniowf1LokmAOeAtm6qJrZJp2nfd2tGh8=; b=iRuE3hMtwWL4AyvJZsZLc3wOnNKbqQcozUccne241E3eDJfHQlfPS20X+GzGodJLzal1eiwgcl8eQpwTI5aS/4ivlhmBJuc8ZfzV3nOEHeDF+F7FP7USGkfDv1fCM/nlwyj4ikwF5nPzbdihbdHR08q8oaAnbYLugKtLcHP7YUk=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:80a42ece-7a0a-4bb5-bae8-62e68d6fca80,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:39a5ff1,CLOUDID:b76b56a3-dc04-435c-b19b-71e131a5fc35,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: daf2e5567bae4b5f8145452c3506f487-20220928 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 838372590; Wed, 28 Sep 2022 00:17:21 -0700 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Wed, 28 Sep 2022 14:56:44 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 28 Sep 2022 14:56:44 +0800 Message-ID: Subject: Re: [linux-next:master 8892/10852] include/linux/compiler_types.h:354:45: error: call to '__compiletime_assert_274' declared with attribute error: FIELD_PREP: mask is not constant From: Chunfeng Yun To: kernel test robot , Vinod Koul CC: , Linux Memory Management List Date: Wed, 28 Sep 2022 14:56:44 +0800 In-Reply-To: <202209280945.7nshWUEK-lkp@intel.com> References: <202209280945.7nshWUEK-lkp@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664349448; a=rsa-sha256; cv=none; b=LjI3sLkNwIjRRUem40EGEw3tAxftshTR3GMwxucDg5PvlJYkg7tp7dzPXCpX9SQZEP8Bl6 Wjep4lGJi6DPC5jeX6Yqw0qVY0jcouskgkUq7faqk25nBTXE/es8SaAtsRG7fBdOkqAK6j jqFsSTLx38eNjHVVpxtp9jp1vL54dHo= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=mediatek.com header.s=dk header.b=iRuE3hMt; dmarc=pass (policy=quarantine) header.from=mediatek.com; spf=pass (imf28.hostedemail.com: domain of chunfeng.yun@mediatek.com designates 216.200.240.185 as permitted sender) smtp.mailfrom=chunfeng.yun@mediatek.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664349448; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=1aTaCCrl7rYniowf1LokmAOeAtm6qJrZJp2nfd2tGh8=; b=aM1tjFUJ2IpWm0a8rggGBhNCV+Kms4YzvPeRLxY/JlX+TFju4QSXgrSAOSme3klUCQHQaP RrhHLZvDFUhSHJ0Mw2Gn/nNVWR9Lgp537GsMyEIoW1bNm2zpMqpKnRMrV0Rx8O61PlIcDE N3OfJLmj7F7ecjZNbxkyvXohZXHa+0A= X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 80C65C0010 X-Rspam-User: Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=mediatek.com header.s=dk header.b=iRuE3hMt; dmarc=pass (policy=quarantine) header.from=mediatek.com; spf=pass (imf28.hostedemail.com: domain of chunfeng.yun@mediatek.com designates 216.200.240.185 as permitted sender) smtp.mailfrom=chunfeng.yun@mediatek.com X-Stat-Signature: cowype7i1kx448wucwk7m8wmxz1xfidi X-HE-Tag: 1664349447-349075 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Vinod, On Wed, 2022-09-28 at 09:38 +0800, kernel test robot wrote: > tree: > https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git__;!!CTRNKA9wMg0ARbw!1QxZihNN3yCxrrmBJq8YLUep_3bHBb2rBGHOuNdinUSmSa7DEzMgOSwHIkRajBJAOc5p$ > master > head: 1bd8b75fe6adeaa89d02968bdd811ffe708cf839 > commit: c221baa355483548fb01456442615a838e66aec6 [8892/10852] phy: > mediatek: xsphy: remove macros used to prepare bitfield value > config: arc-randconfig-r043-20220926 > compiler: arc-elf-gcc (GCC) 12.1.0 > reproduce (this is a W=1 build): > wget > https://urldefense.com/v3/__https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross__;!!CTRNKA9wMg0ARbw!1QxZihNN3yCxrrmBJq8YLUep_3bHBb2rBGHOuNdinUSmSa7DEzMgOSwHIkRajP__aj3D$ > -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # > https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c221baa355483548fb01456442615a838e66aec6__;!!CTRNKA9wMg0ARbw!1QxZihNN3yCxrrmBJq8YLUep_3bHBb2rBGHOuNdinUSmSa7DEzMgOSwHIkRajBXTW0iT$ > > git remote add linux-next > https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git__;!!CTRNKA9wMg0ARbw!1QxZihNN3yCxrrmBJq8YLUep_3bHBb2rBGHOuNdinUSmSa7DEzMgOSwHIkRajBJAOc5p$ > > git fetch --no-tags linux-next master > git checkout c221baa355483548fb01456442615a838e66aec6 > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 > make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash > > If you fix the issue, kindly add following tag where applicable > > Reported-by: kernel test robot > > All errors (new ones prefixed by >>): > > In file included from : > drivers/phy/mediatek/phy-mtk-io.h: In function > 'mtk_phy_update_field': > > > include/linux/compiler_types.h:354:45: error: call to > > > '__compiletime_assert_274' declared with attribute error: > > > FIELD_PREP: mask is not constant > > 354 | _compiletime_assert(condition, msg, > __compiletime_assert_, __COUNTER__) > | ^ > include/linux/compiler_types.h:335:25: note: in definition of > macro '__compiletime_assert' > 335 | prefix ## > suffix(); \ > | ^~~~~~ > include/linux/compiler_types.h:354:9: note: in expansion of macro > '_compiletime_assert' > 354 | _compiletime_assert(condition, msg, > __compiletime_assert_, __COUNTER__) > | ^~~~~~~~~~~~~~~~~~~ > include/linux/build_bug.h:39:37: note: in expansion of macro > 'compiletime_assert' > 39 | #define BUILD_BUG_ON_MSG(cond, msg) > compiletime_assert(!(cond), msg) > | ^~~~~~~~~~~~~~~~~~ > include/linux/bitfield.h:65:17: note: in expansion of macro > 'BUILD_BUG_ON_MSG' > 65 > | BUILD_BUG_ON_MSG(!__builtin_constant_p(_mask), > \ > | ^~~~~~~~~~~~~~~~ > include/linux/bitfield.h:114:17: note: in expansion of macro > '__BF_FIELD_CHECK' > 114 | __BF_FIELD_CHECK(_mask, 0ULL, _val, > "FIELD_PREP: "); \ > | ^~~~~~~~~~~~~~~~ > drivers/phy/mediatek/phy-mtk-io.h:42:40: note: in expansion of > macro 'FIELD_PREP' > 42 | mtk_phy_update_bits(reg, mask, FIELD_PREP(mask, > val)); > | ^~~~~~~~~~ > > > vim +/__compiletime_assert_274 +354 include/linux/compiler_types.h > > eb5c2d4b45e3d2 Will Deacon 2020-07-21 340 > eb5c2d4b45e3d2 Will Deacon 2020-07-21 341 #define > _compiletime_assert(condition, msg, prefix, suffix) \ > eb5c2d4b45e3d2 Will Deacon 2020-07-21 342 __compiletime_assert(co > ndition, msg, prefix, suffix) > eb5c2d4b45e3d2 Will Deacon 2020-07-21 343 > eb5c2d4b45e3d2 Will Deacon 2020-07-21 344 /** > eb5c2d4b45e3d2 Will Deacon 2020-07-21 345 * compiletime_assert - > break build and emit msg if condition is false > eb5c2d4b45e3d2 Will Deacon 2020-07-21 346 * @condition: a compile- > time constant condition to check > eb5c2d4b45e3d2 Will Deacon 2020-07-21 347 * @msg: a message > to emit if condition is false > eb5c2d4b45e3d2 Will Deacon 2020-07-21 348 * > eb5c2d4b45e3d2 Will Deacon 2020-07-21 349 * In tradition of POSIX > assert, this macro will break the build if the > eb5c2d4b45e3d2 Will Deacon 2020-07-21 350 * supplied condition is > *false*, emitting the supplied error message if the > eb5c2d4b45e3d2 Will Deacon 2020-07-21 351 * compiler has support > to do so. > eb5c2d4b45e3d2 Will Deacon 2020-07-21 352 */ > eb5c2d4b45e3d2 Will Deacon 2020-07-21 353 #define > compiletime_assert(condition, msg) \ > eb5c2d4b45e3d2 Will Deacon 2020-07-21 @354 _compiletime_assert(con > dition, msg, __compiletime_assert_, __COUNTER__) > eb5c2d4b45e3d2 Will Deacon 2020-07-21 355 > > :::::: The code at line 354 was first introduced by commit > :::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move > compiletime_assert() macros into compiler_types.h > > :::::: TO: Will Deacon > :::::: CC: Will Deacon > Maybe my local compiler's parameter is not right, I don't encounter this warning when test it. Already sent out a fixed patch: [next] phy: mediatek: fix build warning of FIELD_PREP() https://patchwork.kernel.org/project/linux-mediatek/patch/20220926023750.21183-1-chunfeng.yun@mediatek.com/