From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF831C433EF for ; Fri, 15 Jul 2022 01:04:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240895AbiGOBEW (ORCPT ); Thu, 14 Jul 2022 21:04:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240916AbiGOBET (ORCPT ); Thu, 14 Jul 2022 21:04:19 -0400 Received: from mail-oa1-x35.google.com (mail-oa1-x35.google.com [IPv6:2001:4860:4864:20::35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3B1614D10 for ; Thu, 14 Jul 2022 18:04:16 -0700 (PDT) Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-10bf634bc50so4578778fac.3 for ; Thu, 14 Jul 2022 18:04:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=DyAmjn1tfyLJ1+MZi8YDqDhzALNsQ4q0fCyYaxrq/jA=; b=l9NlUUrsp6rSwCAygSBrXAux2+uiGAlfWzuy1x7pOMa0BgEKbEQeNEJ9QbCKxC55t6 a/Q/ach264tEk3U/YQYqMhieQz0LM7my3mj4iQCVM+1rCyYezU1EWdGOgugYzM/7F2TC f06+Dp7DnsbbvZu9hPcnsH75j3cHBxMT35oBBN7W+h1lABCLZPRTP0G3ob0QczEaMLCZ zAN3g09XW4eWXB6Kh7uc9WVcTXj1OfQFER3W8HQw/jDm6Wu2RWUQuBWpqlN1hLmiNKEM EZa5QSZPzcekkL7vDQmS3eJIsM/7Zs7DRF4RQF8lDQOIpbsyH/3BcX1icfLsJB1hpfE4 dq2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=DyAmjn1tfyLJ1+MZi8YDqDhzALNsQ4q0fCyYaxrq/jA=; b=5alpKPbpm5X6Zrt3Fovc7fGqZC6ybytwM9XxRHHURSy42uOe2BValmwwOr7814LI8y DS5/9s8k3DRbBdjw8nueCp9x8dRmx+svUcQGSiUmRyWYHRQkmoHlhcsQ3v3h4xBxXi4g UbHcqaw3wqzFXeXO3xJnrGQi5SRqBrweCdQDsPMD3lk8pqm3GcB/a1FLaHDATDqXgEcI VaG9xYRIDHNvzqRxM8Ck2EKhJ87OJlk4pvGcYR8fGIMOTS3YhvI7KEsiMLzaVXZswyvY 42BX6DgqK+WkEaAQZx2Rbgnb1Ss3VeWESHSMp2/8HqLQ/iWmBXtrbC6XVGW5vSvFBdbJ +ZzQ== X-Gm-Message-State: AJIora/baOX51P9VBwKwJ7KwXDNQoahDX07C5q/AVX//QTcSNW0s9XGP xvx/cbqSYM1xqJB7MPEh3IQ= X-Google-Smtp-Source: AGRyM1vm0kFOBqyfsKpIn1FWiDINsjFmNuybOAV32x1xaoO8FUwPyOPuVDzHr0Aymwdxvy4Hw2l7JA== X-Received: by 2002:a05:6870:d1d2:b0:10c:d05:7588 with SMTP id b18-20020a056870d1d200b0010c0d057588mr8949333oac.180.1657847055894; Thu, 14 Jul 2022 18:04:15 -0700 (PDT) Received: from localhost ([12.97.180.36]) by smtp.gmail.com with ESMTPSA id l12-20020a4aa78c000000b0035ef3da8387sm1275519oom.4.2022.07.14.18.04.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 18:04:15 -0700 (PDT) Date: Thu, 14 Jul 2022 18:04:14 -0700 From: Yury Norov To: Andy Shevchenko Cc: Linux Kernel Mailing List , Alexander Lobakin , Andy Shevchenko , Arnd Bergmann , David Gow , Eric Dumazet , Isabella Basso , Kees Cook , Keith Busch , Kumar Kartikeya Dwivedi , Marco Elver , Mark Rutland , Rasmus Villemoes , Steven Rostedt , Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= Subject: Re: [PATCH v2 0/5] lib/find: add find_nth_bit() Message-ID: References: <20220711044711.466822-1-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 12, 2022 at 06:46:35PM -0700, Yury Norov wrote: > On Tue, Jul 12, 2022 at 08:28:42PM +0200, Andy Shevchenko wrote: > > On Tue, Jul 12, 2022 at 6:26 PM Yury Norov wrote: > > > On Mon, Jul 11, 2022 at 1:55 AM Andy Shevchenko > > > wrote: > > > > On Mon, Jul 11, 2022 at 6:51 AM Yury Norov wrote: > > > > ... > > > > > > 2) fns() is not good abbreviation, because among ffs (First) and fls > > > > (Last), fns would be read as Next, which is misleading, I'm not sure > > > > fnths(), which is correct, is good for readers. > > > > > > I agree that fns() may be confusing, but fnths() is even worse to me. > > > > I also think it's not the best choice. > > > > > I expect that it will be mostly used indirectly via find_nth_bit(), and > > > will not create a lot of confusion for users. > > > > Perhaps in that case we can survive with something else? Naming is hard... > > OK, I'll move it to find.h and call __find_nth_bit(). > > Is this the only issue, or I'd wait for more comments? I looked again, and I think that the structure of the code requires to have fns() in bitops.h Just because we can't think out a good name doesn't mean that we should break existing structure. Let's keep things as is, and if one day we'll find a better name - we'll rename it. Regarding this: > > > I expect that it will be mostly used indirectly via find_nth_bit() It's not too important what I expect. For available functionality it's much easier to find a place to use, and breaking people from doing it is silly. > Thanks, > Yury