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 74381E7717F for ; Tue, 10 Dec 2024 10:27:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C76856B016B; Tue, 10 Dec 2024 05:27:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BFE656B016C; Tue, 10 Dec 2024 05:27:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A9EFD6B016D; Tue, 10 Dec 2024 05:27:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 86B4D6B016B for ; Tue, 10 Dec 2024 05:27:04 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 41C14AE2CD for ; Tue, 10 Dec 2024 10:27:04 +0000 (UTC) X-FDA: 82878671064.05.110C685 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by imf08.hostedemail.com (Postfix) with ESMTP id D0DE0160004 for ; Tue, 10 Dec 2024 10:26:45 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=aculab.com; spf=pass (imf08.hostedemail.com: domain of david.laight@aculab.com designates 185.58.85.151 as permitted sender) smtp.mailfrom=david.laight@aculab.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733826405; 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; bh=zkH2lkGCz1cD8NNUwxsnOnj5yrgqOkMCP+qIGUq8HFY=; b=xaXlt7+CBu3rOzuXan6VOsWUWFYGML08/UT7wkzSNFE9ThQO0wZ2UMnFYcVffmR8+i1tTw S6hz92MfVoLHxh74RCsZtlyCnHI8OEuNAr63fT0L7TSQF6WgTXWmmj4q+M6y1ZX4CQnlMa 7J0NKFBjhodHPiHZ4B/SVRNCWxynb/0= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=aculab.com; spf=pass (imf08.hostedemail.com: domain of david.laight@aculab.com designates 185.58.85.151 as permitted sender) smtp.mailfrom=david.laight@aculab.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733826405; a=rsa-sha256; cv=none; b=62zo+f0pjFZUXQERDyHlBEtZEoN1iKXwUJHFC0C3pUD7nuE/8EIC1xn3BjGCaUaQvkbLiO 56RwPJa03VrafNZGnmN+sgup2+IOFuNs9h0+FqNrLhzPBqrm79A6gsNrxI2Z92+AmJO6yJ H6/wFUJPoNlA9+DC5SH0SBFt8wQOv9Q= Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-318-T0mdwBzoMZWTGMO_oKF3Ww-1; Tue, 10 Dec 2024 10:26:55 +0000 X-MC-Unique: T0mdwBzoMZWTGMO_oKF3Ww-1 X-Mimecast-MFC-AGG-ID: T0mdwBzoMZWTGMO_oKF3Ww Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 10 Dec 2024 10:26:00 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Tue, 10 Dec 2024 10:26:00 +0000 From: David Laight To: 'kernel test robot' , Jani Nikula , "'jbarnes@virtuousgeek.org'" , Daniel Vetter CC: "oe-kbuild-all@lists.linux.dev" , "Andrew Morton" , Linux Memory Management List Subject: RE: [linux-next:master 2241/2462] include/linux/compiler_types.h:542:45: error: call to '__compiletime_assert_413' declared with attribute error: clamp() low limit source_min greater than high limit source_max Thread-Topic: [linux-next:master 2241/2462] include/linux/compiler_types.h:542:45: error: call to '__compiletime_assert_413' declared with attribute error: clamp() low limit source_min greater than high limit source_max Thread-Index: AQHbSp/Lj7Q1RhUWJEeVU9C2tm5C/rLfQkoQ Date: Tue, 10 Dec 2024 10:26:00 +0000 Message-ID: References: <202412100848.HfPEKlvV-lkp@intel.com> In-Reply-To: <202412100848.HfPEKlvV-lkp@intel.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 0WfZ4MDcu4zN-C5Ev74bxU4s1IjnO7cMjczWEnBR-mE_1733826415 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: D0DE0160004 X-Rspamd-Server: rspam12 X-Stat-Signature: ap1yy9o16kk3ok9zrqp3ugx8zdzcs9no X-Rspam-User: X-HE-Tag: 1733826405-939813 X-HE-Meta: U2FsdGVkX18jrp+D/GmPICVIM2z7K/6O80QHP6pFcgyVLquG8gPQXSVMY+G0NjqA49jCkne0xkk02ztMMPfmgOolww8iO+A7mbVhCqqhuLD+WWags3r+IULN8+he0hR05iWjHImt7nP3j3mCKHbGeCgCDUQNzUWMi5DCIwFT958IxD3G9lt+NvRNPGFBjfRhXSYg+2t/7NSjPmvRQiaeNdf+vEC9Ji1d+D+cklKvcClYlkY07KKf4TYMnM51Eias1FTvM7sdq4qU4NRb/NJ/JumjH8V1QGIXPTWyQZlsYLfap36/6f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gLFOXIy4J2tCjf7b6t5+9MDVAcuk8I1rKi1jQOuUoFnhzZ0TXxggd/WYbEBq2o1598T0mDfGuDYdntpxuvxwWQbsxLRYYcQ1g+LaS9mL9f0yp1WySzbcEGPxgR6xIi+hYfeWEVEbs+CzSlMUPUrZdnV3wKVg9cYyMBuPWrw6XI0kUIuO18PUJ0dAteXfbKzsHzhNPJykQ5HbzJ+DhOOtu4bPMUqcRVLADnFNKgRHA6RhLOU1d85tpWM1pyt9TdWEqqGMhtiOofE6KpciRPS7+Lb0gYuioTggBYAuVPNi+icyQ8XimxRd7k4O/ji 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: List-Subscribe: List-Unsubscribe: > drivers/gpu/drm/i915/display/intel_backlight.c: In function 'scale': I think this has been reported before. The 'problem' is in drivers/gpu/drm/i915/display/intel_backlight.c The compiler is inlining functions enough to detect a call to clamp() with min > max. The error isn't obvious and even the full compiler output doesn't say where 'scale' is being inlined from so it is hard to see why there is a problem. I'm not in a position to rerun the failing build. Probably needs rerunning with the lines commented out one by one to see whi= ch is responsible. =09David > -----Original Message----- > From: kernel test robot > Sent: 10 December 2024 01:07 > To: David Laight > Cc: oe-kbuild-all@lists.linux.dev; Andrew Morton ; Linux Memory Management > List > Subject: [linux-next:master 2241/2462] include/linux/compiler_types.h:542= :45: error: call to > '__compiletime_assert_413' declared with attribute error: clamp() low lim= it source_min greater than > high limit source_max >=20 > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.g= it master > head: d1486dca38afd08ca279ae94eb3a397f10737824 > commit: 58febb0202b31e9e8d55a603a70f7f131455ef2f [2241/2462] minmax.h: us= e BUILD_BUG_ON_MSG() for the > lo < hi test in clamp() > config: parisc-allmodconfig (https://download.01.org/0day-ci/archive/2024= 1210/202412100848.HfPEKlvV- > lkp@intel.com/config) > compiler: hppa-linux-gcc (GCC) 14.2.0 > reproduce (this is a W=3D1 build): (https://download.01.org/0day- > ci/archive/20241210/202412100848.HfPEKlvV-lkp@intel.com/reproduce) >=20 > If you fix the issue in a separate patch/commit (i.e. not just a new vers= ion of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202412100848.HfPEKlvV-lkp= @intel.com/ >=20 > All errors (new ones prefixed by >>): >=20 > In file included from : > drivers/gpu/drm/i915/display/intel_backlight.c: In function 'scale': > >> include/linux/compiler_types.h:542:45: error: call to '__compiletime_a= ssert_413' declared with > attribute error: clamp() low limit source_min greater than high limit sou= rce_max > 542 | _compiletime_assert(condition, msg, __compiletime_asse= rt_, __COUNTER__) > | ^ > include/linux/compiler_types.h:523:25: note: in definition of macro '_= _compiletime_assert' > 523 | prefix ## suffix(); = \ > | ^~~~~~ > include/linux/compiler_types.h:542:9: note: in expansion of macro '_co= mpiletime_assert' > 542 | _compiletime_assert(condition, msg, __compiletime_asse= rt_, __COUNTER__) > | ^~~~~~~~~~~~~~~~~~~ > include/linux/build_bug.h:39:37: note: in expansion of macro 'compilet= ime_assert' > 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond)= , msg) > | ^~~~~~~~~~~~~~~~~~ > include/linux/minmax.h:109:9: note: in expansion of macro 'BUILD_BUG_O= N_MSG' > 109 | BUILD_BUG_ON_MSG(statically_true(ulo > uhi), = \ > | ^~~~~~~~~~~~~~~~ > include/linux/minmax.h:116:9: note: in expansion of macro '__clamp_onc= e' > 116 | __clamp_once(val, lo, hi, __UNIQUE_ID(v_), __UNIQUE_ID= (l_), __UNIQUE_ID(h_)) > | ^~~~~~~~~~~~ > include/linux/minmax.h:192:28: note: in expansion of macro '__careful_= clamp' > 192 | #define clamp(val, lo, hi) __careful_clamp(val, lo, hi) > | ^~~~~~~~~~~~~~~ > drivers/gpu/drm/i915/display/intel_backlight.c:47:22: note: in expansi= on of macro 'clamp' > 47 | source_val =3D clamp(source_val, source_min, source_ma= x); > | ^~~~~ >=20 >=20 > vim +/__compiletime_assert_413 +542 include/linux/compiler_types.h >=20 > eb5c2d4b45e3d2 Will Deacon 2020-07-21 528 > eb5c2d4b45e3d2 Will Deacon 2020-07-21 529 #define _compiletime_assert(c= ondition, msg, prefix, > suffix) \ > eb5c2d4b45e3d2 Will Deacon 2020-07-21 530 =09__compiletime_assert(condi= tion, msg, prefix, suffix) > eb5c2d4b45e3d2 Will Deacon 2020-07-21 531 > eb5c2d4b45e3d2 Will Deacon 2020-07-21 532 /** > eb5c2d4b45e3d2 Will Deacon 2020-07-21 533 * compiletime_assert - break= build and emit msg if > condition is false > eb5c2d4b45e3d2 Will Deacon 2020-07-21 534 * @condition: a compile-time= constant condition to check > eb5c2d4b45e3d2 Will Deacon 2020-07-21 535 * @msg: a message to e= mit if condition is false > eb5c2d4b45e3d2 Will Deacon 2020-07-21 536 * > eb5c2d4b45e3d2 Will Deacon 2020-07-21 537 * In tradition of POSIX asse= rt, this macro will break the > build if the > eb5c2d4b45e3d2 Will Deacon 2020-07-21 538 * supplied condition is *fal= se*, emitting the supplied > error message if the > eb5c2d4b45e3d2 Will Deacon 2020-07-21 539 * compiler has support to do= so. > eb5c2d4b45e3d2 Will Deacon 2020-07-21 540 */ > eb5c2d4b45e3d2 Will Deacon 2020-07-21 541 #define compiletime_assert(co= ndition, msg) \ > eb5c2d4b45e3d2 Will Deacon 2020-07-21 @542 =09_compiletime_assert(condit= ion, msg, > __compiletime_assert_, __COUNTER__) > eb5c2d4b45e3d2 Will Deacon 2020-07-21 543 >=20 > :::::: The code at line 542 was first introduced by commit > :::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compilet= ime_assert() macros into > compiler_types.h >=20 > :::::: TO: Will Deacon > :::::: CC: Will Deacon >=20 > -- > 0-DAY CI Kernel Test Service > https://github.com/intel/lkp-tests/wiki - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)