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 3F3B6E6FE36 for ; Fri, 22 Sep 2023 14:21:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234251AbjIVOVm (ORCPT ); Fri, 22 Sep 2023 10:21:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234252AbjIVOVl (ORCPT ); Fri, 22 Sep 2023 10:21:41 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 534D5198 for ; Fri, 22 Sep 2023 07:21:35 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6600,9927,10841"; a="384674911" X-IronPort-AV: E=Sophos;i="6.03,167,1694761200"; d="scan'208";a="384674911" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2023 07:21:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10841"; a="817793937" X-IronPort-AV: E=Sophos;i="6.03,167,1694761200"; d="scan'208";a="817793937" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga004.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2023 07:21:31 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC0) (envelope-from ) id 1qjh28-0000000HCq5-3dHg; Fri, 22 Sep 2023 17:21:28 +0300 Date: Fri, 22 Sep 2023 17:21:28 +0300 From: Andy Shevchenko To: Marek =?iso-8859-1?Q?Beh=FAn?= Cc: Linus Walleij , Gregory CLEMENT , Arnd Bergmann , soc@kernel.org, arm@kernel.org, Bartosz Golaszewski , linux-gpio@vger.kernel.org, Dmitry Torokhov Subject: Re: [PATCH v2 3/7] platform: cznic: turris-omnia-mcu: Add support for MCU connected GPIOs Message-ID: References: <20230919103815.16818-1-kabel@kernel.org> <20230919103815.16818-4-kabel@kernel.org> <20230921214541.0dae4d62@thinkpad> <20230921221409.4a01f541@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230921221409.4a01f541@thinkpad> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Thu, Sep 21, 2023 at 10:14:09PM +0200, Marek Behún wrote: > On Thu, 21 Sep 2023 21:45:57 +0200 > Marek Behún wrote: > > > I could use ffs(x) instead of ilog2(x) + 1. > > Pardon me, I meant fls(). Or maybe get_bitmask_order() from > linux/bitops.h. In any case it's bitops.h APIs that you will need and I think it's fine and Linus will approve that. -- With Best Regards, Andy Shevchenko