Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp927485rwe; Wed, 24 Aug 2022 11:24:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Y4PnMa4FEl98sUtcdTnhnz4aOSNX8sq4jI+PNyL4BVpu6FdrUNMc4kS/PxbYkEyNEOuX/ X-Received: by 2002:a17:907:6890:b0:73d:70eb:d98b with SMTP id qy16-20020a170907689000b0073d70ebd98bmr172571ejc.18.1661365489962; Wed, 24 Aug 2022 11:24:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661365489; cv=none; d=google.com; s=arc-20160816; b=cYV54KbcsbfJxW0I80Z5uJShOKAXoSEeBEpczy2A5/Su2Up7I5PXULpfVvqpNSb5xG aTlJXSRIISQD0+i/yuQVA13Dj8ZgZ6UPWnXaBRCITNRS2lqUtY3uSzCPA8n7CI/ObXVG Sw3nW++MpDKUKLwsJ9tHRDCuUBqOTx6r484qjmCYj9PUC/ruP2xeVubkxoLJUYCmH7v9 m8ry8qOERZPqpzB6QzqQJwZ5PF8ljeNhb3CRbJTKghseXs4UIPYOnPJsVIWNDXU+3phh W9MstKowI9O8SlXQed855WF9hb8156IcOn3zb7rx9t1joVU5HZPCMH7FJLvCoFvLmtqp Zk4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ZH0AW3c9ztNqQzucg5KecEsPcM7OXPYg9d2t9+QVkjo=; b=u0nJSWWpuoABFLoeM3TQOMeHKj3wj/WcFFRcZXoeaN+0bEOc1VFcuAStAp+l45rNq7 rX96FH/ylMu+8h4MqsvBozDI2U4DCiE8MolYM7KBdEIvlx6UarOzGfyHM6wLopVTMdGX b4vL4ch5fWZINT9PtLsbTn8qLU6KbM2MnVCk396j0/Dpw17oA7dlyphom1P/bLYOqHiK dolNdZdKMdG+MXj0Abugm5tsg9KDEYkmJmUKMya276/ICC4Yoy27+FZbKU3/5GqxLhug qfp1k10/uoZ55jWd9n3EKoC9QWP883NfuZgJbVw9e4j5AzjTlNi7HT8bzr3v+7zjSIke gguA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=hwRf6JyO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i14-20020a05640200ce00b004479f85b42esi329845edu.509.2022.08.24.11.24.25; Wed, 24 Aug 2022 11:24:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=hwRf6JyO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240453AbiHXSB1 (ORCPT + 99 others); Wed, 24 Aug 2022 14:01:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240753AbiHXSAy (ORCPT ); Wed, 24 Aug 2022 14:00:54 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A564112A92 for ; Wed, 24 Aug 2022 11:00:05 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id w19so35045099ejc.7 for ; Wed, 24 Aug 2022 11:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=ZH0AW3c9ztNqQzucg5KecEsPcM7OXPYg9d2t9+QVkjo=; b=hwRf6JyOT1Jyp0yqMsQEH6rdf0/piRq37jqkfAP9b+yj4UgKieh1p5lJ1PeSPPku84 Q3fgiavUUAOWFzbMHBjemM2EeNkp+0hFoRZsEJ/w8iL0FZCQspTvI5uiJGUuSao7RTjr OD0dVfYQ3C2R84vUtaqXCpY+azqvbS7HdWLIE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=ZH0AW3c9ztNqQzucg5KecEsPcM7OXPYg9d2t9+QVkjo=; b=RiUZUbeSp1ruiJWbTYX3/d3CEmTgCTw5suV1B61LPKZ/h6vrqa78ZpKQ9EACY/e5e6 b0UJQKqbHPLmxsFJBZTaNe3N0sJWVpJrRoIgZKVOFNOeBfHU1IcqJuxv2sqbKysBqXNe dUZgp7awbVrSnNYsrO/RW58TPxQjr4fKyTBv9V393YdbBKGvwJqgGBm38jHDcCwIf71R h6JIcxtO+JhMgGkz0zIkNM91Xfk43oUttiG47dKJmq+G3Uba1qWLINKZWQfazPl7++2h 66Jm89sx4G3Zmw+cVycwM13BAYzwIpb+IU0B/sMqDKfaifyTsc5xcAI8PNWr/Y/nJ2Pt uTGw== X-Gm-Message-State: ACgBeo0f2trsaZVuXTnsjx0S6beHTvugLS+CVrzGfUgNY4TwfJFTNcn6 lkjA4sl6JSVV7hMh4zPAR3UfgRS/qBb+vuGH X-Received: by 2002:a17:906:9b84:b0:73d:8324:487e with SMTP id dd4-20020a1709069b8400b0073d8324487emr99631ejc.98.1661364001610; Wed, 24 Aug 2022 11:00:01 -0700 (PDT) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com. [209.85.221.45]) by smtp.gmail.com with ESMTPSA id 11-20020a170906308b00b0072abb95eaa4sm1417780ejv.215.2022.08.24.11.00.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Aug 2022 11:00:00 -0700 (PDT) Received: by mail-wr1-f45.google.com with SMTP id bs25so21731706wrb.2 for ; Wed, 24 Aug 2022 11:00:00 -0700 (PDT) X-Received: by 2002:a05:6000:136f:b0:225:2fad:dde7 with SMTP id q15-20020a056000136f00b002252faddde7mr210002wrz.274.1661364000263; Wed, 24 Aug 2022 11:00:00 -0700 (PDT) MIME-Version: 1.0 References: <20220824012624.2826445-1-yury.norov@gmail.com> <20220824012624.2826445-2-yury.norov@gmail.com> In-Reply-To: <20220824012624.2826445-2-yury.norov@gmail.com> From: Linus Torvalds Date: Wed, 24 Aug 2022 10:59:44 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/3] lib/find_bit: introduce FIND_FIRST_BIT() macro To: Yury Norov Cc: linux-kernel@vger.kernel.org, Guenter Roeck , Dennis Zhou , Russell King , Catalin Marinas , Andy Shevchenko , Rasmus Villemoes , Alexey Klimov , Kees Cook , Andy Whitcroft Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 23, 2022 at 6:26 PM Yury Norov wrote: > > + > +#ifndef word_op > +#define word_op > +#endif > + > +#define FIND_FIRST_BIT(EXPRESSION, size) \ Please just make 'word_op' be an macro argument, the same way 'EXPRESSION' is. That way the LE/BE cases can be handled without any odd tricks. Linus