Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2377148pxf; Sat, 27 Mar 2021 09:40:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwb1YBdiRmAu5Kix3kME6ubdtJzeDyd6Au1V1XTQU/CYw9QL0qUwUeRlMgd4Sdoth5zQUB4 X-Received: by 2002:aa7:c342:: with SMTP id j2mr21493646edr.8.1616863217448; Sat, 27 Mar 2021 09:40:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616863217; cv=none; d=google.com; s=arc-20160816; b=f4wlL7YVKbEr4RMoS01NnBRolZA4qEL/4LBmU/QGt4mXcL4s2xY+kXRiClvlZgf5k5 tSOViAGaY/1902WNVa9Xa7YWvGV3W+6C7/S6zpSv563VvxDamnCz9l3MS82fGSNOQP6p qWB6cciEkjUon/8vO0UJ4RTOUh+fTQltTR28nZm8E8YUcQbV5kLJ0fbHCfPNiOX+wa9H lt1sb6gCq3xsFN8CZQlsy7DMlGHVnVIU4Aeb0bsh7M5DOoViozSXpRGlViqc1S7x5//q e2V3e5yvbD7KhbLQhciePrnWtxpIwR1lmLqtvfyvTeqxB4z/8JfpDolTy/hnWYjT3JR9 ykbA== 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=hpU0cSThGl8ak0x5kospVQerR+Ul788zCbqnp0/6I+c=; b=L8wNnNaTNpzW1IgCM7Y3zeuStBgjfXqq9ZcNRGqXJMh3af5mWkODapqTZJ7ihO8kN9 PB6Y8WqfWUhU5AISjsnf2FIhNNMPAx16uVLrQ5fDO167jTqyA0lop2dHZvpaE/bfcTqf lPtT36q2Nymh3S4Qm5p4YsFz+utqB+qhF5XU00Ad23p3WWoyKqgS2CgjNz2TEER21KY0 +FAQ22YlfNJYvXVQPhXw96b4E8LuyyQEsaCBCUBXow2dcwAZKRoOPKwpHSsH8qlOW+0h MEy9Snld51ZrDkmLT2wM1roa55XR7yDy9+u23bCYVWu68n2zhvcVmnA4M18I4FTPtQ4C psYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aAIafX+3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz16si9379421ejb.586.2021.03.27.09.39.51; Sat, 27 Mar 2021 09:40:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aAIafX+3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230210AbhC0QgR (ORCPT + 99 others); Sat, 27 Mar 2021 12:36:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbhC0Qf4 (ORCPT ); Sat, 27 Mar 2021 12:35:56 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0E0EC0613B2; Sat, 27 Mar 2021 09:35:56 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id x26so7034782pfn.0; Sat, 27 Mar 2021 09:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hpU0cSThGl8ak0x5kospVQerR+Ul788zCbqnp0/6I+c=; b=aAIafX+3F07ro8pDEOUANecTxrCEhvl0vFrE5guVccFbk55Sqb4lRgzPBogBF2G0ND hbXPTCit+hfY9lqtm3+wFAnUlrZ6+CiQLEdyJSZgCkHBq26/xhDbztwUurO9AiUgpTb5 13tgXWyWb5WOrr/bNlKhcO6dAC2Juch2vxvkJDAlzjgfS+6ryj2TOymBTfaPwboRSdK5 RfJn+xZa/0wGDD5f2/KneytDKQe57xXP+LKVaNWhB58Hmfi6mDCInKcRBEiVXrJbNR8E VKAmG3ZvEW444Q3Rydo5QjfrXwL6BXYawnztdSpKC5mUpFbhuOqWhUTkquso8eAVoieM cf8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hpU0cSThGl8ak0x5kospVQerR+Ul788zCbqnp0/6I+c=; b=UBVf7KPN67x55gQt3l/axcUyli/3qad9EYZSYzEJP41lreCVq+9Ofrca2ELRjDzOLU N/hcK0rGHmUe/71qvAO09p9c+iuqtLP5Xj+fafbGnLSicYBa+QE0L8oDtA78+xsVmtuo uDa5NHN8osKte3smiZLC0wKySlccOMCyKKlfdG/NO7yu/lOCVIP4khD2ukWl/eKloTlm 89y+VxnAI4ARBuaOkgbcwcMLcWfHL64xDXRrlMRiZ1sNFvio3s1oC0ajP68qTXRUMGr6 7qGZQIQvI0ZcgyCQQXPlx86n+dxcAUcxYiazmRBaxGr2/pqlO9u/Ui0LZRJ5S/NwhSb+ FsOQ== X-Gm-Message-State: AOAM532UQmMbIiP2lMHZEduvBquQ1G2wFEQ0hZpbkC6In8BjY/thQxAu cMpBFnzaa8Q73FGYs+jTdTi2r/vCn+gTfpgkoWzX7ivL3bUJYQ== X-Received: by 2002:a62:528e:0:b029:1f5:c5ee:a487 with SMTP id g136-20020a62528e0000b02901f5c5eea487mr17643531pfb.7.1616862956224; Sat, 27 Mar 2021 09:35:56 -0700 (PDT) MIME-Version: 1.0 References: <4c259d34b5943bf384fd3cb0d98eccf798a34f0f.1615038553.git.syednwaris@gmail.com> In-Reply-To: From: Andy Shevchenko Date: Sat, 27 Mar 2021 18:35:40 +0200 Message-ID: Subject: Re: [PATCH v3 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value To: William Breathitt Gray Cc: Syed Nayyar Waris , Bartosz Golaszewski , Andy Shevchenko , Michal Simek , Arnd Bergmann , Robert Richter , Linus Walleij , Masahiro Yamada , Andrew Morton , "Zhang, Rui" , Daniel Lezcano , Amit Kucheria , Linux-Arch , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , linux-arm Mailing List , Linux PM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 27, 2021 at 2:02 PM William Breathitt Gray wrote: > On Sat, Mar 27, 2021 at 09:29:26AM +0200, Andy Shevchenko wrote: > > On Saturday, March 27, 2021, Syed Nayyar Waris wrote: > > > On Fri, Mar 26, 2021 at 11:32 PM Andy Shevchenko > > > wrote: > > > > On Sat, Mar 6, 2021 at 4:08 PM Syed Nayyar Waris > > > wrote: > > > > > > > > > + bitmap_set_value(old, 64, state[0], 32, 0); > > > > > + bitmap_set_value(old, 64, state[1], 32, 32); > > > > > > > > Isn't it effectively bitnap_from_arr32() ? > > > > > > > > > + bitmap_set_value(new, 64, state[0], 32, 0); > > > > > + bitmap_set_value(new, 64, state[1], 32, 32); > > > > > > > > Ditto. > > > With bitmap_set_value() we are also specifying the offset (or start) > > > position too. so that the remainder of the array remains unaffected. I > > > think it would not be feasible to use bitmap_from/to_arr32() here. > > > > > > You have hard coded start and nbits parameters to 32. How is it not the > > same? > > Would these four lines become something like this: > > bitmap_from_arr32(old, state, 64); > ... > bitmap_from_arr32(new, state, 64); This is my understanding, but I might miss something. I mean driver specifics that make my proposal incorrect. -- With Best Regards, Andy Shevchenko