From patchwork Tue Jul 25 10:00:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Laight X-Patchwork-Id: 125486 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2369285vqg; Tue, 25 Jul 2023 03:23:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlE5PBKIOMNX6qg21WSfR8gCQZBcIS5Gsk//+hVSAHr36JFBzgv7VIyNfxeklOXIbASzILr7 X-Received: by 2002:a17:902:c40f:b0:1b8:b382:f6c3 with SMTP id k15-20020a170902c40f00b001b8b382f6c3mr12745368plk.13.1690280592409; Tue, 25 Jul 2023 03:23:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690280592; cv=none; d=google.com; s=arc-20160816; b=mW3jvTQMHvCC3z2KE6O460PydW0hZXEmuY7oqKKUuKjZuVHiTq3POU/bV98z4eGHVg qoxkc85KTR3qGwfVIhLpBplC8TXCImt2Fv8cHQa2jIfOhA56HjiTdieRG/oHwIS4b9TM Bguj2hc0Q3nQgcZPsGx0kMWNqZxR/Eri49SdL921KpYkgWWFOixLYaswzOLDbnN+Pq9K IYNMzGRiGU75N9ZC12n3kcFBVBsLT50Sy/isPEmSWxV1qFbp8a1TZ6LOhTuz1nU20fqW r2RPkcF2bsnFhsjnIS3s5iLPPbNHCiDq/r2pt9447dnSVsK0j7R/aFj7nhfKYOsSuH9R FguA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:message-id:date:thread-index :thread-topic:subject:to:from; bh=7FgZr1hOCHwjepAypmq7IyHbtCFRrWtseoYTYe46vgw=; fh=6LDawf1JAWamBn08sBajPnNnIEu8LybObHHZW9kFGho=; b=LmzFskYu16GKsu6dmxCBEa9cWjOkyeZx4oaBDdwEofMeHm78W3nR1ppeas0YZG77Sk o/DJflNNpKvWziyb5gjXlsQpyWcwunOkS5m/ouL8xYnx1PcXrkTshBEV3MJUnDCN0Glm /tprgdnt3FFUalon6K19VDshDAznXi32O6RRSS0i2JQSbZQ9xJwKh+7iOkCNmAMAAYgc n4gk+9G4ACh9zUpv//XKCDVzhESd3u/HQtP5/6QVYkbjjqaEkX0t8vaWqTK05C3c0juj /53azWYEO/any/y+2xrckuDYNopYXFcQ5bo2/FNow47ErLgCZrqlLA6nVRfYFsxgYS7G AMmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h9-20020a170902f54900b001b8805f98e9si12289576plf.452.2023.07.25.03.22.59; Tue, 25 Jul 2023 03:23:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233543AbjGYKBR convert rfc822-to-8bit (ORCPT + 99 others); Tue, 25 Jul 2023 06:01:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232318AbjGYKBA (ORCPT ); Tue, 25 Jul 2023 06:01:00 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAD2F1B8 for ; Tue, 25 Jul 2023 03:00:58 -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-186-_RAmJghaNJynRNeVsanGXQ-1; Tue, 25 Jul 2023 11:00:55 +0100 X-MC-Unique: _RAmJghaNJynRNeVsanGXQ-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 25 Jul 2023 11:00:54 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Tue, 25 Jul 2023 11:00:54 +0100 From: David Laight To: "linux-kernel@vger.kernel.org" , "'Andy Shevchenko'" , 'Andrew Morton' , "Matthew Wilcox (Oracle)" , Christoph Hellwig , "Jason A. Donenfeld" Subject: [PATCH next 3/5] minmax: Fix indentation of __cmp_once() and __clamp_once() Thread-Topic: [PATCH next 3/5] minmax: Fix indentation of __cmp_once() and __clamp_once() Thread-Index: Adm+2uhEYdRM845VS9aP4OaIXcoeHg== Date: Tue, 25 Jul 2023 10:00:54 +0000 Message-ID: <14f73371ec6d473692ae4dd5d2710b67@AcuMS.aculab.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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772387662831235189 X-GMAIL-MSGID: 1772387662831235189 Remove the extra indentation and align continuation markers. Signed-off-by: David Laight --- include/linux/minmax.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/include/linux/minmax.h b/include/linux/minmax.h index 10d236ac7da6..179034479d5e 100644 --- a/include/linux/minmax.h +++ b/include/linux/minmax.h @@ -24,11 +24,11 @@ #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) #define __cmp_once(op, x, y, unique_x, unique_y) ({ \ - typeof(x) unique_x = (x); \ - typeof(y) unique_y = (y); \ - static_assert(__types_ok(x, y), \ - #op "(" #x ", " #y ") signedness error, fix types or consider " #op "_unsigned() before " #op "_t()"); \ - __cmp(op, unique_x, unique_y); }) + typeof(x) unique_x = (x); \ + typeof(y) unique_y = (y); \ + static_assert(__types_ok(x, y), \ + #op "(" #x ", " #y ") signedness error, fix types or consider " #op "_unsigned() before " #op "_t()"); \ + __cmp(op, unique_x, unique_y); }) #define __careful_cmp(op, x, y) \ __builtin_choose_expr(__is_constexpr((x) - (y)), \ @@ -38,15 +38,15 @@ #define __clamp(val, lo, hi) \ ((val) >= (hi) ? (hi) : ((val) <= (lo) ? (lo) : (val))) -#define __clamp_once(val, lo, hi, unique_val, unique_lo, unique_hi) ({ \ - typeof(val) unique_val = (val); \ - typeof(lo) unique_lo = (lo); \ - typeof(hi) unique_hi = (hi); \ - static_assert(!__is_constexpr((lo) > (hi)) || (lo) <= (hi), \ - "clamp() low limit " #lo " greater than high limit " #hi); \ - static_assert(__types_ok(val, lo), "clamp() 'lo' signedness error"); \ - static_assert(__types_ok(val, hi), "clamp() 'hi' signedness error"); \ - __clamp(unique_val, unique_lo, unique_hi); }) +#define __clamp_once(val, lo, hi, unique_val, unique_lo, unique_hi) ({ \ + typeof(val) unique_val = (val); \ + typeof(lo) unique_lo = (lo); \ + typeof(hi) unique_hi = (hi); \ + static_assert(!__is_constexpr((lo) > (hi)) || (lo) <= (hi), \ + "clamp() low limit " #lo " greater than high limit " #hi); \ + static_assert(__types_ok(val, lo), "clamp() 'lo' signedness error"); \ + static_assert(__types_ok(val, hi), "clamp() 'hi' signedness error"); \ + __clamp(unique_val, unique_lo, unique_hi); }) #define __careful_clamp(val, lo, hi) ({ \ __builtin_choose_expr(__is_constexpr((val) - (lo) + (hi)), \