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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 4718AC433DB for ; Sun, 27 Dec 2020 21:30:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 12403207AE for ; Sun, 27 Dec 2020 21:30:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726300AbgL0Vab (ORCPT ); Sun, 27 Dec 2020 16:30:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726279AbgL0Vab (ORCPT ); Sun, 27 Dec 2020 16:30:31 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FE12C061796 for ; Sun, 27 Dec 2020 13:29:50 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id a12so20082351lfl.6 for ; Sun, 27 Dec 2020 13:29:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aTYaA/nk5rfxrjXMV9Zf6ReLTziBhlVMG7XuAP4a5t8=; b=J5P/Mg6E+/zhNhboLMKs7TkvDI8fqb3RuPdLB32RXXdwcNDIxDI4ZMJOSn9kRMH9lW ATXSxQ/SO/FjGNfp0QsladSzDjqr3DQNInBQVPqZS425ZN3oUKTQ9q81JC9myq8QwDjC VtGxnyk1K3UWqL/6404Pwzfo63D2GgFwveeSVLJDGM0JOLFsevJ+RxyCR7d3PG4+1jW1 sEIRYVN7tF1MrzwdqMAIDjxjjIer4iGJRe2e64tX9thJGwq/ON7x3wZworJjitibqlhF 8zamHCdpNihGp/GuPEnBR18p4qV7DhcDJ0Zz1a0W5av7mMR1X4itMiaHF2iHkdADS1jM vHQw== 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=aTYaA/nk5rfxrjXMV9Zf6ReLTziBhlVMG7XuAP4a5t8=; b=M65L4O3+lnAHkfxuv862k+WhrktEVFAOHlIvMGqo1wBMd48R9fsrEnc4VkpCPdTTNH rrtUqUt64ynqTGkYo61uzj23y2+0l8yQhWke/JOnFVPV2vcwSHUnkcF6cSX3QElxW4IQ N2Wr8EoVFadSGvQTNOGWSPpVMqr6oux7kIU/9fVAdGzEwE6dk/6yvyESJJNQPlcYMuqN FW6EOdKUCuut2r8lnTAgk9egc+0Ka83YUP9gNPYJFhPvRc5LyPpVLHo8jmoGlxzZ1PaI VZRXJpy3rilvRFdMQrTrt3YwWN0qNnE776okCWp9ck4EY7EUagS7/RDE27y7+q6rbje7 3b7A== X-Gm-Message-State: AOAM533l88/UTq2nX8Np3c1oHd1oKYgTfh0ZaS0opAUvCGpWEM3EwF5d g6eC5zMqAuDGdpylkkqQh32pgGKhEYc+ZNfJ7rX2IQ== X-Google-Smtp-Source: ABdhPJzfNx7tIi9SglDZF+Sx/celS+gTLPOTG/bEsMRx3N0BRYld6DtNve2/EtSdisYCC1sdSk4eVBjU0GqHRFyReNM= X-Received: by 2002:a2e:b047:: with SMTP id d7mr19629137ljl.467.1609104589062; Sun, 27 Dec 2020 13:29:49 -0800 (PST) MIME-Version: 1.0 References: <5041c8cfc423f046ca9cf4f8f0a8bd03552ab6ea.1608963095.git.syednwaris@gmail.com> In-Reply-To: <5041c8cfc423f046ca9cf4f8f0a8bd03552ab6ea.1608963095.git.syednwaris@gmail.com> From: Linus Walleij Date: Sun, 27 Dec 2020 22:29:38 +0100 Message-ID: Subject: Re: [PATCH 4/5] gpio: xilinx: Utilize generic bitmap_get_value and _set_value To: Syed Nayyar Waris Cc: Andy Shevchenko , William Breathitt Gray , Michal Simek , Arnd Bergmann , Robert Richter , Bartosz Golaszewski , Masahiro Yamada , Andrew Morton , Zhang Rui , Daniel Lezcano , "(Exiting) Amit Kucheria" , Linux-Arch , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Linux ARM , Linux PM list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Sat, Dec 26, 2020 at 7:44 AM 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. > > Cc: William Breathitt Gray > Cc: Bartosz Golaszewski > Cc: Michal Simek > Signed-off-by: Syed Nayyar Waris (...) > +#include <../drivers/gpio/clump_bits.h> What is this? Isn't a simple #include "clump_bits.h" enough? We need an ACK from the Xilinx people that they think this actually improves the readability and maintainability of their driver. Yours, Linus Walleij