From patchwork Wed Sep 11 17:51:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13800942 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 18035EE57CC for ; Wed, 11 Sep 2024 17:51:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 94CA9940083; Wed, 11 Sep 2024 13:51:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8DA51940066; Wed, 11 Sep 2024 13:51:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 52B5B940084; Wed, 11 Sep 2024 13:51:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1FB29940066 for ; Wed, 11 Sep 2024 13:51:39 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id C6007A9D24 for ; Wed, 11 Sep 2024 17:51:38 +0000 (UTC) X-FDA: 82553199876.10.C75CB2C Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf22.hostedemail.com (Postfix) with ESMTP id 84110C0009 for ; Wed, 11 Sep 2024 17:51:34 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=EyPGmlfy; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=olj0DW34; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf22.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1726076990; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=TnFDmLnySwS7TzxUCDVEsw91kZuig8JFy1CuaAyJJK8=; b=IOHZJ2E97elUoEkqoW67OFYdgHRUu36yOozTpYEJiC4w3Yzl8qlLsBanmiE/UF2oi5MZnF ZzHb5PXfyAxaZOTv8weJZkM+TY8lrM9dgVpd8tA280vyzAqsLd3NEjyPMzdsyqpnZW+d0r LjfhtHG0bod9P/dFZ8FTrdNMpyPoVAw= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1726076990; a=rsa-sha256; cv=pass; b=gT6B1sAuBMkan76ZLTYZEIzw8aXXZkAc8CvgJfbb8YJippXc4iNt8cbcFg2pJQEg8dWCei oq1B2eNKlvAg/+eVhh71QGZLJXIVK2j/kxpudkuw/6CLn36WgsYu+Mq3SGAMii7nJ2Spip s0iJ/fugZzM3Tgc1+9xU4J849mCFmKs= ARC-Authentication-Results: i=2; imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=EyPGmlfy; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=olj0DW34; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf22.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48BHfWsP006826; Wed, 11 Sep 2024 17:51:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=TnFDmLnySwS7TzxUCDVEsw91kZuig8JFy1CuaAyJJK8=; b= EyPGmlfyITCq2k3+5k1vOhHEvtfYkgjIXR2XdDT4rHpATgbJF5qKqtobtxUiQoJf u5Kf3EbowMGlto0UEOi6dqgYM9Savl3eT3HaR48MQQaizvaYF0/fkpsSqKmM41R9 FusCPQFbjfarrqZ/32vAPSa9tvkQvalhxCdxMWpm8vgzanZwRARlxgfcVsWFTz07 MqwklsqcrVJygpXnMAXEr9YEqkg76FbcB9HNkXbmPuFX7f6LytG7NgSJE+fNsSqF 4QGkQafjWb8AIUtoO0CSn58qPooivendfRbeOKyENnSv9T6TBQkrVZ5CcHwZQ3ej OO5tAmrP5+ktHavnfzNDuw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 41gjburnds-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Sep 2024 17:51:22 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 48BH9QEI006225; Wed, 11 Sep 2024 17:51:22 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2170.outbound.protection.outlook.com [104.47.55.170]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 41gd9aa0yq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Sep 2024 17:51:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VpJuFJjytWq/I3fdjqOMO+koinoZZ7UlvDOL/WTs4LHiIhYuPFUENW8k5R7qcihsPXuorDQl0HPZ2Sd2eFPw8gDIwKswXPv3wsRJlR5Cs/EV3ybP/OolKKZr1J5fJNaAzSlz0d64K+CEpmxVzTjbPODK4RafsjP1QiPvVhlIXxwr+WXR4ywfhy3+JC50BrRAp3cwXBHC2UlZXDVnhqT4ad1ONC+ybSQTJjSAf4Yn58QIZTHGdqOw+Dx9PDfvCJa1stuTWR91Hb/31DK7+KNPXw5AhZ30cG7Oys3XMP0ZJPrDIf8mSw99yOUwZ8iP8rtevlX5q5kADEl6+M46vNP3mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TnFDmLnySwS7TzxUCDVEsw91kZuig8JFy1CuaAyJJK8=; b=YWpz7BAbG+MzIn2LUvP1k/RE5I/MOnUW7CuE5PQNaQwkSZ4cZobMzKXvvY/t1zPZTY1s/g8Q+utGS6lEfEcqLPk9z0NscDfbYe68khIVSkmHhpLvhMZ0wp4WoZu+So344nho9mlSMQcPupxxGNLIvzKD9IzZyD3kuA1xwz4eGgNuyZZklcLeFx7x3NeJ5gmDTiahpbb+ah+Ztg6+SeKv/RyBngfwtF+RQnCbv2eIlb4tqrAO5d4N1+BAe8tVR8gcza82xKnjyfo7EIWjHLN/Sr0xpnK91Mm17S0y3q0yix7mzr7VJD1bzGMGNlCHrghGSOFFSdxj4i9VZDJH6uyjxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TnFDmLnySwS7TzxUCDVEsw91kZuig8JFy1CuaAyJJK8=; b=olj0DW34MMvJomGmWTSyHGihP4+9nBaX7NbUpdD3+zpyPaOZllz9USjXHSu8fgxcyx8/xDYBAW5gOiWGiaUjaDSEn2GCngV57Z297vmpTwJc7rxAo72xC/jXi2/ypTpPptlhcQbj9cLaOF4HA+m17a3KANZuiIgmaELMcwfr/8I= Received: from SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) by MN6PR10MB8046.namprd10.prod.outlook.com (2603:10b6:208:4fe::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.17; Wed, 11 Sep 2024 17:51:20 +0000 Received: from SJ0PR10MB5613.namprd10.prod.outlook.com ([fe80::4239:cf6f:9caa:940e]) by SJ0PR10MB5613.namprd10.prod.outlook.com ([fe80::4239:cf6f:9caa:940e%5]) with mapi id 15.20.7962.016; Wed, 11 Sep 2024 17:51:19 +0000 From: Lorenzo Stoakes To: Andrew Morton Cc: Richard Narron , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Hans de Goede , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Marcin Wojtas , Russell King , "David S . Miller" , Arnd Bergmann , Linus Torvalds , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-mm@kvack.org, Andrew Lunn , Dan Carpenter , stable@vger.kernel.org Subject: [PATCH hotfix 6.11 v2 1/3] minmax: reduce min/max macro expansion in mvpp2 driver Date: Wed, 11 Sep 2024 18:51:09 +0100 Message-ID: <0f2607b7c4a7863e2f9590301d88e61dd89c31d0.1726074904.git.lorenzo.stoakes@oracle.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: X-ClientProxiedBy: LO6P123CA0041.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:2fe::12) To SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR10MB5613:EE_|MN6PR10MB8046:EE_ X-MS-Office365-Filtering-Correlation-Id: 757b6dce-ea71-4ff5-b6e6-08dcd28a5739 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: IL7JHDyrXnv1O4ttHT7PRtNFYfntUR8zAL/GGsnMPS9YuHFSKEyNtVKlJcP7Bw93VG0aW2w2eMq8z7EKeYy1hyVTZPxGCTUQt/LaG63oyMKKjum5smhyDevH39shWivNZDMoms35vLc9RqDq1Q46kqzL8YcDbMr8jdcbNsjx1vwD9IXR2G3g15OHoM+EsvhnUbIxbj3Tt/iwEp8o0EA92WrxlZgUF83OU/M9Gpb1ABBM3mG4wGXrUpTfZvKfqbBMyInBsUPgfLY8EmXT3gqCwAsgwEG7H5RS+/sEL2Z6v5kqpxLsAhfPhzQAwVDkayK5xNFCB7mib39GAihAn1+XfAx8lrKQkgEqK+qzoE+3IYqlGtNf5CNfGHkBaVd1jlCVMmUQAI4KrCgIsj19/CpNT16zqkdeqCugHTpltODVPwkY+uvaPKrOPhOsum66/dunNzmIDp6VdpTNK9A05S1qHbw+AVyCllv5za1YF1aV31eYQXpk1JugbDVr8pR0MZKMVbkDB5ts0EbuvZ7ScpzFLYp78CvNf/dFV3RTxrKjyMQKNXA7KZsJcbo/PhrWqfuHhvyaCofT8HLb5aDq8YzYUEhj3BjVZLza/svmxVVcOx6JNV9HdIAYjUXtRDgbfDyRY64jqkkvp97z3VxJUWGYxcNQhc+7+uK5go7jIYg/5FuBSrQjwcuf7F5w79tktZAw3pa3dgkVnbDI9NLvGXXiOKl07UCTWr6DS2qpejsA6Vi8r8JZi7L3Tv4gqsEl1Uno0FdoVC/ZwCrWxnWkNV9qnZJhl6mtYgLQUYMNtup5kqEjlhDOXq6gk5Yl/gVqcAKwo/KyJw73OZsCM4IjbrFdUHWBKKDrV/oUc9WX2nWsMGDR9Xi6gV2MMCkhxJmtZ/G7HyIP9YoH6W4Mx+CE0NGQZl0Yyw97iYQh82sfCNik2mMtv2FIh+iBQu+tUVSgZO0nfs6FNnzfCpabjwTtyqhgaL1HcLrcx15QNdHGotRKi2AWSljnVdVJfHJiW6idcO0tZpfkkS++Hh7cLLRHVYDA90TW8ZGXNWxYw5wMnA0gO8gp/7DpHqYw4OoyW/CG5oxQP404IOGq2RGFVDLyaoBXGwD9tFykGIob/sJxawS8jWi/OucBPWc55dSEBigq8HUw7Y1KIMfRUO+VsDUkHUNi4CswwFThquSWvUUidkRi/ZPKYL1uxm/ThulVdrdHfzNcADdGEqhkt10ZPh+8BLOXvbOc8fnKyaSR80RYf4UnzYIchHvK1pKephDuATLm4Cp1G1XIFafs71ouGieab9NBBq7bMpY2oKKVoTZd4B59vFF1N4YxfwvxqD8I1VZLca6ibgUmZHxnbA9vnFSXA2N1Vw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR10MB5613.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(366016)(1800799024)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1CU/yZuIX8J0hmAq0Dh/YYbKxaOKnjxsKT4h2HDcvkYerUPnbwpgM0vwt/RtWq47ivdxRCNLoe12mhLweOS+nYb3ANgFT10neA4cdawEMcEeebY8tshYgjb138WnOA7hOMhOzwuvlIVpYXQw9/dPyr8cvvgZMVsj7wWPDaXJoGARc7clpWjFQYt0Ecv2RFZBayVKqPy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Exchange-CrossTenant-Network-Message-Id: 757b6dce-ea71-4ff5-b6e6-08dcd28a5739 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5613.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2024 17:51:19.1966 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GyGA29UgNf2yO+YesG405X+MVXEQompswTFrmKf/gC1ZtNF0VHjr/uGHromzW8VIKH7J/TxbRkrkXL5cOAJPitNw6d8ppp4aoLvZtkpEdH4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR10MB8046 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-10_12,2024-09-09_02,2024-09-02_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 adultscore=0 phishscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2408220000 definitions=main-2409110136 X-Proofpoint-GUID: n9XENYsE-zlZBTn9EjBrwwhp2BBDIxpc X-Proofpoint-ORIG-GUID: n9XENYsE-zlZBTn9EjBrwwhp2BBDIxpc X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 84110C0009 X-Stat-Signature: qhbbtjw3ukmhm1j4kfhyrh88qpsufoxm X-HE-Tag: 1726077094-54825 X-HE-Meta: U2FsdGVkX18bzL/Ls+FLqQOBsJjF3/xbMIoWz+dAZjv+gmg65AiXjOp69IIovCTmI7oqRgis492qvC8ZnIyiOpA+oUQ7luUh7tlh8m1jj+rJ+F1YPHXgT1PqepjocVD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Cp67rwSegL4N0FGuBQWkZkLL5SMoJptEZ1hePahSvh1bOQAZZYJeT/OmfmUayJxOoKCzGFDY/f2YpowOw4Ef2L9A96HWKet8mpDmvYrnTK5JUzAJW4hIOHz9N5wR7sQrlRKlEp4qwOMdkpIVFPxCmX4IkW/feboYLhVWjcGPHs6/zPCOtXU7XW9ZGMXyJ2c120NMVoFNKFk1ryUImiibvxBfutKpOE1f/tbA/ITPL01sWuhvckK23pKF9WEN70CsPeeRkdV44SFAanZrwO1Q166ecdzbxnbuxHNiygkq11GUEe4z1gvNslvs/L+83APyolgnQx2CeV77Tp+HJPgGv4nFfFCoVlEo6kLdSbJO0A+N3qW9KRDSxX45p+hwxwfHRankSYUdj4xVdMc= 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: List-Subscribe: List-Unsubscribe: Avoid unnecessary nested min()/max() which reults in egregious macro expansion. Use clamp_t() as this introduces the least possible expansion. Not doing so results in an impact on build times. Cc: stable@vger.kernel.org Fixes: 867046cc7027 ("minmax: relax check to allow comparison between unsigned arguments and signed constants") Reviewed-by: Andrew Lunn Signed-off-by: Lorenzo Stoakes --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.46.0 diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h index e809f91c08fb..8b431f90efc3 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h @@ -23,7 +23,7 @@ /* The PacketOffset field is measured in units of 32 bytes and is 3 bits wide, * so the maximum offset is 7 * 32 = 224 */ -#define MVPP2_SKB_HEADROOM min(max(XDP_PACKET_HEADROOM, NET_SKB_PAD), 224) +#define MVPP2_SKB_HEADROOM clamp_t(int, XDP_PACKET_HEADROOM, NET_SKB_PAD, 224) #define MVPP2_XDP_PASS 0 #define MVPP2_XDP_DROPPED BIT(0) From patchwork Wed Sep 11 17:51:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13800941 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 C482DEE57CB for ; Wed, 11 Sep 2024 17:51:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3803C940082; Wed, 11 Sep 2024 13:51:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 312F1940083; Wed, 11 Sep 2024 13:51:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0BE99940082; Wed, 11 Sep 2024 13:51:38 -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 D03EF940066 for ; Wed, 11 Sep 2024 13:51:38 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 96CB4A9BCA for ; Wed, 11 Sep 2024 17:51:38 +0000 (UTC) X-FDA: 82553199876.27.706049B Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf15.hostedemail.com (Postfix) with ESMTP id 4ECB4A0027 for ; Wed, 11 Sep 2024 17:51:35 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="bfAI+3/P"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=jg0K8a8Q; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf15.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1726076979; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=aijDqYqfpfHC/xgzvGXjEYkRKd58eGDA7vJfJcZob40=; b=Tj83CV9sBq2hBO/BujMGhVpYNsox5wFSRv9nmb3/udxU/qrfuOP+DyJlck5SKTjAfE6KtY SN+FGY1lLDHxkNNb4SIle9iRzUPr5/Z0dKwBsYcVSxP9yX4cG4iuLfy4OeUvO5/fDge+BF iZgQZnE8uPrUg3o4xByNNCgIyD2PUr0= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1726076979; a=rsa-sha256; cv=pass; b=upk2zpqp1DJy3W1lCV4cpwBxLwixlC9ybF95OtebqHPPTR/ztDDloXlGCKssw+qT1GtU/h 7q6nCWjVy8BechpshDO0gCtZ3b7Z9RFaKMrtiiQxbFoYDvI7HoivETa5LAj73blaZT4VW/ IqwFcbrTmNZT0qOP1bqMU4u524VeDuQ= ARC-Authentication-Results: i=2; imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="bfAI+3/P"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=jg0K8a8Q; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf15.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48BHfV7k006777; Wed, 11 Sep 2024 17:51:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=aijDqYqfpfHC/xgzvGXjEYkRKd58eGDA7vJfJcZob40=; b= bfAI+3/P9GZTdsyL915IM0k10DjiJrguYzPbyV4DbQglhu69hA19Q1TNX+n0fLa8 Fs903g3fiqLeAHUiakLFO1UjvNrodYebYu4xN3b6iwARF8vMsuEhg1K9GwCJEwwf oQjM972PgpzlSyAnfUeuhqYbugcYf6wKpkWnYhkhUms3Y/z+PPlYZx3v1hilW4B9 J3Z+G3KZ0fkaEZVgatWhB4Q1c6mgSxVS7+JkJ0UA/xxSCJxEE+kN5FCrx1kEqGGH 9BDjzCFY2Us2de04ViFZivqgCTaTdxqBuh6mwj2vfNPq2gmIPyfcxCj8AupGMPcL N5CjGTCp4IP28PrAzEZc7Q== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 41gjburndu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Sep 2024 17:51:25 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 48BGDpT9032401; Wed, 11 Sep 2024 17:51:25 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2045.outbound.protection.outlook.com [104.47.66.45]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 41gd9gjx1w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Sep 2024 17:51:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RiNHU3F2m304SoHfz9HBDjsbLMvvYQ+SLvEpFbDKdXCTpEMWuL6RDrhQY20SJZd+ur1OmIoVuSj4HIs/gnLshGn95vSKTpzwNfJojZuiHGnL3faZuM6tSXiHM/0B1LoRyUBrDbllxxcjTlCaWfrSiLBTct3JqYZMMsFmkWoATA4Ui2gmG8+ku4YO0UZkp2PTLmIMiLMqTsOugLiG/pMONcC7YaUUjwQMBjHPujgJtk639v19gbtYtzc6gJvHKOr8b7KZKg1W7zQpEmBnMIku7IR2hKuMwE4RW1o525k2zMxiz46VpLZJPVThh77wbV+OY+1t3+s8pCrz4WyI5v5naQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aijDqYqfpfHC/xgzvGXjEYkRKd58eGDA7vJfJcZob40=; b=YoWaAdwsQ1Hgnt4LISgikxfvxepaFQABqEs/pFBrnjYaeeHec/+YQG1r8b7liFJ5Sxl5xGxLM3pcLJpsZMyoQArbHNDU6Z2VpNurDH4shGt6Mt3iPnoi/Ko7M+s7hrzrULPAnh0wxsPw3lQXRdMHPz/7gBhRca/sC3kDh3a4mp0rpCLPFL648zdE+x2epCZZ1YnrhlIrFKRLPrpy0Fkfzy3BowPC+0W9mA/HTzqoxgAfuqdM7fAOVU8gt41l+Zs6G81W0pHAR3zrJ7Tv8W9IU3Yos8LqG/EKHftkRg7W+XJHrHtBKSz8oMOaFK7gmG/V9ycBTwiOvQOyKhuN+CLiqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aijDqYqfpfHC/xgzvGXjEYkRKd58eGDA7vJfJcZob40=; b=jg0K8a8QUpwf9avlV8GCVhMBl3lvpSZGkvZjy6FlEvhqEkdOfijoJuvXz4cD5dP7bId6PrO8eYJD2yEccNM1imT5Dpcya5m07qxPfOJVls3T7U3lfIqNVLya7DPax/VReJaO9DaBUvzgp49B/IRhS0dIq3R9nFBWcV2UHjSBHq0= Received: from SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) by MN6PR10MB8046.namprd10.prod.outlook.com (2603:10b6:208:4fe::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.17; Wed, 11 Sep 2024 17:51:22 +0000 Received: from SJ0PR10MB5613.namprd10.prod.outlook.com ([fe80::4239:cf6f:9caa:940e]) by SJ0PR10MB5613.namprd10.prod.outlook.com ([fe80::4239:cf6f:9caa:940e%5]) with mapi id 15.20.7962.016; Wed, 11 Sep 2024 17:51:22 +0000 From: Lorenzo Stoakes To: Andrew Morton Cc: Richard Narron , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Hans de Goede , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Marcin Wojtas , Russell King , "David S . Miller" , Arnd Bergmann , Linus Torvalds , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-mm@kvack.org, Andrew Lunn , Dan Carpenter , stable@vger.kernel.org Subject: [PATCH hotfix 6.11 v2 2/3] minmax: reduce min/max macro expansion in skbuff Date: Wed, 11 Sep 2024 18:51:10 +0100 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: X-ClientProxiedBy: LO6P123CA0056.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:310::13) To SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR10MB5613:EE_|MN6PR10MB8046:EE_ X-MS-Office365-Filtering-Correlation-Id: 7822105f-cf4b-4593-241f-08dcd28a58fa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: u/0TUfUstHVKDgxv2sEoHCvUJxdplIQimnSmpUfrbn/5fb0cqDHlT/3+w5G/1mzMru9yD3KaiOFHFCekydN+QXHpUurKVva4CneU9SiQ8v/ZjtPFCSfdiB9N2UHnf3wICii7dNalFudhrmkPrzyviZmtKzPbUeOzzDWl6jJQYn+chcm3m4fKYeil8UwXg41yzEbtBUfbdGbnVnk30haW0phHN8g9VyKtMi3fvuaPD3Op01LlIIFsla04KdZBJtNxwu4VW256a9egFk8mCT5HiJXbBCMl4OuSGvuhposTMQPIY2YcstnL0R3Si15BgjSBOZIb4vnfY8V1jegHvacMFqV59zw8psDy8CPX20EQwu1eIeBeYUEBrxvSHdorzroaHAbRMm/J5rRTkHFtsyVijdhv4jJ6px/IiaVETQdTgsP4sEvFayMxqeBj52JKAD17ZrqX7wvTI8fC28l/+WEGin5V0XtuKFANSDVymu4PgzWYK+t4yBQPC10FKLhtTp0vZegxNY4/1mPRk0UfoxkkiWHUbtfFdv+32WUVK77mkCl3K9BaRHxeOBCqyxH7sxB7pF/+jb/Lb2c98IjZJJl0cLAKorhlMtKj1dPXAkeFFO4eMIF7zsdkzEAUI9nejyyBSDXzMXxL+AAOf0TtLlMCFmJmdbJAdg1A4SqpuYL6VmdKoboQd3ZGrQtZ/vqUReZ3PGuUElV5h2oH0XS4yiINt3TT5hGV0Ri4gAt8Jkm1vpgVFeFXjsWBIneHnVEnc+Ue1fo3+ffoqhtHfuYOqtLAiEXFPqml3AoVL80cOmvV0Z5MuG3kLcbAQps9W37pdrey0XMV4iJ/8U7tlLM3b9zFm0svds91vsg6WmKoQ+eeufYoVZDxUWI9jPcawXQy1doZRChDHxuZ56dREvXoNV6oxBGcvTFfaGSyd9LJ+t3GiJuCJ2jsS6YcgNQR2cJTN0Y7dYAOSgNH5lhUVgqG7XpU5RbTMDoX1XMxRFBaVkjtClu+i9x7jIQjN6FXysNw7cuB2Szl+5Rrf2HUMGXQaDSEu6KG7WI9Hl8VE3xVbfnA1+NxnDIgnSgQi8dI9d2//wrX7FKZrFMv57xHqgR6OffX3gpdonW1zJJLE1xtfCQRAYI0dkiIaNkDr1klpjgodzAYiZ8bwYkVTjQgV9ra165OJrmfH9jtdue2b4XFaWY9AByhY2ST4OffR4YmnyaLXLvkEHXEtRecTjx5sQUw2Mtl1pRGEEbwfqyhT6V0cdmWO4SqRM8rm818DadqjS6JgL0O1V+mq2wfazWEe/Z0Nj+0J0Uuu1U7pvxANe+MS/PVpYnDg0N320VER+w//xmJ+lrK5QVfbJmvM1uAc8OY/iIMRA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR10MB5613.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(366016)(1800799024)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pcTbz+A+IrbgPuBSilM/5u2tvK8Z2PVgjehaI7ecySmbUJNuMKgvcNKlCMYE5Zll7OpxCdYwP0ypPjbnd2HGmM89TQWYepVDdFcrEby2z0tC133CJQ6FhW2obAL7hGlMvesuvJbijnvc//CNKS8es2FGJ9QkHBpfDFX5tdivBQmAl/Ti6eDmHnG/l4FusSI+02YJqYw9dPAZikmTBvvQ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dcQiTKSVI50v9d0yMK+M0OSqXSD1NuUA30hmG3EQaSlhkvTAsS6UpsizACWBLulZzOCRefi40UKb96UlYLmhUbG5NNB5jPyO4H3w/PEWwiJbO15B8Qw/U4Dj5TYy7g+4mkEYMFWjjwyW2ARQwJNin2Ul6KMvK21FJQg4h1XS1sHrKgDKZ849yykZtd5fq+dB8ZAAoNSexPBOFV7gWSriCod3+Pznlw1EEbZxDbYG1YYVV0vfdTQpolJHvkQMZqnCAL0T6ddg2Z28G647YtU38qyZ/fbMbfjwITQkvgakVcl11BpyMdrngFd1MjnCGbba1LakaRoUzw== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: +tCI9IxaUVP2IfxUbbHo3dIzw0BfSt+E06AU9ATmhtoMePVlEjtlJY7NmVoVpHvKinv4KRVvGs/ZfubjmFiH8mk0tYwv/AeuTyF46kGpCEjUuWPYYxHgEAPPvXDlbWGhHThNu9dtary9nyMCJBv5I9p4qfnEndL56ebS7NVE8UeZThua8MxKEbrZQN/KVTaJ1GBuPew55R+mnewc7QTxMRQqj1y05LVMEArzOQJ3rQpB5S2azUJebLYG7aNlA2TnRqYziVAun2mVZUOaQCVaHqP/pOi7U00kf1070KhLN9FAEQWgBgRDvxQLrwM6rb0zlsIu2tNoz+xLO0uMMU3PbmDlUtQy3V7WZcgSKX6IpmOtr53vtBzyJ0BL0rEr+zQzVzjWQlkMMjPe3n/s98nwEQHxlC7cwHUVcQNJ4Vlbn5YIsQcc3ve1V7+wgRD9eCmsfUEt3lQQelkkKuHU4U8oeS5IlaNsAyld+B8w0uBMMKkcbsdYXMy7vU8CIWpgK6z2Rx5ELrwvjqQaP8m5qvKyvFnVTbPAzr0/JIwKQqKOhjLbW9tXVmSDXBknLD4a4ASPq69oSPf5+LtmEknmlmdwEkcVIfQTjY6wXgZkP/nj1co= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7822105f-cf4b-4593-241f-08dcd28a58fa X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5613.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2024 17:51:22.0975 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: c+UPsziK8VFTosBm3lN1N2sZIoxpeA1gEEX7FWCAeqiBqQhF5/QdpjFsCBKsZ4fuiMZOFYFjNcaUQifSbhP5XL8knS+8FUoYhtJ+69Ae8Vc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR10MB8046 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-10_12,2024-09-09_02,2024-09-02_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 spamscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2408220000 definitions=main-2409110136 X-Proofpoint-GUID: r6ssqqUxzaPY6O7zUL2a3hF8cwYiZ8uh X-Proofpoint-ORIG-GUID: r6ssqqUxzaPY6O7zUL2a3hF8cwYiZ8uh X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 4ECB4A0027 X-Stat-Signature: 5358zt1dqigc4fqckgr4aukw7enajnkd X-Rspam-User: X-HE-Tag: 1726077095-512620 X-HE-Meta: U2FsdGVkX1+yvaDDctmEXGqnnH94XTyTXcX4RHRbCcfgtnZ75Xb3GfCgkVyWMsLmhEitb1hDXP/BwBjGsYjot+769/D3G4DeUxbVQ26qxKhfzshT0URqRz+eMlrkdDDR2mt2SspJLRmxP5gTwQQk+3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bFupoyTULN+bVDO7IRWAbFrnXfF9Eq5392hKsq2M6UxTwEpLwKVjv/DReFPJa10ZlrN89AKJS1UxvmySHfFatVXQrUIvaDevR18UBkjwAR8sYkrXGBmyfPh6F5cuAWwzBkwM5QHFlPl6sU584l0h4uWlB3EgT1z0zqlgb/Ki/xko9dMQ3k6rZJAzhsDvhNYXfnJyxK02KNavHv/rIb6lHrj4FpIyC9ZN+q/Ef2ePrzT9z2b4nYJVYX/ViU0PsO4H3aHK5RC6bYPPVwE4fsx+6ingVEfaP9Tm8xQgQvYQiTsXW8uSwTvnAisrnesx5sr+gGaIKvK5Kdx69CN1Hxk4Wg0gKNDdMyfv3ea3RaMUZBOwqJCmVUmJI5rPzi3dxGMAk0QZ94Ao0c= 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: List-Subscribe: List-Unsubscribe: Avoid unnecessary nested min()/max() which reults in egregious macro expansion. The nesting occurs when NET_SKB_PAD is used in a min() or max() invocation, for instance, various ethernet drivers wrap it in a max(). Not doing so results in an impact on build times. Cc: stable@vger.kernel.org Fixes: 867046cc7027 ("minmax: relax check to allow comparison between unsigned arguments and signed constants") Signed-off-by: Lorenzo Stoakes --- include/linux/skbuff.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.46.0 diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 29c3ea5b6e93..d53b296df504 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -3164,7 +3164,11 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len) * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD -#define NET_SKB_PAD max(32, L1_CACHE_BYTES) +#if L1_CACHE_BYTES < 32 +#define NET_SKB_PAD 32 +#else +#define NET_SKB_PAD L1_CACHE_BYTES +#endif #endif int ___pskb_trim(struct sk_buff *skb, unsigned int len); From patchwork Wed Sep 11 17:51:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13800943 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 5F4CAEE57CB for ; Wed, 11 Sep 2024 17:51:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E2CC8940084; Wed, 11 Sep 2024 13:51:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DB700940066; Wed, 11 Sep 2024 13:51:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B6C5F940084; Wed, 11 Sep 2024 13:51:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 8BF34940066 for ; Wed, 11 Sep 2024 13:51:45 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 46480A9A7A for ; Wed, 11 Sep 2024 17:51:45 +0000 (UTC) X-FDA: 82553200170.19.650CE29 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf17.hostedemail.com (Postfix) with ESMTP id 086EF4000E for ; Wed, 11 Sep 2024 17:51:41 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=f1kHuZjJ; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=sAcGkrM7; spf=pass (imf17.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1726077049; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Xo9RaLBa9atMO4ZoStLw7lMwJc1kqTeCMxkNkvOt45M=; b=lTW5mtyMAYfz8GP5285e7GLRFS1HIvA/Sp4oMnL7GzRZXSc+ORJmV+f17gUHgsx5/p0pDl rzTWOkX2QP8pkZfGQpp1St1IVmeznnExj1+Y1JH/5ghuX2YcEWSnDBtAiFad7HeR4kSf1d V3GqLM1nkujLCL5qF0E2WrNKePD4Wpo= ARC-Authentication-Results: i=2; imf17.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=f1kHuZjJ; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=sAcGkrM7; spf=pass (imf17.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1726077049; a=rsa-sha256; cv=pass; b=tkKtaqmO6u+Fyda8s2juxLPdw/rW7v/bAfi3ee4d2hRkmX5zrcwGMdLCEC3OVWHUfJM4zd T2SZ9Mi+0UxXrnFxYt6/gqMiD9Rowy4YXbI1UoIatIvw6IyCKdHs0bQv7APVqLYYJ5PJCv crod0m3F8/h0xWKqBv/zV95k/yr4taE= Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48BHfVBu012781; Wed, 11 Sep 2024 17:51:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=Xo9RaLBa9atMO4ZoStLw7lMwJc1kqTeCMxkNkvOt45M=; b= f1kHuZjJzz0xSuglkXLGOXUaZYAUptqnjnNgMvDrunUNsF85yLEIXqSgGMWIQ7Yi bHj+MnTimzCyKZpNuGLGUpIM70fU6bQYCXD/7X5/nBJEBVhYAVTRYBMa0yy77G6n rj/PhP28C7ZBRgbw/1TaOjzsp/ORlZOUJ7/rbERH/oz6MLNRfb5ga9Ov33hEDgOj afhrGHlcu8s9evOTrWhMJMeSSxotUUh3XUjrz6AJpSnNWsgDBiCod9Ezfjire7Je xpzj1QY2LAVkwEi3hDcm3+K32WqZaI3Idhg9+wqAoROdHCoQjeU5rvUJ8IINf6SP qwWLsRUUSKZmzRYNrV1afA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 41gdm2rwp0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Sep 2024 17:51:29 +0000 (GMT) Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 48BGghQp033536; Wed, 11 Sep 2024 17:51:28 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2173.outbound.protection.outlook.com [104.47.55.173]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 41gd9a9jm9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Sep 2024 17:51:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Qv0L3APyYTi2IaRGuoCby3jainUnPwgx/4mIn7qCVsDsOAuqnLJBYKTU2Fo7Yfk/9Tzk3ju3NvutifesOPhkJA7f4vvvY1lJRdvNprGtusoTZZ/NOOmS2dUIS4EzVvMkbeoWJ0zZee8ZbOtwm6BmwN2ZU0TTpIu0BxID/uhkmn4AjnIGih3Ya+3cPIjvn/j+gvjMPuqR8X/b2ln5/nSwbi3mkkyZb3u6LhX8lP0eI2n7vbxJCpr4Kx2r2wffnhVMEIpcC5sHYIkyhXKkYUxyJV656xCVF6zmj2XkrNE6xjtRHD/vzI+Qp7N5Ra93h5SVgJxOHy/Tk/1HvLbLaY75KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Xo9RaLBa9atMO4ZoStLw7lMwJc1kqTeCMxkNkvOt45M=; b=lVW/ZS0ea19SVmlcut0F0G6bukb5QH4jFrlJZnQ3ywfmTSli3VNE8BBoEL3F8I+GHk5F+eMpxBZF6aXUsO6q4VaT5Xb+QBjYMlc5TvzYyqQRpgrzQ1VRS7zt5ytJQDdL2g/eHEMmGwvDWEu5e7aM070VEQ+RL5p8aQ+miv+N0VoUyRbj+1jEqo3TNLEur37DtyunUd7NLbEDf2WpAf2krTV9e+elxArOl2IvKU+SkgF+jJSmFJV+ad3U/Rpxp1mHgzvJ+QnwbqGkcTlb1G8InJjljgTMfvwJU0txIklm3CjNa6vMKfOI5Bk2ROyqDMF78LGUyKzsW4h1wbckEAob8A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xo9RaLBa9atMO4ZoStLw7lMwJc1kqTeCMxkNkvOt45M=; b=sAcGkrM7JQ9RXmEIop40ht0RTMXlgcAbtvtC6rKuLj2SDHm0pmi8YkIKVgJqinyc5VgmvbwI/MCDoN53rsuZQr6fp1FQQJ5RnuEm/IqJGs9qMZG8/qcQHVtMSIOkpc+Lsp6QL9liAd9OXIByL2OLbVQ2c1I899jKhnktirORwhw= Received: from SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) by MN6PR10MB8046.namprd10.prod.outlook.com (2603:10b6:208:4fe::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.17; Wed, 11 Sep 2024 17:51:25 +0000 Received: from SJ0PR10MB5613.namprd10.prod.outlook.com ([fe80::4239:cf6f:9caa:940e]) by SJ0PR10MB5613.namprd10.prod.outlook.com ([fe80::4239:cf6f:9caa:940e%5]) with mapi id 15.20.7962.016; Wed, 11 Sep 2024 17:51:24 +0000 From: Lorenzo Stoakes To: Andrew Morton Cc: Richard Narron , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Hans de Goede , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Marcin Wojtas , Russell King , "David S . Miller" , Arnd Bergmann , Linus Torvalds , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-mm@kvack.org, Andrew Lunn , Dan Carpenter , stable@vger.kernel.org Subject: [PATCH hotfix 6.11 v2 3/3] minmax: reduce min/max macro expansion in atomisp driver Date: Wed, 11 Sep 2024 18:51:11 +0100 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: X-ClientProxiedBy: LO2P265CA0452.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:e::32) To SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR10MB5613:EE_|MN6PR10MB8046:EE_ X-MS-Office365-Filtering-Correlation-Id: 88680aaa-a288-42b2-8a72-08dcd28a5aae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: BCumDvTvGSs+3Laf31bCGhwm3IjCGCeBF0gnuUHEnqdK60pi3Gb39e2s2ejPQwqbIORfmRrOpHI5AdABEC4njJwIvRPCO68JVjC7FFHQiWheMbdwCjt+1Jgf6Ovei73c57uNPvSWvtzzJIJVSzel2hzzHchdWoeqzc71Gr1wOuHtAk5JChbrTvrBt8HuOOcyBGTewj7v6CbHhhA3W+0POskKO+Ojq3hXb5UMn3XYNItRJ+vZLVlVwGb3odsqqz8LwJZIhPBhOyOXuFhHbCwhwQ+51QO4sllgS5MzLhrhvUanLxJjLqvyhC3jKuV8syUBmqIpYqm4tVEEPFn/VQxiUHLn0v/OlIaxRKHliU0GzX3mMSFiLWQuVzDoSHG9XPQIGqg5ayo7v0NRFWUMNtLynosG44oiIgBIv2Ttm4poWQv7yrfXazbEwyaEG/1ZdWHEKWyoZTjWlZ7tBnSbvMJts5W2kWksvpPLqA+yfaWc/mIBEOkfhPmB+CJSEWvBXdYG3dEULjZOCNjqoRCVRFmPTieD4woBuSQv97TyN0m5ZTvF1vefB/73veXMgkJWoQeSwPw3QaW2Aj0dMHAFbsG/pHkM2Lr+uoe1rUFM99Pc6AB6VHhz01ow7VJ/P/O81OEh+/0XXLSJoiL501pbagx4T+R5s2hm3D/1U2/dXKLFv8WJU9H4Y5hJU+Eivh7fNkdLmpLnTiTAZdXVb13AzDLdhQvROV73YqPm0XpZbJNg86w3D0K0QrwopiVsoAydNAizI80hS0mv0FsOPchopInW7dJS3Zc0jz7utaMRtkdWPGXRceAb+cnxQF2RI3niYRZYQUB4sJaag+M/WveT2fMNaveVWga6RjSUelPjfwjWsvc41xshaXoFMBpYqDB4HA5k743fyYpujfAx/XmS+m9F9NhezUZNO/UAlnzEcXMcniepLRleM8Fzk4DP9Sq8Od6QRDwcu/DE6wvH91rfddTu+6/zBUpwNo767fDeZgB3djcNb/KeVgX1mw/DMj100NJW7jacMFWxZkXJ3YybXcT1IurmrTjM9W/72E9sIYmMHyDqlMoIqEIA31qjAqvEPojdc1gTA5vc6Ie7++73BVLT5Q9dRD2zRTeVr03r0XqrMym8KQ+ely+3C/qWZdpVR26TFAIykF8IwbNvyYQPhlqP1k6vWSeq4ZYiNYcSEfGX6d60shqi/xLIueaflGrjBR9bEUxYkawvYfKIVf/rGd7p3tbzqgo4hQR2GEvkPOOenbB7mfZKSatsFlBtLTGEXqq0XJ5RxYhSHIKv9eSohs7Xu0N0T3RNmHxa6gbwdDHPx4DHiB35I2IwmCaHD5Otb3IUhX0/SPV3vCbxgg6CXVRxr7l6Neban7+k23Z1aSXFOcQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR10MB5613.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(366016)(1800799024)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: H7UY2yi7fE3VDRK/lzW83uTg3q1SogNfjieg+H/CscIC7xhhcxX9+8emv+hyF8Z4PzO2YwmddW97d++T4+qEyAsNLXZwkPCCzhk4w0U3Lmw8uRI5SULA4yWHPqsdwOedcHoSnmvQ/LXiF4jng1E7G7QA2KroApuqi+Lil62X37OSnCjEDRxjr77x5oPs+VQ6pUOeV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rv2ikANgwxDzoJquIYx2NmcmP/W2udb+/1OfZts3mVyIf9VGpaXbPXYedW8bcbc0QtXZvVYj9hy6WJQQ9FXktyvSuK0PuOMQdauqkY9NCfDDGWUkV9uKXtdfyW5kAI7kh83jorpWicI8s7BsJhbNdHvL0n6zoySytVI2DgeWh/TFZ4nPXKcLh6s/ljJtIr8/6R8E2zIEPaOqCnGlurggwvte/nok/vxSvvI73PT6l4Lts+6Zb01drUW0fL3BHDfl7ySDRNHObNTSHRfh0mmE19fllQQZyN9vNUmPUUbeqe8paGC1q+FIB7JJc66WcnLODNXlSpOhIL6ZE2pNPArkwjzWw== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: poUJ1h6lVk/nuvw98Y5LjLVCN9wjpuvKNG4p6YmyNJpcvhipEqi5DoTTlkvvtZJXBeUO0Otfi71WtP8bTx/jf55uDto/uLRPRMfXbtW73KyVZ8iVTPW/N4ExN13yfELz7lszUG1aL+2Urf+Pz5VRYuI3YSql3LngQx5EocdW59M741+T0S5txwTB1yKYy1uN/uZvCG9lXTkE5NANNCIA3FPkUYteeTrAM8teWBDvebgLImmzeQeDmFxFIceOwdD2R8xbbbcY5yElDEHt5xUGKR6k7PyawcI/rG0vSeHan8ZETSrOc8UM4WppguR7hgi97NrYWAyHbqKYBi/olVnPCGdTA5wX9z0sqFNp/ZPUIqcc/XrAUOtNniWUHGB4DU2QuOmVSUnUwrqS3HtQotJLmVCjoJim1vUqfVC4JLBWfesrt3UloFCv/wKwEBror9RxnCSEbXeP+isRSeJ8kjpdvyEOFS24zChYNPkfcDMXIg/yale0jMkSyHLCAjZeUewBJSyZCK9uZZBu6f2fx7R99aPAfv3LawvzS7zFdWDgMJRAxY5TZiZPNIoDMKuWkLF2ScsCnd1vhFhatUgw8aqyqaPI1SpHqJbY87HHMNKrXkk= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88680aaa-a288-42b2-8a72-08dcd28a5aae X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5613.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2024 17:51:24.9367 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Ub0vPHUsCv9YU1lqVTRe/ARYcQXMmaMHCl3XZhFiMno8XesixTHEQ8E/7qrS4NHcEeOE2SSvOLVEPrjmlmbEsOd/iB61D6iox6cfqmAXaow= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR10MB8046 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-10_12,2024-09-09_02,2024-09-02_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 phishscore=0 spamscore=0 malwarescore=0 adultscore=0 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2408220000 definitions=main-2409110136 X-Proofpoint-GUID: 39i1THJ-djTH1ub2lkPD41PyHN7TdYF7 X-Proofpoint-ORIG-GUID: 39i1THJ-djTH1ub2lkPD41PyHN7TdYF7 X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 086EF4000E X-Stat-Signature: 4ecmmdhwdzqm6cco4oojyggsmtqcdphu X-HE-Tag: 1726077101-27345 X-HE-Meta: U2FsdGVkX19koq0PJb1FF9zkaOK5MYxFZiXts0GvUS+vGPyBpqe+BKLL2WyaTSANyPF+kgrsDBcYu+O4p7UDqRFNtNJmZNWCncyaXj57FaCeupc0YEQkbHWCs7juLw/INWqgRKvILcDflSt7427a7l++vnN+cvgFp/mb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ezonSVJ6pLEmYl/ZV2SWig8IH+kozKcP+Z3rsNcgOov4we9dmNdydY1UjKXKDXhL91jMNKNM7r4eknlGjuWl8C+9jAXquoILwX0g+pMmRkxjwDYCvLv8x/upzsv/UiudSRBYMAnfW8RWXRgaFnbFPERMHnzuPlS/5+RRj9gnODHeZn6mCwDrfDxOUMOcHmn9jjYKg/o2C0r+2gkqvoNq9uG3E7xDtYtf1TLF/dbEmMfqFxasbjggz97CrDx5K9iOZPfmgbe34d6AVAivIKvzrLjBU/d6I0/CVNbVtpjoWI9myC3WuIc1eaMuh4G9h0KwGslGXPovHggsbJzOmzc+MpMboaGvZPWZm2A+/CiwTbEV7bmkk+cX08j5fU1QtTkkkC4sNNOj3AvTPPmY70outumqT 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: List-Subscribe: List-Unsubscribe: Avoid unnecessary nested min()/max() which results in egregious macro expansion. Use clamp_t() as this introduces the least possible expansion. Not doing so results in an impact on build times. This resolves an issue with slackware 15.0 32-bit compilation as reported by Richard Narron. Presumably the min/max fixups would be difficult to backport, this patch should be easier and fix's Richard's problem in 5.15. Reported-by: Richard Narron Closes: https://lore.kernel.org/all/4a5321bd-b1f-1832-f0c-cea8694dc5aa@aaazen.com/ Fixes: 867046cc7027 ("minmax: relax check to allow comparison between unsigned arguments and signed constants") Cc: stable@vger.kernel.org Signed-off-by: Lorenzo Stoakes Reviewed-by: Hans de Goede --- .../staging/media/atomisp/pci/sh_css_frac.h | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) -- 2.46.0 diff --git a/drivers/staging/media/atomisp/pci/sh_css_frac.h b/drivers/staging/media/atomisp/pci/sh_css_frac.h index b90b5b330dfa..8ba65161f7a9 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_frac.h +++ b/drivers/staging/media/atomisp/pci/sh_css_frac.h @@ -32,12 +32,24 @@ #define uISP_VAL_MAX ((unsigned int)((1 << uISP_REG_BIT) - 1)) /* a:fraction bits for 16bit precision, b:fraction bits for ISP precision */ -#define sDIGIT_FITTING(v, a, b) \ - min_t(int, max_t(int, (((v) >> sSHIFT) >> max(sFRACTION_BITS_FITTING(a) - (b), 0)), \ - sISP_VAL_MIN), sISP_VAL_MAX) -#define uDIGIT_FITTING(v, a, b) \ - min((unsigned int)max((unsigned)(((v) >> uSHIFT) \ - >> max((int)(uFRACTION_BITS_FITTING(a) - (b)), 0)), \ - uISP_VAL_MIN), uISP_VAL_MAX) +static inline int sDIGIT_FITTING(int v, int a, int b) +{ + int fit_shift = sFRACTION_BITS_FITTING(a) - b; + + v >>= sSHIFT; + v >>= fit_shift > 0 ? fit_shift : 0; + + return clamp_t(int, v, sISP_VAL_MIN, sISP_VAL_MAX); +} + +static inline unsigned int uDIGIT_FITTING(unsigned int v, int a, int b) +{ + int fit_shift = uFRACTION_BITS_FITTING(a) - b; + + v >>= uSHIFT; + v >>= fit_shift > 0 ? fit_shift : 0; + + return clamp_t(unsigned int, v, uISP_VAL_MIN, uISP_VAL_MAX); +} #endif /* __SH_CSS_FRAC_H */