Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1404909rwb; Fri, 28 Jul 2023 08:59:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlE5gQBI2T6KKFaThNPZkT68DvZTbw5YQwpJUSgEXYhwo8cPFmAKQPmi1roMZAZtDY4FOazc X-Received: by 2002:a05:6a00:2e05:b0:668:7292:b2c2 with SMTP id fc5-20020a056a002e0500b006687292b2c2mr2246330pfb.2.1690559965160; Fri, 28 Jul 2023 08:59:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690559965; cv=none; d=google.com; s=arc-20160816; b=eFG+yjPYgWKi00mZclLoKsDVPE19ef7V+aEkkHqveOlxCbxJ4KqFYkN6umUavPrEri MrLc2AWcJigwqcWnXcLbWb8CzRZkAJFqXkmS8gD7PKL0Ua4t3hFSq33b3s8Ws1oV2Tpk fADIRQAAbcei6L0aIoFHCRQ3iY7iAfkIUbYNL98ZBMIFbfpQ1JSf6Hc3uVE0mKwCs8R9 l5t2+SDn6BUjejz586Linv1u3x2aP9R2QDZBG+eYjKMeLI4GsHFAYinxSru/mdJGk9eu MzL2r5w6alYX1k2yEYsUIVrBDf/OopIsbHT0boFE28UXX8usKpyoUFwJSAFCmXgGhH35 9+vA== 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:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:to:from; bh=dJWhDJ2HXwm/mwDlbEP1u47zo6q3T8jkIFXdhx9BwDM=; fh=lQu0FQMQB/KijsOLYPBSZ4oPXp6gJVSgtvs90PKCM00=; b=pbuAS+cCRbxlhfNvIu5XDKY6TnenVzIJ4i8XdtvjxiuUPLi3dK9it7yS15PR3lJjFd ipeb2d8qjg3H/7JXzux8SPoA29HBlevJDqIh6qXslyNl1rMUQsS0tJE/cuZ9Iy8/VpeF hrmNI0ftLCf4rOaZln1WLARjmvDdoIy2nWXU/PnKvcyIdS9tQHeFoCAEmxUcd1BCcRsl ogHubZgFG9dkiDLrtIPcofsaiz+xNP8REk79ZRjHyYjVHsqSdSWgVLIFkYmUzArR+E12 uqpGRfmtTOzrJOni898Pe821fFw4S1ZL/sScoRG68f9P8xh0OLIzlIjZkAjjRFKKbUC5 ne4g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o6-20020a056a001bc600b006815bf78628si3168485pfw.356.2023.07.28.08.59.12; Fri, 28 Jul 2023 08:59:25 -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 S237214AbjG1OwQ convert rfc822-to-8bit (ORCPT + 99 others); Fri, 28 Jul 2023 10:52:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbjG1OwP (ORCPT ); Fri, 28 Jul 2023 10:52:15 -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 B8BB512D for ; Fri, 28 Jul 2023 07:52:13 -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-mtapsc-5-sywuu3JVNz6HXcqb2Y-XWg-1; Fri, 28 Jul 2023 15:52:11 +0100 X-MC-Unique: sywuu3JVNz6HXcqb2Y-XWg-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; Fri, 28 Jul 2023 15:52:09 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Fri, 28 Jul 2023 15:52:09 +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 v2 3/5] minmax: Fix indentation of __cmp_once() and __clamp_once() Thread-Topic: [PATCH next v2 3/5] minmax: Fix indentation of __cmp_once() and __clamp_once() Thread-Index: AdnBYxCd11s+7olXQUGpHrOs4RAl0w== Date: Fri, 28 Jul 2023 14:52:09 +0000 Message-ID: <897033692e56449fbed8126484f2497e@AcuMS.aculab.com> References: In-Reply-To: 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, 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 Remove the extra indentation and align continuation markers. Signed-off-by: David Laight --- v2: No change include/linux/minmax.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/include/linux/minmax.h b/include/linux/minmax.h index cb126853f2be..4c77ac9ed284 100644 --- a/include/linux/minmax.h +++ b/include/linux/minmax.h @@ -28,11 +28,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)), \ @@ -42,16 +42,16 @@ #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(__builtin_choose_expr(__is_constexpr((lo) > (hi)), \ - (lo) <= (hi), true), \ - "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(__builtin_choose_expr(__is_constexpr((lo) > (hi)), \ + (lo) <= (hi), true), \ + "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)), \ -- 2.17.1 - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)