Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2558990rwb; Mon, 19 Sep 2022 06:53:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5KvDBcyYLQCP9J4coZx1vGKlqy1Z0gEk2jr7/mIE3Gk5gJCtSUNh/WCLxJpVocfD7s9Cso X-Received: by 2002:a17:902:cec8:b0:178:6c66:cf16 with SMTP id d8-20020a170902cec800b001786c66cf16mr13284468plg.121.1663595613549; Mon, 19 Sep 2022 06:53:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663595613; cv=none; d=google.com; s=arc-20160816; b=r8+M+Nwt7dDEI8VWZWh6or5gCATTPH8IvoHXkS0l9vJCTVBoWcLL28cJooZID+g2TC mhycwikTLFIssH0VVuh9HGTJD18WokvJco/dlGtyHbM/ESUmDeJL0GPPZz03aTjDQEEl sJ64PesuJPXWfvTzSMSXq0WGgKPrpMfFE5aiYUjQkZI/wAD4kyIBT/u2kPlAfxjVrqWZ GIeG3f7kuj0L1qXEXWcvvkdDZW/3p85KsWUFgtOsTltAuQ896fXe6TNik2L5BmIGHOIM tGQQCxSY50cCls2QvVa5WX1ttMH+xhCnrQ3Gs6qJ7XynFJp3GE74UjhrZz7Hqv/rL3zG d8SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=L9CmwjaQrtQoPQDWonetACknciaQwqf80pduO7UPYu4=; b=FBQ7BnX2zJd4yLsNfiIX3Cpo46D3JXJktxtzCjypWeBeyjzUHB41hEr81kMWu0gtFU dPCzRFinlrZNQwnNauwA6qB0/cTUL+eTVLGZ/nBRMuNJ6vmn/c9GcjWpfGHu+DwjBl2a H2hyXZeRsAGTcfwr1KVJ6Ra91INxies3l4oQ4gu8BLJwm0iv9EvCJx9fAcOYEhXNJ/b3 6E52KGQP0XlbdeyXurBm1w70zUH/26M2Z8ejqzYJFhH6S05m4Mv/er8nSR+D8O1mu5Yz 28SsFMc08poXddGAeZx54nAiyBrBYkq9RaBtZ83CZ/YNiwTHZPWtX10k4exa9KIByQQ9 hQng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mdDIeNVH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b4-20020a63d304000000b003fea0415b5asi28622355pgg.834.2022.09.19.06.53.21; Mon, 19 Sep 2022 06:53:33 -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=@intel.com header.s=Intel header.b=mdDIeNVH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230321AbiISNp7 (ORCPT + 99 others); Mon, 19 Sep 2022 09:45:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230177AbiISNpw (ORCPT ); Mon, 19 Sep 2022 09:45:52 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7718A17066 for ; Mon, 19 Sep 2022 06:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663595151; x=1695131151; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=YM1dRxbPZHCQXuHcTFNhP5mVRzQg8TEYi3/O2RyVXbk=; b=mdDIeNVH1lUortLCdmIDyhs9OmG956eSIzei2lBSlzFCNcL7BD+6VcAK Ys4CcZCwnlVt4Uucx2CxF9XAdT0CD93h0a15ePHkZK1eyqgGfnGzKU24l 45IKuN/H2GyceCYUD8x3Jfp8YunEvI78Q9jYNDSi0tnW4VEvIdosHwljG l0we+aw6PQp0nmuYd+QkAFGWr6aidAtboGgH95OHUQ2TGd6VHEEWEP2pB 0Lqyut1N5wTdUtBrNj8KncsSB8MyBETFg7QfbfJLYibTxf4PpCp0GQsgZ AyVTU5GBdl2YqjUehHyJhqIgEYCGxfDzdNwHJVOThODUQg1IaMp1i2MtE g==; X-IronPort-AV: E=McAfee;i="6500,9779,10475"; a="279131316" X-IronPort-AV: E=Sophos;i="5.93,327,1654585200"; d="scan'208";a="279131316" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2022 06:45:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,327,1654585200"; d="scan'208";a="744120637" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga004.jf.intel.com with ESMTP; 19 Sep 2022 06:45:47 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oaH5l-004Zc7-0N; Mon, 19 Sep 2022 16:45:45 +0300 Date: Mon, 19 Sep 2022 16:45:44 +0300 From: Andy Shevchenko To: Yury Norov Cc: Linus Torvalds , linux-kernel@vger.kernel.org, Alexey Klimov , Andy Whitcroft , Catalin Marinas , David Laight , Dennis Zhou , Guenter Roeck , Kees Cook , Rasmus Villemoes , Valentin Schneider , Sven Schnelle , Russell King Subject: Re: [PATCH v4 2/4] lib/find_bit: create find_first_zero_bit_le() Message-ID: References: <20220915020730.852234-1-yury.norov@gmail.com> <20220915020730.852234-3-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220915020730.852234-3-yury.norov@gmail.com> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE autolearn=ham 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 Wed, Sep 14, 2022 at 07:07:28PM -0700, Yury Norov wrote: > find_first_zero_bit_le() is an alias to find_next_zero_bit_le(), > despite that 'next' is known to be slower than 'first' version. > > Now that we have common FIND_FIRST_BIT() macro helper, it's trivial > to implement find_first_zero_bit_le() as a real function. ... > +#ifdef __BIG_ENDIAN Probably you want to add a blank line here. > +#ifndef find_first_zero_bit_le > +/* > + * Find the first cleared bit in an LE memory region. > + */ > +unsigned long _find_first_zero_bit_le(const unsigned long *addr, unsigned long size) > +{ > + return FIND_FIRST_BIT(~addr[idx], swab, size); > +} > +EXPORT_SYMBOL(_find_first_zero_bit_le); > +#endif > + > +#endif /* __BIG_ENDIAN */ -- With Best Regards, Andy Shevchenko