From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) (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 DF6C929CEC for ; Sun, 28 Jul 2024 11:18:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.58.86.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722165499; cv=none; b=UZBsm8XyViFhMrdhNrgiLBqKlLWN22VVkabTmQU1v629LHiS9Jyfz97iPksPpcr+w6V6fS5EqriztQoyEJbGad2ERF5mKVtAcYqMQka8fYNbFZZuuttan85vdo0Aa3kU6pYSNe/iIqfYaqZO8BEyWyq+JPDgw0BzkjlkOc7/lPY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722165499; c=relaxed/simple; bh=eQ7HWzpAcXqhhm63Y2QACV2RaOElIBpgN2Uw31O/Vkc=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: MIME-Version:Content-Type; b=mk/rN2PgNJqHYPH2AEtIE3xDbr7GzP/TKfo0zs1hygpoJCR4kBMDOtE1wI7wX1ywZoPD0LrGsh9+QHlb36LPSK9vK7pq2978+G+q5UuVWA9gk0/VIsUkI/2l9ybB993XKbUyk67E7qSjsB4RlzB32wYcgO0wmZlc5TEsMRUtKBQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM; spf=pass smtp.mailfrom=aculab.com; arc=none smtp.client-ip=185.58.86.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aculab.com 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-237-t68vUNQdNHix3gc58OU02A-1; Sun, 28 Jul 2024 12:18:03 +0100 X-MC-Unique: t68vUNQdNHix3gc58OU02A-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; Sun, 28 Jul 2024 12:17:19 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Sun, 28 Jul 2024 12:17:19 +0100 From: David Laight To: 'Lorenzo Stoakes' CC: 'Linus Torvalds' , Jens Axboe , "linux-kernel@vger.kernel.org" , "Matthew Wilcox (Oracle)" , Christoph Hellwig , Andrew Morton , Andy Shevchenko , Dan Carpenter , Arnd Bergmann , "Jason@zx2c4.com" , "pedro.falcato@gmail.com" , Mateusz Guzik , "linux-mm@kvack.org" Subject: RE: [PATCH 0/7] minmax: reduce compilation time Thread-Topic: [PATCH 0/7] minmax: reduce compilation time Thread-Index: Adrd1UnD4d8H4E3lR3eDOQFKqPNnSwCBfkcCAAdYOfAAFX/+AAAkPNng Date: Sun, 28 Jul 2024 11:17:19 +0000 Message-ID: <7a5cf18b6141453988247cfa4d4dcd49@AcuMS.aculab.com> References: <23bdb6fc8d884ceebeb6e8b8653b8cfe@AcuMS.aculab.com> <902a9bf3-9404-44e8-9063-03da3168146a@lucifer.local> <137646a7-7017-490d-be78-5bd5627609c3@lucifer.local> <36aa2cad-1db1-4abf-8dd2-fb20484aabc3@lucifer.local> <40369e153bd447e5b597c31e7bc9a2b1@AcuMS.aculab.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: quoted-printable From: Lorenzo Stoakes > Sent: 27 July 2024 19:59 >=20 > On Sat, Jul 27, 2024 at 08:08:39AM GMT, David Laight wrote: > > ... > > > and it will spit out > > > > > > Longest line is drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:113= 6 (2346kB) > > > ' ((((((pkt_size) + __builtin_choose_expr((sizeof(int) =3D=3D > > > sizeof(*(8 ? ((void *)((long)((__builtin_...' > > > > > > to tell me that we have that insane 2.2 *megabyte* line due to the > > > MVPP2_SKB_HEADROOM thing, and I should apply this patch: > > > > > > -#define MVPP2_SKB_HEADROOM min(max(XDP_PACKET_HEADROOM, NET_SKB_= PAD), 224) > > > +#define MVPP2_SKB_HEADROOM > > > MIN_T(int,MAX_T(int,XDP_PACKET_HEADROOM, NET_SKB_PAD), 224) > > > > > > to fix it. >=20 > Yeah sorry just saw you had already addresed this Linus... I just went wi= th a > clamp()_t in my patch. >=20 > > > > Or (if I've got is right): > > #define MVPP2_SKB_HEADROOM clamp(XDP_PACKET_HEADROOM, NET_SKB_PAD, 224) > > >=20 > I'm pretty sure you can clamp_t(int, ...) here safely based on usage. Why doesn't a plain clamp() work? The xxx_t() variants really shouldn't be used very often. =09David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)