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 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=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 B5069C433C1 for ; Fri, 26 Mar 2021 22:14:35 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 675D461A26 for ; Fri, 26 Mar 2021 22:14:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 675D461A26 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zTTc9y3A4Ehf5f3syM6cO34ehIfR75lXN+vdFpYhSAU=; b=h3cVnHP5auePKVC3kMna+npci GTwmlgqLK1RtKF/xjYvKW2HDAU97VNJkUnV0iX2r4WJb9w+CRJh4YxzbcE+YIVUHqJmk8epL8Kn5o Vc0I30qE0IXY2+sCX2xiaZhPoMMa+sa6NDu4IKsZ1g0UVRyyhZMeu4lItDFszGqUXsjYZqAwAEZ7l HMpFIW15IHLiey8+AEOszqS6XqUQHiEpfGxc/OHcFGTKQKhCUDpHJcKoHDfltl1aaCQnOMy4iiVdL urkOke2invrHzUGjwB4ckElaLhedVTImxlQiS1Nivo8lx0EeX4hNUyTE+vX5Fswy4fdLZNeD0H6me bVKle4KCw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lPuhQ-004S5S-TG; Fri, 26 Mar 2021 22:13:01 +0000 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lPuhL-004S4y-6c for linux-arm-kernel@lists.infradead.org; Fri, 26 Mar 2021 22:12:57 +0000 Received: by mail-il1-x12a.google.com with SMTP id y17so6273108ila.6 for ; Fri, 26 Mar 2021 15:12:50 -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=q4IXer5TOfdLkA65DDPd0DiSY9pk9EhIwtXv1GnSmY0RgPuBQDCGkVvaCxK14pdcAq RPv9IfliVWMjieRfZK1KvAaWch3gKzTL5K5t4DLBo6pJ496xYCFR0yG86LZ5iSi0eH1b CBNDSplp2cxXRNO+XADlkw+2ygOfxADkOjFEoBQc6ZdiJNQW31pPe7pRFV/MMcBonrQb w8X4gqfE2QgxYpNHCUWIplre8ZwWEhUsNRmS2yvkgl2BGg2KKcJHihRtuI8ATRAqTS7W 2zBnuGQ1vtgcgdlrJ+nBhF8I/nlhPLWYBbhZzGCYlumk53RKsFkmEMq6cljPIUFP3sCv JlJw== X-Gm-Message-State: AOAM530hwABo+Jexyfnpkm1Uc4QSy1RsK4I+fSvvqO2iI/+Qrcm+YH1a 6zlSzbcGS/Vvu7SJMsK3GHqhpATaKNzEIIRqTmU= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210326_221255_557139_691568B9 X-CRM114-Status: GOOD ( 10.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel