From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F9282D321B for ; Fri, 9 Jan 2026 19:32:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767987176; cv=none; b=VlRuxiPV+1rQKHkyUSepyNeIDQ/6kQ0pkCiUi8CRUBV5hA8/Ys3S0qCx+OsN8eUr7dRsy9YW8sutHWOYqyBCQee+EkxKqkKcnJsZPJ0FTA24N9omXHm4yPN7Kx25Te9eSmAI3pGQCxkapt+AIOUBKyFkbvskLrapfuGHxtn87yM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767987176; c=relaxed/simple; bh=3LrusfrXsGXJr4DTx67nMXADq7jnUoOXfpf2QlMOnRk=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cbhnDL49OkoBeRIAoEjHpcsnAQaysKJc0Kf6GsQ2pF3zRvHmlc9x8Df0rBkx0GnlQG9J1KozRXc0qJKUvlztyqLu8vT+i3JnNIFa4R9u6C0YAihTN4z635I8YhdhDooPDhkuiyLenIGUxP3eY2EifmyED9rqgg8Kdf307//fndM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=fHGWUqr9; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="fHGWUqr9" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-432d256c1b3so227732f8f.2 for ; Fri, 09 Jan 2026 11:32:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1767987174; x=1768591974; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=rhuWik17V1CbNWFkbRsw+MtGwrzYey8aTcnt0OkZ2fY=; b=fHGWUqr9cSw8Fu45eFHHWh+kwyYscrXljwdUAnFPJ8jZiWPwMZwbES9yfHonJczjsX RYFuuKR0aOvfNzVLly1rZ+mhCdYmbRP4YTblHD6vKSfJOcZ7uaK7HJbKZswRBF3PUbVw zgAi/NQUfb+s+QP2/hQK20EGSrVnSG170jYUmngr1eAHAPpY3Pom+TfGVadPFKAu+wmq l5YkLPjMQy9v+4YGLf6rzyDDcbLaQGthzoGluEiJ7rcvi6m7wFDUx3/+yKgbt3FcE8ao /uaV73oyxpuXMUbAFF94ZSeREUPu8LO9VE0MogGzklxfIFfLIh++viLW1orTTxe7Eh1h THpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767987174; x=1768591974; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=rhuWik17V1CbNWFkbRsw+MtGwrzYey8aTcnt0OkZ2fY=; b=sIN0muyJovrz3tHlQyhLg2HFr5prHPe39moMspSyxgu0kzmkKV6ZIil0/xZsTPRTw3 T3Vj/esCUUl7H54V1hVjdHJ6Ot2x/hl6B9F9bJkiFtBM06+CKRHZysauhf8ZbA+tB8tC +qi4JPue610s0ZYzM2VW2s4DMD2BmJ1IxGQnbdBWaaECmMAM8sek0vCz545E8JFvNpXy +6i1JgpoXSON6sSL8/A3R6ubHsyJhYZB195/cYfqA0Df7R5UfHAKM4iwCl+Y+AyECqLh pwEdV0k71AbHqVR/+akfs2LbJd0SshI0q46uJO9UCg5O2a/UtGxTk2tDQNE7R/TdaS/j cHyA== X-Forwarded-Encrypted: i=1; AJvYcCXyKGJwU4/MEzsCVuLUeQS5O508Nqeoet+iVbfIP177IumRGPJKAzZbi7mUQmUAmwuAokki/FPEjzxAh5U=@vger.kernel.org X-Gm-Message-State: AOJu0YwfdyYkRA5PIHh8pH4bjRi9GbK7rgab58AtXddy/yfFH84lQtWY bYVJC00JVEzlnYkrzNZAYKYfPBkKoXekMA5f+jfI/sewnb4Uucn7Dj1+D/vImObFwjQ= X-Gm-Gg: AY/fxX5ySPgRgOwlXqDiHmMa6AsOVHoICClvsGS2ZmI+hpwTYqPrYU+Kpfp4xPWmwCD ByfMP9zgAixhwBFsImOZ3gJbiceXGg5z1wWl7YyiOR0V773s6gUT0N7KXoG4PGWgzeAKcJ35UJ/ 3rmWETkadS+27Lo42A/WcMVykfbEC+YlHtbp6qxIMgDYyJL76qNU2dfdfH97YJOgjDExf3P7qTZ B6k2CDz6BAYtJ6S5T3yEJUhsaM2dN7OL5rabU3WewAHm+QXaIj7U9NH1ZI0brvlyAO4/9TQmKs2 hxeRz22GiWbwxnNa3rHId9a/Y2m8F9mSuAExcwaz6ljTsp01pSUCeKXHJA09+RcdsME0Lu7yZqy eK+T8LP/teN6CBhyIWfg0ZlxljzBkrC1KeEkRgwMZEr9LllDf7/e9jpvVqcDAZj9Wsb4p1AitH4 7XBmKFmpkKp5yAYpNSB6plEM671jxjOi6y2EEAT1yZdgwwO5bp26bubUGfrCB8fYlojIQmfRrCg MEy X-Google-Smtp-Source: AGHT+IHN+IMDcsx5YtRKypphP9qttxLIl1jhGxRUXMmz+oqTXgfwHTSNWEfuiwoPcu5K14qFSoANiA== X-Received: by 2002:a05:6000:2312:b0:430:f431:c0e0 with SMTP id ffacd0b85a97d-432c37bf78dmr8033558f8f.8.1767987173540; Fri, 09 Jan 2026 11:32:53 -0800 (PST) Received: from mordecai (dynamic-2a00-1028-83b8-1e7a-3010-3bd6-8521-caf1.ipv6.o2.cz. [2a00:1028:83b8:1e7a:3010:3bd6:8521:caf1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd5ee893sm23643869f8f.37.2026.01.09.11.32.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jan 2026 11:32:53 -0800 (PST) Date: Fri, 9 Jan 2026 20:32:50 +0100 From: Petr Tesarik To: Yury Norov Cc: Yury Norov , Rasmus Villemoes , 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 , David Airlie , Simona Vetter , Robin Murphy , Joerg Roedel , Will Deacon , Jakub Kicinski , Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni , Oliver Neukum , Arnd Bergmann , Kuan-Wei Chiu , Andrew Morton , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Pablo Neira Ayuso , Florian Westphal , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 2/2] treewide, bits: use ffs_val() where it is open-coded Message-ID: <20260109203250.08b6f746@mordecai> In-Reply-To: References: <1ce341045ad0487c66ca21003f9974916aba0bce.1767975412.git.ptesarik@suse.com> X-Mailer: Claws Mail 4.3.1 (GTK 3.24.51; x86_64-suse-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 9 Jan 2026 13:19:25 -0500 Yury Norov wrote: >[...] > -- > > OK, let me stop here. > > Can you please instead of mechanical rework check each case > individually and find the best replacement to highlight the intention? > > Can you also split this patch to a series according to subsystems, so > that corresponding maintainers will have better access to their changes? Well, then it makes more sense to start by identifying the intention in every place and getting them fixed one by one. Whatever remains should be converted to use the new macro. In fact, I can do both in parallel, converting the places where the result of ffs() is immediately used as a shift count. Then no tree-wide change is necessary, as long as we can first get the helper (under whichever name) into bitops.h. But it will be rejected without an in-tree user. I somehow feel caught by Catch XXII. Advice welcome. Non-ironically. Petr T