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 2A2A0C0015E for ; Wed, 26 Jul 2023 09:50:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B4A896B0071; Wed, 26 Jul 2023 05:50:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AFA8A8D0001; Wed, 26 Jul 2023 05:50:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9C1FC6B0075; Wed, 26 Jul 2023 05:50:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 8C1D36B0071 for ; Wed, 26 Jul 2023 05:50:53 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 44A35A0C66 for ; Wed, 26 Jul 2023 09:50:53 +0000 (UTC) X-FDA: 81053293986.04.38859C9 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf15.hostedemail.com (Postfix) with ESMTP id 570D8A0003 for ; Wed, 26 Jul 2023 09:50:51 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=a7ywSVf3; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of maz@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=maz@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690365051; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=uWBXcAvVapDhsoSYAS/ZFBMueE/lehyGnQ5f5TwNMFA=; b=URa1jyjSDBNUt8iIVYtWwlV3AtMgOd5RPrpFsQ2/v7O5uxsOoGPVeRQmZ+qFJqq01RP4ET mKQhVeuekyrf5sJOrONPari3YQbTKfjhJP/oSSPL2SmcZOsfxh+BRLiEU3OII0sfL3hUW0 DgLJ9arRyBhasPq8vLxRtI/pRxvLIu8= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=a7ywSVf3; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of maz@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=maz@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690365051; a=rsa-sha256; cv=none; b=XkIW4vBpVuRszmJ2BZPX5XqLDeAFcIzBLP70c1IB950LJelGBCRPRw3YDdq4qnrmjdxZnG ezwdgQ5GR2Ia9vMYM9eH3Q3bNTiDQOh7iuLFl8RQYUrGGoYguGC53jW1dpU0KRkFMeVAC7 TG/FwZa3p8A5ca/0+llfur2ZeVX6rJY= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3A422613EA; Wed, 26 Jul 2023 09:50:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3D6AC433CA; Wed, 26 Jul 2023 09:50:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690365050; bh=O4YmiE5vXBjlCwUrmu8VGDGRks7rz4TOOmzW/5vJFWQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=a7ywSVf38d0iKHITMsCH8hHa9SRoY8nsU5TMbK+bEhnGsEnPyTqH+geBxV0VwFHap drknNutF38G16EbZAa29KHjwvXi/uDTvZDemIa0rnan2HMEUs3ti1q+8QxS89llpBy Z5qVTF7gHPmLDb2TiUJqKD6otckpOrwt9018oMGSoPEl31nesTWxjOWG/Kh6FbBl9n mVqEI3Tj7eQDqkeF4ykJolR/hcRoDcKK0+BuiGDORdLKqrtub/dPEbH+sfDFUxaw5Q FJIvcmr5HXa7JBCNjRgGPDYXXBj/lqLkMB2qgcQ2mlKU5kB+KQf/B5bv3bSSLpRGWU 09l/95TxZF7Gw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qObAL-00GzR2-VY; Wed, 26 Jul 2023 10:50:46 +0100 Date: Wed, 26 Jul 2023 10:50:45 +0100 Message-ID: <86ila7t30q.wl-maz@kernel.org> From: Marc Zyngier To: David Laight Cc: 'kernel test robot' , "'linux-kernel@vger.kernel.org'" , 'Andy Shevchenko' , 'Andrew Morton' , "'Matthew Wilcox (Oracle)'" , 'Christoph Hellwig' , "'Jason A.\ Donenfeld'" , "llvm@lists.linux.dev" , "oe-kbuild-all@lists.linux.dev" , "Linux\ Memory Management List" , Rob Herring Subject: Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness. In-Reply-To: <6bed42e871e74e898b400a404ec6d142@AcuMS.aculab.com> References: <202307260256.nzImScXA-lkp@intel.com> <6bed42e871e74e898b400a404ec6d142@AcuMS.aculab.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: David.Laight@ACULAB.COM, lkp@intel.com, linux-kernel@vger.kernel.org, andriy.shevchenko@linux.intel.com, akpm@linux-foundation.org, willy@infradead.org, hch@infradead.org, Jason@zx2c4.com, llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, linux-mm@kvack.org, robh@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 570D8A0003 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: u81s4onaxh15yp9xsnm1f313e4gjxhr6 X-HE-Tag: 1690365051-756270 X-HE-Meta: U2FsdGVkX1+bTt6TL5Mf8QLlZT9dg6KHRVtr3hFF0fAjvXoWvwWUFzjMEFzSbwRu/+Fa43NshCuayQgSKrmBXWxZF2YAl5i1G0DZvWMlyQVrygBiZjnAuNTBpxqBhP+EMAn9WwCllodSfGelfNR1idFGrvCHLZ8/p7nGuKSpWSz6YN2K1DT6ktMIwGFsLrgLOv6bak2lGhTmmARQj0cptnp6xVUNoSCw1V/0Mz1hGa1Z4t62LM7yLX5/JPLbSYmrS/m0hV9AS1FvftLNKJ/eAoJGEv+68nPGnFIjM4dlFe3EVfwqRjplGT4tvOit9tCrQmjCN8lGw7j8e9FP5rc8+U2pcvh22r4GuduzddsuKZW6ss329B1k1Wu0KuGmntaVtcHV58R5/LGWQzW43wGU1hdpOrxtfqazcEkXFH2cd+brHTG1HvIt0Fykp9U6RJzhvpcyanM+qe9avVLPcJtWhAEr8aL4Qr4/ax47AkKEvnQxrrZXw0cwudbxYJ1HOoaew5h8zs/wjpyZGU4D2GPwfQV/0C5QbGNXlzQTnfP43ASbJwI0PqJUHFIKv54Y/Ghi/hm1WfqLoUs5LohrDzKAuG9M/ylwNDYfPOFPJgJixS2OXxYoB0XoZMO1mSqWL9Ywo9e/msAKdM657mIHr0I990CWuyanAYgqCk0p2q+/n6H5DlGtk74fwaAYqIQTFDjv2Qun/wryIqltZDwpFPly2DZ39NSKZiHTC+OYw1PdF6DUYSp1cA4dllo+RNQO2i4m6Z8pmWoWIdP9hYAw9R3qAqWW3ospbENlGs0r4d89yAaUKUzIbGVfwXAUoUavSEbtvd9OdIWwZ1WEe8322G9+UZf5BQsssgGdC4Burbxz8wKLsJl1yra5FZ865DzptR6xfEgrc8amtIzd7HBw2Md0ysVL86/TzoreR8jGdWIKPj9meBoPGzY9eB5P6cectMPQ5O+trcKU62S9mEpFm/I 2wDoEm6S lEhhg/08gR7GP95t/5psP1VOeRrI/H26kXfeTOAn1i3sriIZaMMTqCnAJB5QWCS9PRJaJEBpmmwQKokK0DF+WWJLcta2GtvwIWM5MvqzAcYH5bDWcLttYC+lsbJnB3a9sBBdGYGnvvPQBJtHj57oryLaqMBlfRa53gIuqn3Bgiu/l5pkmUfOmz0foPvbz4g5uyFtJvsHIIJ2Q6vTymzdeooUK/9Hdchajp4xWSu4rSkpNoGgc5Q2QpBXPwskKjMLuOB0mrmoItozMdWDM7Mc/Q+iKTjTcsN7+tCTe3Z+Vl/Iv/9Mrl+zCpc1UbCkq2Zt10/TPmAWjBG7FQIgkd7x2g/DsmvfERlflE6xQ7eOQ1aQ0gq4SR0JWNieltS4njZGM1VbRLIywpl88zYM3z10PfvAVKhOo5apwEcSH 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: On Wed, 26 Jul 2023 10:19:48 +0100, David Laight wrote: > > > From: kernel test robot > > Sent: 25 July 2023 19:33 > ... > > > > All errors (new ones prefixed by >>): > > > > >> drivers/irqchip/irq-mips-cpu.c:288:1: error: call to undeclared function '__typecheck'; ISO C99 and > > later do not support implicit function declarations [-Wimplicit-function-declaration] > > 288 | IRQCHIP_DECLARE(cpu_intc, "mti,cpu-interrupt-controller", mips_cpu_irq_of_init); > > | ^ > > include/linux/irqchip.h:37:38: note: expanded from macro 'IRQCHIP_DECLARE' > > 37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn)) > > | ^ > > include/linux/irqchip.h:24:3: note: expanded from macro 'typecheck_irq_init_cb' > > 24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn) > > | ^ > > >> drivers/irqchip/irq-mips-cpu.c:288:1: error: initializer element is not a compile-time constant > > 288 | IRQCHIP_DECLARE(cpu_intc, "mti,cpu-interrupt-controller", mips_cpu_irq_of_init); > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/irqchip.h:37:2: note: expanded from macro 'IRQCHIP_DECLARE' > > 37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn)) > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/of.h:1493:3: note: expanded from macro 'OF_DECLARE_2' > > 1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2) > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/of.h:1481:2: note: expanded from macro '_OF_DECLARE' > > 1481 | _OF_DECLARE_STUB(table, name, compat, fn, fn_type) > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/of.h:1470:16: note: expanded from macro '_OF_DECLARE_STUB' > > 1470 | .data = (fn == (fn_type)NULL) ? fn : fn } > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > It looks like irqchip.h is using __typecheck() which is really > an internal part of the implementation of min() and max(). > The patched version doesn't use it - hence the build fail. > I can re-instate it, but this all looks wrong to me. Please see f1985002839a ("irqchip: Provide stronger type checking for IRQCHIP_MATCH/IRQCHIP_DECLARE") for the rationale. Given that this has uncovered a number of bugs, I'm not letting this go without an equivalent replacement. > The type of typecheck_irq_init_cb is the same as that of fn_type (although > they are defined separately). > Both headers seem to be testing the type - and it must match both. > So if the test in of.h worked the one in irqchip.h wouldn't have been added. > So I suspect it doesn't actually do anything - the RHS is NULL, the type > probably doesn't matter. They are used in different contexts. See IRQCHIP_MATCH(). M. -- Without deviation from the norm, progress is not possible.