From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b1-smtp.messagingengine.com (fout-b1-smtp.messagingengine.com [202.12.124.144]) (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 7DC0023817E for ; Fri, 9 Jan 2026 17:01:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.144 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767978088; cv=none; b=exz62+TXLGFBeqGGzDvpP9ZbWV9GVDiXDy6liCKFH8w6N9T9/SuYZWftEPu+RnfiFlGtAEVLlPUhkcLLLCmECwRaA7rVzJNHk1wgEWPzDdZt25ynwD32Dan/Mmzi4XowfYQURG0CbrGDBhNAUgFSkB7TK8mcQMA4L0Z7ewb4CHo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767978088; c=relaxed/simple; bh=4drAknyGFfwdZyrvpYFBfycmSf8SXYgk/Q1Vn/lIoBI=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=PsB0AOLbCboe9xygI9iY1WOEfgS7+riNSUEvRa9Fox9WEy8CYktxFmNsEjiDnfUCiz9jgVrydf85xNAmaOR84YTJl9Ey47ICNDZqrFipAWvnFENAAE+OunKWPKT/5wkIBe0sdaRaROrRK7uGqGlqr2eDTiApNf4ubmiycqwjm1U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=f/tkI9jR; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Y38h4ikb; arc=none smtp.client-ip=202.12.124.144 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="f/tkI9jR"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Y38h4ikb" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id DB72E1D00170; Fri, 9 Jan 2026 12:01:25 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Fri, 09 Jan 2026 12:01:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1767978085; x=1768064485; bh=XpN5X3h9kWDaV8c/TUF6rE9uOj8U5uMwphhzSDrpVI8=; b= f/tkI9jRgTFiNaFs5KRAQbaRsBpLsIuroIQ2IajYdHywBTbvXOKeSPypHAGdX9dv v++6Pmv6gSqc2IwWqhKYkjgzlAr2g1H7FhwIq3RMO4NzsdxP0dwsOG8uMRYbv6rL L3wzo71t8iR8eGBXvX/2KIMicfcDShoRXAhlNuUEcxUjNIUeA6lHH0NgwfMtSe5s b5tb4YOQJUqT6XAhg1ylxaFy8vtsD9kZOfpLJwtEtWDu3GWNdovX1OLj8iop7ODM oGkKN4P6GnV/HIDlsxYETzyhRkOxd4YqfbNQrS4Qg553Yrr1kJGrFb7VpDjMpiU1 VdJgPgNchamdN09RDJ2Y8w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1767978085; x= 1768064485; bh=XpN5X3h9kWDaV8c/TUF6rE9uOj8U5uMwphhzSDrpVI8=; b=Y 38h4ikba9eEARBt80WhnNyVKKUSX37EsFVKv/mXkkq7RECdro/EKaTjDJeqaNBZ7 B7d2OLXsXMkqwREOpmSvDs2yRFxyBW2BKcpQVCi3TshwqwiH9KJPqD8z/JO5sSZZ DCGcr/9Dmv/Va7V4gnFo8FUVkD7UUjHVh3mlIikq8cXWuVkFKQkMrJ7eRg0Y6rUE OWTZ+BbU0sKe4wa924m3ltUF4Xo7AYlRfKagECBd1xouLp//OkV5W//CDOocPbRQ 1ZJ22UQvJCmISHlIYIbDyUkVRpsIBepzqezzClHjGFKjx+jllhGw0TV7ftQycSkx YP5UORuRZfDjReOmLiARg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddutdelfeeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftehrnhgu uceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrthhtvg hrnhephfdthfdvtdefhedukeetgefggffhjeeggeetfefggfevudegudevledvkefhvdei necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghrnh gusegrrhhnuggsrdguvgdpnhgspghrtghpthhtohepgedtpdhmohguvgepshhmthhpohhu thdprhgtphhtthhopehjohhroheskegshihtvghsrdhorhhgpdhrtghpthhtohepthhssg hoghgvnhgusegrlhhphhgrrdhfrhgrnhhkvghnrdguvgdprhgtphhtthhopehrohgsihhn rdhmuhhrphhhhiesrghrmhdrtghomhdprhgtphhtthhopegurghvvghmsegurghvvghmlh hofhhtrdhnvghtpdhrtghpthhtohepmhhpvgesvghllhgvrhhmrghnrdhiugdrrghupdhr tghpthhtohepshhimhhonhgrsehffhiflhhlrdgthhdprhgtphhtthhopegrihhrlhhivg gusehgmhgrihhlrdgtohhmpdhrtghpthhtohepjhgtmhhvsghksggtsehgmhgrihhlrdgt ohhmpdhrtghpthhtohepjhhohhgrnhdrhhgvuggsvghrghesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 5EA66700069; Fri, 9 Jan 2026 12:01:22 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: AMfBBwEbEMYc Date: Fri, 09 Jan 2026 18:01:02 +0100 From: "Arnd Bergmann" To: "Petr Tesarik" , "Yury Norov" , "Rasmus Villemoes" Cc: "Richard Henderson" , "Matt Turner" , "Magnus Lindholm" , "Vineet Gupta" , "Geert Uytterhoeven" , "Maciej W. Rozycki" , "Thomas Bogendoerfer" , "Madhavan Srinivasan" , "Michael Ellerman" , "Heiko Carstens" , "Vasily Gorbik" , "Alexander Gordeev" , "Chris Zankel" , "Max Filippov" , "Patrik Jakobsson" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "Dave Airlie" , "Simona Vetter" , "Robin Murphy" , "Joerg Roedel" , "Will Deacon" , "Jakub Kicinski" , "Andrew Lunn" , "David S . Miller" , "Eric Dumazet" , "Paolo Abeni" , "Oliver Neukum" , "Kuan-Wei Chiu" , "Andrew Morton" , "Marcel Holtmann" , "Johan Hedberg" , "Luiz Augusto von Dentz" , "Pablo Neira Ayuso" , "Florian Westphal" , linux-kernel@vger.kernel.org Message-Id: In-Reply-To: <9767487fcab7dbe7a7282a48a492171629eb935b.1767975412.git.ptesarik@suse.com> References: <9767487fcab7dbe7a7282a48a492171629eb935b.1767975412.git.ptesarik@suse.com> Subject: Re: [RFC PATCH 1/2] bits: introduce ffs_val() Content-Type: text/plain Content-Transfer-Encoding: 7bit On Fri, Jan 9, 2026, at 17:37, Petr Tesarik wrote: > + * Returns: > + * least significant non-zero bit, 0 if all bits are zero > + */ > +#define ffs_val(x) \ > +({ \ > + const typeof(x) val__ = (x); \ > + val__ & -val__; \ > +}) This looks good to me, but I'd suggest using 'const auto val__' instead of typeof(), to reduce expanding complex arguments twice. Arnd