Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3107242rdh; Thu, 28 Sep 2023 02:53:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGvPptAfGswYvvVWAWQ+4UEm06WS+scPiL0J2p9ZjXmKPKSrFgL6GpIrVrCB5CeAip/HBgb X-Received: by 2002:a17:90a:bb8c:b0:268:5558:de4c with SMTP id v12-20020a17090abb8c00b002685558de4cmr578494pjr.38.1695894828123; Thu, 28 Sep 2023 02:53:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695894828; cv=none; d=google.com; s=arc-20160816; b=G9Eytvigz9ej/+3XIa754bMjHDPNjfA9JsyiUr523o9Z+ItID6bWzGwpEWmm2ILRCp Ca9hWCLw0dGEc+XYQ9EbdeqR7oJkI+9x+XQ/44HkQypV6zpDcoQcJHdvNRSFfNQQFyxl VcZxl8yi4TlsH0KEBwwfRv3dlcRTjOzr5GSTIFqMCr61VGbOSolsUDIK5qATUB/gYV3u 69EOwUpq2B90i9pf/0kNF7L3jhXRLOUSWtg/nBL0Js40Vi3PGhLOzqaUwdkYn2dVZmNC IK7kQw4oBOwXdH3L2CqQ/gIgQi8wF5noOwzK81VoinKOhKwCUBPqtQfXa9R3IKsN2YPo F5Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lb4cyvqd0iAUyTrfY0hZMXZEe3oz5M4w0wG/5J0ePNo=; fh=NsAPIa/U2YAA1eomBLmwZPlaJJ2S8cDGv3KeOxZlOOo=; b=iAksROSLycoyzDhX7o+9TIthI6Gz4KZAtLM2su9HVDisKVtjop+moW5vTVB7nTdvq6 vPEmOb0C8XEXDb7tCpTJchXvOfpbCTEqEFa1FTx5F85mpUe+jXxAx8dfHJ12a0luVFE9 3mv7Cq8+lrQ0d+rbuT/7FjedoAQ1ndqRUIzpxqUBLl5mjrLAzDv/aZH9OkmicX7Xt983 WhwO1JFZlT+88B5UU9PsEaNgOkA8n44KEp1spyIEycy+R78HdaWkYVYHb9BxQUO8Wao/ /ov/ZCftyUJaVFoskm5Xi28YbymfEi0a1lLrLWoKGUMlE9/CpysxhWBXMe8J6pet3loZ ptKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Dh6XG/Ax"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id t2-20020a17090aba8200b00276bdabe471si11366370pjr.163.2023.09.28.02.53.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 02:53:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Dh6XG/Ax"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 49B1883CC92E; Thu, 28 Sep 2023 01:38:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229639AbjI1Iip (ORCPT + 99 others); Thu, 28 Sep 2023 04:38:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229605AbjI1Iin (ORCPT ); Thu, 28 Sep 2023 04:38:43 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46377AC for ; Thu, 28 Sep 2023 01:38:42 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-9adca291f99so1588354566b.2 for ; Thu, 28 Sep 2023 01:38:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695890321; x=1696495121; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=lb4cyvqd0iAUyTrfY0hZMXZEe3oz5M4w0wG/5J0ePNo=; b=Dh6XG/AxUatbqIwrm/B8KC/fs3t5Hww35d+/qDoihEzTJ3XOrQjtFlEG8/goUJyaSh seGD099B0DEXRIKbPdafIuU+AIz/a+ihIHUyevJkDReRf3sTVFkaaieKw4YNBdj9DkoQ 623/rt+6a2CNnN4OOjkOr6P8UVapa4rnKBHbk6yKBrWjV4v8SMV1GYyD9QrshdPTpJ5m 8xdGzPT/TOuOAhpB+0NDGEW2lasirmTkeHJ6oNrUWPRstMpRN1+bCl2NTrI9FwQRYKv6 pIvq6/ot6Sp8mmGwWAzgyP17nNdERY1G+zOuFZEjxbPhq84Ifij4194/4hSX8ZGQ9y9z CVQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695890321; x=1696495121; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=lb4cyvqd0iAUyTrfY0hZMXZEe3oz5M4w0wG/5J0ePNo=; b=Dn3BqLKfPBVF1IyfPqnk9Cd1RjaT4TenwHnPsWvqCipx9+V0BF0FHabMnnixOi8i4h L8MAkSh3drxfGqSkGK48lEO7eJfnB1mWdOHeOraRC3OGjaMpSeD1kt6dMEIFe+ixGlT5 Tph7yUgiX7d9hd/zorC77upRvvRNOoSJSYXy8jZIMy5fJukP//VMCNu0QSPDG3WFhtQZ /mLkClC/HZGh8zMVjo1Cf1qYBFyoyF+q6Wu/tanHjSSdlmC79o14CwPQzK0VbSpG+M2W +FM01vUWedtpfltK8ljrUb95Us8060mqGDkIEfn+Wf1639O6oCAVDexSIvps0fKzGA7i AppQ== X-Gm-Message-State: AOJu0YwNBBfxS/wA68IDt4qpm4z2FCFiv2wpYkAb8sDyMTsGrXffIXXE KdzOcGGRPNcgzU/1r9jYe723i2OYxw== X-Received: by 2002:a17:907:75e5:b0:9a1:c2fe:41d9 with SMTP id jz5-20020a17090775e500b009a1c2fe41d9mr494168ejc.47.1695890320460; Thu, 28 Sep 2023 01:38:40 -0700 (PDT) Received: from p183 ([46.53.254.83]) by smtp.gmail.com with ESMTPSA id d19-20020a17090692d300b009ae69c303aasm10020484ejx.137.2023.09.28.01.38.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 01:38:39 -0700 (PDT) Date: Thu, 28 Sep 2023 11:38:38 +0300 From: Alexey Dobriyan To: Matthew Wilcox Cc: David Laight , linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, Jason@zx2c4.com, hch@infradead.org, andriy.shevchenko@linux.intel.com, akpm@linux-foundation.org Subject: Re: + minmax-add-umina-b-and-umaxa-b.patch added to mm-nonmm-unstable branch Message-ID: References: <20230927173033.AF86DC433C7@smtp.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 28 Sep 2023 01:38:53 -0700 (PDT) On Wed, Sep 27, 2023 at 09:00:37PM +0100, Matthew Wilcox wrote: > On Wed, Sep 27, 2023 at 10:21:41PM +0300, Alexey Dobriyan wrote: > > On Wed, Sep 27, 2023 at 10:30:33AM -0700, Andrew Morton wrote: > > > +#define umin(x, y) \ > > > + __careful_cmp((x) + 0u + 0ul + 0ull, (y) + 0u + 0ul + 0ull, <) > > > > kmin() and kmax() are (of course!) much better names. > > it's unsigned, not user. Yes, but the same idea applies to signed types: min, max require identical types min_t force type kmin, kmax are relaxed min/max versions if signednesses match.