Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1167272pxf; Fri, 2 Apr 2021 03:10:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqGi7tIotD3hO3bHTMc558wR/EEZuCENG2GNJVoitJa+AWCZY/diZ0ldhdpZUzj5PaDXk1 X-Received: by 2002:aa7:c14a:: with SMTP id r10mr14071344edp.132.1617358245150; Fri, 02 Apr 2021 03:10:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358245; cv=none; d=google.com; s=arc-20160816; b=JJzfaL1hZA7iF/i9a7nvkbAaTCMebQA3v8hDW928FEpCaCUUS5G4jiIBl5hf0Rs9dU XCqeVat/kcVnkgxDtOviWgMrwcYGM5iojnCOE1L6hAAqGZ+k7MlkBrdE8Hnd4X+m6ZVx GfHo6alUP9gKwCs6aen+B6mnjLtyJrzS95JHlwP32MciD8zkKemZEBHr7ktxsnR3Xsy1 9a3tBKwfiDccNVb8yrO4Hd5ZWLY0xunSMBybSq61po1blSyFsEJM7+uhXD5oYU2v1HJc S6I0h6VWurV5g5hn7Vj/Ffo6y5+yyYlcrkEX5uxfVE3qQgPhHoBbVXfiiFtqFNh6RGqk xB7A== 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=SeOEv4eerfZMMN9wbPTmtUV41hsInB/cRaOxivaSmYg=; b=xbs0/khQQtsbfVc1pEi+AHRF6eMuoY4jYjZjjRwjWcu21cgwIdl42Wvtri7XC8zKvA MFRlRpKpOQomF1MHm2qFJGZ04xWy5dByfPeoG2YdkDHND8BgfxcqRXnXXOkk2PDdyNQC 9eHuQPnUWeUjTFcoZODL1sLJJFo5XFEiHv0ivGL1hFZUwoITFXLOO1RPRSG4NKFT6kHF O0edzhCCJbVhMtmoSJknPAVRWtvn6VEfwiVjRqMP3ZS984lnTMmFUhsGxPtbJj9jLV/5 BLaQLmmgcOmi8FhBCIQ004dvb+2cUGkXQ4NZg5PGIDfXkOneUc0AnGgklbLLd1p+vw6e Ks5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B0meY3W3; 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 y14si5858662ejw.723.2021.04.02.03.10.10; Fri, 02 Apr 2021 03:10:45 -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=B0meY3W3; 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 S234628AbhDBKHk (ORCPT + 99 others); Fri, 2 Apr 2021 06:07:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234207AbhDBKHj (ORCPT ); Fri, 2 Apr 2021 06:07:39 -0400 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74C98C0613E6; Fri, 2 Apr 2021 03:07:38 -0700 (PDT) Received: by mail-io1-xd30.google.com with SMTP id e186so4892622iof.7; Fri, 02 Apr 2021 03:07:38 -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=SeOEv4eerfZMMN9wbPTmtUV41hsInB/cRaOxivaSmYg=; b=B0meY3W3X5Y8YLebNNl4XcvfgWTq8mBvPURN1m3huvgOzYL1ZxdoeFGBzQ2RX1O2+X Jmx9A8D7rA7yuuLrgmWLz8HRT23m9qJxtCK5dhpHhv59FulYkCJXM6IXl/ymFmntFKNA icV+5K9OD4e/ReICmsl4QrcJA+ipoGVoU1ge/Zh4Z0vcE56hZJbgCaZuQD92WX2aqmLe kjcEWqz3sv1a9PRo6OOtZZJCQ4rxgr1RSbb/U/9JYKqPLtcOBBzDIFUmktOyepk4+E6w Qjd9KqdROlIz5q0DPEd12oMec8tpUuJTxcr3KKEhmLIyr0hGXgmcawD5qUng8F414OTB /LeQ== 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=SeOEv4eerfZMMN9wbPTmtUV41hsInB/cRaOxivaSmYg=; b=lABBA9uwO2voppOvyz5ZyhEKlFabSd1rd5iGHGf4eXdKiHEbQC/by0WyzrIbGje9TP dFGRB/YCR+jIptEoJtcDYChm3IjX2ZhmkQJUDlGZ8BPHUNN5E0VSVtC3wiyLwwKQmt4G dXOMuEmY20TR6DIgxKGWSlTTlsAnK0bx0U1RBPg0+sV2VbS0CpJK3J1VGtVum5TYs6Ox WxH+Pt6wh3jVN7eeTewzV2L5P/CABBKCSM585myBbsJnZpq6q3QG7Aupk8eGqjFQsHIU rRJjiXylrwzaURlGbfSY/jceu46gDRLVPpkBtJaTubM1xnFr+XnClwtIl/spp369VDvz iNUA== X-Gm-Message-State: AOAM532tno637S7LcdgD/iv0Y2U3heARYiMh0RAl4OyH0LpYpMneMcL7 rMi+3QyZ6N7K/U9e3J7PPm/36o/z670w5CTw+so= X-Received: by 2002:a02:c6c4:: with SMTP id r4mr11861455jan.77.1617358057544; Fri, 02 Apr 2021 03:07:37 -0700 (PDT) MIME-Version: 1.0 References: <4c259d34b5943bf384fd3cb0d98eccf798a34f0f.1615038553.git.syednwaris@gmail.com> In-Reply-To: From: Syed Nayyar Waris Date: Fri, 2 Apr 2021 15:37:26 +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 , 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-kernel@vger.kernel.org On Mon, Mar 29, 2021 at 8:54 PM Andy Shevchenko wrote: > > On Sat, Mar 06, 2021 at 07:36:30PM +0530, Syed Nayyar Waris wrote: > > This patch reimplements the xgpio_set_multiple() function in > > drivers/gpio/gpio-xilinx.c to use the new generic functions: > > bitmap_get_value() and bitmap_set_value(). The code is now simpler > > to read and understand. Moreover, instead of looping for each bit > > in xgpio_set_multiple() function, now we can check each channel at > > a time and save cycles. > > ... > > > + u32 *const state = chip->gpio_state; > > Looking at this... What's the point of the const here? > > Am I right that this tells: pointer is a const, while the data underneath > can be modified? Yes you are right and the data underneath can be modified. I have removed the 'const' in v4 > > > + unsigned int *const width = chip->gpio_width; > > Ditto. > > Putting const:s here and there for sake of the const is not good practice. > It makes code harder to read. Okay. > > -- > With Best Regards, > Andy Shevchenko > >