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 892A0C32773 for ; Fri, 19 Aug 2022 10:34:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348323AbiHSKeQ (ORCPT ); Fri, 19 Aug 2022 06:34:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347973AbiHSKeJ (ORCPT ); Fri, 19 Aug 2022 06:34:09 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DDB93DF1C for ; Fri, 19 Aug 2022 03:34:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660905245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=t9qConcsVrFeMSKZiZOZ7jvIr/WxjYXLhBQh/vLaFNc=; b=Sa+EqwxqY5TNC8cxtn6xkrhHOGjcuP4AiVEIHDvZLba02ddxN8YcnSwGbaZWyPyNVwpt9q b/SJ/CIgSMYUxkNR+CnGE20uTkm4Z+KmwstNdsdfRsyu4CnZO4T+Tp46FE4yyvGZ3Is0Tc i6DnsqV8T8p5VKVXoIWRdQcTjE8rFpE= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-665-7d1VIyhhO_a3udN6pDZatw-1; Fri, 19 Aug 2022 06:34:04 -0400 X-MC-Unique: 7d1VIyhhO_a3udN6pDZatw-1 Received: by mail-wr1-f72.google.com with SMTP id i29-20020adfa51d000000b002251fd0ff14so636086wrb.16 for ; Fri, 19 Aug 2022 03:34:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=t9qConcsVrFeMSKZiZOZ7jvIr/WxjYXLhBQh/vLaFNc=; b=4GjKM4Oj32+TgfeFxZDYOgw29c4xcQ+axnlm8MoCZJha8oWx4t200JVN9r9kxP11xX /jtLqbTql+21OMhA0SXIsK/D9INZXzfzyLSnPsawA8WuiZrllTD5P2HatwHQHq9mmpG3 hnwK3YBGf4GWZxW4lXjouOB0jAxzA3kDoJBVnxxBSHshgtjOPqKAv3UafcG1xLyrSR8F yZOPB1FUBo5lcG2xoXmffPpPB/w1mXRH3T91W1i4tbshPYvTC8d0knXua3xpzWm0clR+ 90VGul8jFDhFyMKsH+/CFmD6wAqaLomEtsDTjd4hutvzai9s9ocGsK02/CVpWbREuyfg VsNQ== X-Gm-Message-State: ACgBeo0SXBrRwj4+rN654rwu+Oe89GA7ohe6Npnk27IgdX/q1Pdkroew CmtzVaxjZ9KFEi7ijrtEMkmT8pB85L1lmaB5o5fW39tMqCJThJ8rH5OV9VsPzDQI8bWy8biL5Ua 5boPNb/0z1Dt0WC/D X-Received: by 2002:a5d:64e9:0:b0:220:7dd7:63eb with SMTP id g9-20020a5d64e9000000b002207dd763ebmr3831683wri.590.1660905243409; Fri, 19 Aug 2022 03:34:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR7AoX+VQs/b3XMThsgV+BYuePZtBIHhF6hh6s7w1xBiDvXh8zDLXmM78RPTeY/EF0PqfZ3SJQ== X-Received: by 2002:a5d:64e9:0:b0:220:7dd7:63eb with SMTP id g9-20020a5d64e9000000b002207dd763ebmr3831663wri.590.1660905243244; Fri, 19 Aug 2022 03:34:03 -0700 (PDT) Received: from vschneid.remote.csb ([185.11.37.247]) by smtp.gmail.com with ESMTPSA id b18-20020adff252000000b00224f605f39dsm3501436wrp.76.2022.08.19.03.34.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Aug 2022 03:34:02 -0700 (PDT) From: Valentin Schneider To: Andy Shevchenko , Steven Rostedt Cc: netdev , "open list:HFI1 DRIVER" , Linux Kernel Mailing List , Saeed Mahameed , Leon Romanovsky , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yury Norov , Andy Shevchenko , Rasmus Villemoes , Ingo Molnar , Peter Zijlstra , Vincent Guittot , Dietmar Eggemann , Mel Gorman , Greg Kroah-Hartman , Barry Song , Heiko Carstens , Tony Luck , Jonathan Cameron , Gal Pressman , Tariq Toukan Subject: Re: [PATCH v2 1/5] bitops: Introduce find_next_andnot_bit() In-Reply-To: References: <20220817175812.671843-1-vschneid@redhat.com> <20220817175812.671843-2-vschneid@redhat.com> <20220818100820.3b45808b@gandalf.local.home> <20220818130041.5b7c955f@gandalf.local.home> Date: Fri, 19 Aug 2022 11:34:01 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 18/08/22 22:04, Andy Shevchenko wrote: > On Thu, Aug 18, 2022 at 8:18 PM Steven Rostedt wrote: >> On Thu, 18 Aug 2022 17:26:43 +0100 >> Valentin Schneider wrote: >> >> > How about: >> >> > >> > find the next set bit in (*addr1 & ~*addr2) >> >> I understand the above better. But to convert that into English, we could >> say: >> >> >> Find the next bit in *addr1 excluding all the bits in *addr2. >> >> or >> >> Find the next bit in *addr1 that is not set in *addr2. > > With this explanation I'm wondering how different this is to > bitmap_bitremap(), with adjusting to using an inverted mask. If they > have something in common, perhaps make them in the same namespace with > similar naming convention? > I'm trying to wrap my head around the whole remap thing, IIUC we could have something like remap *addr1 to ~*addr2 and stop rather than continue with a wraparound, but that really feels like shoehorning. > -- > With Best Regards, > Andy Shevchenko