From nobody Thu Oct 2 09:18:57 2025 Received: from fra-out-001.esa.eu-central-1.outbound.mail-perimeter.amazon.com (fra-out-001.esa.eu-central-1.outbound.mail-perimeter.amazon.com [18.156.205.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 737FC306B3E; Fri, 19 Sep 2025 10:23:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=18.156.205.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758277407; cv=none; b=EkfhgZLMhuF849J1ZQ7dLofabue+vM1L+N/SGkhhCjd4Ub1iTJu8obLoqomQGF1mWKeIHgHsqb4ZZ+rL/zH1lJNtOrmA5WJ8YWnM7RnaPuSjFnXtcvc7GY8lCf1RRBnM3+odctXQqJFK5/gQriWNMxyfMVd/e1lhowKIsjYiuIw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758277407; c=relaxed/simple; bh=mBsutiZSvOVvNJByrvLE9b3D79CfAae/c2faSCVfkjU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Khin2Vw5tpQXYxfixvbepbJtTIHD/g3jmNRXc+xrynfcD022GtGmr7ifdfBaN7EMdx+SqAf+2D9Vh6T7nbIuT+OxuIbIJgyTlSNRl0QegUul/kOeJ4jq8ugWtnHqJo10XNgv7GvWUAQ3TxsSZHyepvlJ76x4bp/H9WFTT4YRel8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=sumI3pCh; arc=none smtp.client-ip=18.156.205.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="sumI3pCh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1758277405; x=1789813405; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QbgnO9UxPmlnTs9ErmugBQ9uOmZYt7P0wc2omnh3GaU=; b=sumI3pChfVrDH3ZdqFSUK9qjC02AqfimKUNR3E2lYfPKOzyFtHGXaxRA pFafOAiuy3UFVfsI4+2+ov2ZmF8O6gKMdhU/YI1+wolf0KyUhniGFdjUU mBxUjG2hBTxghT4/wokiZ7r9bk8zuPyW75bNThlW/uRuneM53G4Nq82UA 0GyXKIUZZbi+grIIuZGLoZEJ87UJYouxnU4WBBFd3CMyrsVt6DOUUUw5I sN5x+rkeeMfqfdks6FWRgxDNfAPqasT7YOiUJVn/+z8/w/Hw8GzigNW+x Ek85OYaDA86eA9PB8k3KQ4708LYhBwFqrkSlmt6QRxQMGP6YIQSH36nT4 g==; X-CSE-ConnectionGUID: OutPLXF4RFS9rYyx9RS6zQ== X-CSE-MsgGUID: 1bnrBmIhRfW8Z/7FfFsPpg== X-IronPort-AV: E=Sophos;i="6.18,277,1751241600"; d="scan'208";a="2368465" Received: from ip-10-6-3-216.eu-central-1.compute.internal (HELO smtpout.naws.eu-central-1.prod.farcaster.email.amazon.dev) ([10.6.3.216]) by internal-fra-out-001.esa.eu-central-1.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2025 10:23:22 +0000 Received: from EX19MTAEUA001.ant.amazon.com [54.240.197.233:22862] by smtpin.naws.eu-central-1.prod.farcaster.email.amazon.dev [10.0.0.240:2525] with esmtp (Farcaster) id 78751fb8-59af-471c-be39-cbaca798d4b0; Fri, 19 Sep 2025 10:23:22 +0000 (UTC) X-Farcaster-Flow-ID: 78751fb8-59af-471c-be39-cbaca798d4b0 Received: from EX19D018EUA004.ant.amazon.com (10.252.50.85) by EX19MTAEUA001.ant.amazon.com (10.252.50.192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.20; Fri, 19 Sep 2025 10:23:22 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by EX19D018EUA004.ant.amazon.com (10.252.50.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.20; Fri, 19 Sep 2025 10:22:53 +0000 From: Eliav Farber To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , Christoph Hellwig , Linus Torvalds Subject: [PATCH 09/27 5.10.y] minmax: fix indentation of __cmp_once() and __clamp_once() Date: Fri, 19 Sep 2025 10:17:09 +0000 Message-ID: <20250919101727.16152-10-farbere@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20250919101727.16152-1-farbere@amazon.com> References: <20250919101727.16152-1-farbere@amazon.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: EX19D032UWA003.ant.amazon.com (10.13.139.37) To EX19D018EUA004.ant.amazon.com (10.252.50.85) Content-Type: text/plain; charset="utf-8" From: David Laight [ Upstream commit f4b84b2ff851f01d0fac619eadef47eb41648534 ] Remove the extra indentation and align continuation markers. Link: https://lkml.kernel.org/r/bed41317a05c498ea0209eafbcab45a5@AcuMS.acul= ab.com Signed-off-by: David Laight Cc: Andy Shevchenko Cc: Christoph Hellwig Cc: Jason A. Donenfeld Cc: Linus Torvalds Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Eliav Farber --- 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 8718fd71a793..c0e738eacefa 100644 --- a/include/linux/minmax.h +++ b/include/linux/minmax.h @@ -35,11 +35,11 @@ #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) =20 #define __cmp_once(op, x, y, unique_x, unique_y) ({ \ - typeof(x) unique_x =3D (x); \ - typeof(y) unique_y =3D (y); \ - static_assert(__types_ok(x, y), \ - #op "(" #x ", " #y ") signedness error, fix types or consider u" #op "(= ) before " #op "_t()"); \ - __cmp(op, unique_x, unique_y); }) + typeof(x) unique_x =3D (x); \ + typeof(y) unique_y =3D (y); \ + static_assert(__types_ok(x, y), \ + #op "(" #x ", " #y ") signedness error, fix types or consider u" #op "()= before " #op "_t()"); \ + __cmp(op, unique_x, unique_y); }) =20 #define __careful_cmp(op, x, y) \ __builtin_choose_expr(__is_constexpr((x) - (y)), \ @@ -49,16 +49,16 @@ #define __clamp(val, lo, hi) \ ((val) >=3D (hi) ? (hi) : ((val) <=3D (lo) ? (lo) : (val))) =20 -#define __clamp_once(val, lo, hi, unique_val, unique_lo, unique_hi) ({ \ - typeof(val) unique_val =3D (val); \ - typeof(lo) unique_lo =3D (lo); \ - typeof(hi) unique_hi =3D (hi); \ - static_assert(__builtin_choose_expr(__is_constexpr((lo) > (hi)), \ - (lo) <=3D (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 =3D (val); \ + typeof(lo) unique_lo =3D (lo); \ + typeof(hi) unique_hi =3D (hi); \ + static_assert(__builtin_choose_expr(__is_constexpr((lo) > (hi)), \ + (lo) <=3D (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); }) =20 #define __careful_clamp(val, lo, hi) ({ \ __builtin_choose_expr(__is_constexpr((val) - (lo) + (hi)), \ --=20 2.47.3