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 X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB2CFC433C1 for ; Fri, 26 Mar 2021 22:13:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E84CA619AE for ; Fri, 26 Mar 2021 22:13:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230180AbhCZWNP (ORCPT ); Fri, 26 Mar 2021 18:13:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230076AbhCZWMu (ORCPT ); Fri, 26 Mar 2021 18:12:50 -0400 Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECBB6C0613B1; Fri, 26 Mar 2021 15:12:49 -0700 (PDT) Received: by mail-il1-x12c.google.com with SMTP id 19so6299970ilj.2; Fri, 26 Mar 2021 15:12:49 -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=VKRu/20dm1kx8lx57omGSjuR80s186bmUyk42/yIwsA=; b=C5tZkbk+9pDwahw0uqoqYov69orWGgkoeSD9AVzTJg+UwqQ2froXblxyfprXV8V1aL 6AgWDxcDS6XWgsV9bq+CHyeNTd4wefqpaQeFniwBTGRW1zY7takF0+/KlBukVR0A439M x0tXjlcOSZ6UTqpob3Ln+ftFg4tXBBM99KwhNFVJ3MabD3DapQVXDrUMxJruF1/iKv66 yaecCNuaDUCXOXNDfFMp61GLhTWdYT8y40NzuBp5JmabyPwZ+15ECuUdZzDhsPsW53MG pTEerwWnx6ahhp43RqYvy29IDKQHbCwp0+Ok43tr6SVXTO6JOJqljpB6IqPtW4Z0HWp0 8KZQ== 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=VKRu/20dm1kx8lx57omGSjuR80s186bmUyk42/yIwsA=; b=FWnlHmFgcRJZV2GghYDpHdVatzM0Y4pzIrRya53BWq83nkBXcvvFSigGG8xGF/RKEq j59wbbBAU2WnCeVM1e/PPClHwXLqLzWh/MEUbRja5U7UqqOAzadINSzvAcBFnTh4xBRP FiH4gG9xcbYaaynMAf7TWCKRbK/Nm4T2BIB+xsmp64ihmiPMjQg06CrrR999K4/Oi9ro jpBJ9z+Zf51iarX9bGvyT5Mvc7oGZhcbljZD63iGffrdq31w48QWUuFjFxew5bL+VwDh wl+haQIEwild0lrcXyhkP5wZH/7hnEFhoBk3RlvXxkPBE8ZbxGxYrORSw3fDPmHlMjmN yVEA== X-Gm-Message-State: AOAM5338q4srXLKqel1gTCGU4YqjHTgUpxgsy5WiEQYHbCZKPikwWicA sBDAXKXpEpnOtzTwYw0dSHvF+iiNKn+VcTgm6f8= X-Google-Smtp-Source: ABdhPJwdl4VGs/tkLkbpXsDNTVJ/2e4MIdPgFV7jnZyb31LofH3vnWHNyCk9SeYav7qDJrki2HQ3NJKEWw3vPqxiPcM= X-Received: by 2002:a05:6e02:20c3:: with SMTP id 3mr11909241ilq.164.1616796769368; Fri, 26 Mar 2021 15:12:49 -0700 (PDT) MIME-Version: 1.0 References: <4c259d34b5943bf384fd3cb0d98eccf798a34f0f.1615038553.git.syednwaris@gmail.com> In-Reply-To: From: Syed Nayyar Waris Date: Sat, 27 Mar 2021 03:42:37 +0530 Message-ID: Subject: Re: [PATCH v3 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value To: Andy Shevchenko Cc: Bartosz Golaszewski , Andy Shevchenko , William Breathitt Gray , 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-gpio@vger.kernel.org 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 Best Regards, > Andy Shevchenko Hi Andy, 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. Regards Syed Nayyar Waris