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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2F7CC001DC for ; Sun, 30 Jul 2023 14:56:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229777AbjG3Oz7 convert rfc822-to-8bit (ORCPT ); Sun, 30 Jul 2023 10:55:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjG3Oz5 (ORCPT ); Sun, 30 Jul 2023 10:55:57 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C45A1708 for ; Sun, 30 Jul 2023 07:55:55 -0700 (PDT) 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-227-afRMa97OOsCFXP9pp-J2oA-1; Sun, 30 Jul 2023 15:55:52 +0100 X-MC-Unique: afRMa97OOsCFXP9pp-J2oA-1 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; Sun, 30 Jul 2023 15:55:50 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Sun, 30 Jul 2023 15:55:50 +0100 From: David Laight To: 'kernel test robot' , "'linux-kernel@vger.kernel.org'" , 'Andy Shevchenko' , 'Andrew Morton' , "'Matthew Wilcox (Oracle)'" , 'Christoph Hellwig' , "'Jason A. Donenfeld'" CC: "llvm@lists.linux.dev" , "oe-kbuild-all@lists.linux.dev" Subject: RE: [PATCH next v2 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness. Thread-Topic: [PATCH next v2 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness. Thread-Index: AdnBYvtzc0TxoNEXQSCZpxDmi1SwuQAVSEEAAE9F14A= Date: Sun, 30 Jul 2023 14:55:50 +0000 Message-ID: References: <202307290943.ODVeyeK6-lkp@intel.com> In-Reply-To: <202307290943.ODVeyeK6-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-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kernel test robot > Sent: 29 July 2023 03:01 > > kernel test robot noticed the following build errors: > ...) > compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git > 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a) > reproduce: (https://download.01.org/0day-ci/archive/20230729/202307290943.ODVeyeK6- > lkp@intel.com/reproduce) > ... > >> mm/percpu.c:3102:10: error: static assertion expression is not an integral constant expression > base = min(ptr, base); > ^~~~~~~~~~~~~~ ... ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/minmax.h:23:2: note: expanded from macro '__types_ok' > (is_signed_type(typeof(x)) == is_signed_type(typeof(y))) > ^ ... > mm/percpu.c:3102:10: note: cast that performs the conversions of a reinterpret_cast is not allowed > in a constant expression That is a C++ error that seems to have crept into C. The relevant definition is: #define is_signed_type(type) (((type)(-1)) < (type)1) This seems to have been fixed in clang 16.0.0. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)