Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp529581ybt; Wed, 24 Jun 2020 05:18:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTJlDnA0cCzAmSDLS5lwsqq/ieGu+gbskPu/n590OJzKVsTLojiWTWgzDMrNNlgYHqzBks X-Received: by 2002:a17:906:5e05:: with SMTP id n5mr24455443eju.278.1593001130736; Wed, 24 Jun 2020 05:18:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593001130; cv=none; d=google.com; s=arc-20160816; b=MFQg88JKw1DNyzIPY0sZ1oLXjrWjRE6suALTxN1jPypYmyKEJ9TVyUOH3jpaKQwQUE UMrnRSzBEkm+eghskufH9JYGpTGJ7YbDcBs72lUk0F3XNhtdVLwvvkIkq17VqGofVAU0 J1NHmSxxCAx3IN3kyUWfXgMWXUH+4o6UhhJ7sCW27wfCPwXP25PdSHv9oCNMHLgu7dcj l8PSqGEgnwryfo6MeVoDiWSI7njhHE5rB189/ko9A/f6cdOpSpUtr9bU8ljmtx6ESf4l kYnigpTJIzczyVLEhG6hiwzW87pMPBxRuNsGfXz4wTCXC525ajcBGOMlIORKMfNoCk4V wU4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=b2OqfNiPleZIbmb7TmwrT/wLfhv0B6VNDBgxLf+fGcw=; b=z6J8y4wKA9qABbqfGeD4gfi+4W7adZtqDqJcDwjJExSG4dQWVl6r1b27g5jTvlg6in LLEYjmgyE07tcB5siDaG7zj1zrf0deWD7ye4CqgZPeHICiyLGX44Ly9Tn+gcyrvPz37o JL4Z5wPYHQnU/jrw0/Thi8VmJyvzBhTwkC1bybp/8J7ap2E6bMD3EZVViHGMEITRasuK dYOs7iKnsieeE3EaGPqqtug/PQl+dl8NeovoT5bk5n8Kz5MPUXw3xZk3AIyLDC46LE1c y6fs9hHjrGXlPO6A2rLyI7QIwMFzvnUteiJNhxIAqYqSwAPK9XvmwytfLH+IOfIO+dgf 3+0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=wDgnINvc; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u8si13367863edp.357.2020.06.24.05.18.27; Wed, 24 Jun 2020 05:18:50 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=wDgnINvc; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389907AbgFXMQP (ORCPT + 99 others); Wed, 24 Jun 2020 08:16:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388296AbgFXMQO (ORCPT ); Wed, 24 Jun 2020 08:16:14 -0400 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79C3FC061573 for ; Wed, 24 Jun 2020 05:16:14 -0700 (PDT) Received: by mail-qt1-x843.google.com with SMTP id j10so1422001qtq.11 for ; Wed, 24 Jun 2020 05:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=b2OqfNiPleZIbmb7TmwrT/wLfhv0B6VNDBgxLf+fGcw=; b=wDgnINvcsTBFswtUyZD+fNQOqoBt3GJeRE73tzdf2M8n16m1WwfoJKAC+WdGOu9k0C UTkvqhR/NFUp/luzs3XG0B809/B1PzozvO39+egk5K6Ig9iBdsGZHqQqMrOpRv8XMzhP OTMCWBkWWH8OpoSsfBlEcRixDpwG1SIPWkUW+Tk3sFk5WwUkOq4/uqg/JLdCbCMUnMTa mUo+om5kwRdP7bOpquXz3bWIY+dgGVsmFwCjy2ZXDnMeuW2kPG7WLQcigbsL21q0BQSe EWFbU3nX6pGIVaPXoJV70AbExK9ZahDVr4p75gdmgVujT8oy06iXsBVhY7oVLsGX/JHc sXcA== 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:content-transfer-encoding; bh=b2OqfNiPleZIbmb7TmwrT/wLfhv0B6VNDBgxLf+fGcw=; b=smGwR5z+Z9ZDKN62ZZXdLpzHR/gicu/A5xraz9tJJDGgDu8ObaLtssd3FrI6OAmynL 19z0CCpnQLRBJcRTNVjC2uCjecydHnuRY7QpTwqkvhR+KpDyH2PFs9pKaAtNAb2DoC2I 7CfA1mTWwtN3bWzhi2vrPmzdD5j826BViZ89P1WXIb8FHYqoR2wUn4ANx00WwsMnCRZa g4pee7OCzwAb78VLiTQG8nivhw0UQc8cex/J9aQiV0/wIDa5qPzwBbfSGB7a7mPSlLVz QpY+aKtM6RL5R+hE0qNp0gyuelEn46gw7eZx81NkUbNbnrLhG5Kc1mu/ipPP89sGMY4s qDVA== X-Gm-Message-State: AOAM5330XIJY3MFVxNSkxWcJ10HWX65MvsSKkXxl+o5CMkBjIGFR6MGl eLHRu/YtHuRlrxW9wJpIqt5q5vlgPhS2UaevhhPmCQ== X-Received: by 2002:ac8:134a:: with SMTP id f10mr18680640qtj.131.1593000973743; Wed, 24 Jun 2020 05:16:13 -0700 (PDT) MIME-Version: 1.0 References: <20200623145748.28877-1-geert+renesas@glider.be> <20200623145748.28877-3-geert+renesas@glider.be> In-Reply-To: <20200623145748.28877-3-geert+renesas@glider.be> From: Bartosz Golaszewski Date: Wed, 24 Jun 2020 14:16:03 +0200 Message-ID: Subject: Re: [PATCH 2/2] gpio: aggregator: Use bitmap_parselist() for parsing GPIO offsets To: Geert Uytterhoeven Cc: Linus Walleij , Andy Shevchenko , linux-gpio , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wt., 23 cze 2020 o 16:57 Geert Uytterhoeven napisa=C5=82(a): > > Replace the custom code to parse GPIO offsets and/or GPIO offset ranges > by a call to bitmap_parselist(), and an iteration over the returned bit > mask. > > This should have no impact on the format of the configuration parameters > written to the "new_device" virtual file in sysfs. > > Suggested-by: Andy Shevchenko > Signed-off-by: Geert Uytterhoeven > --- > I'm not super happy with the mask[] array, which is on the stack. > But there is no real limit on the number of GPIO lines provided by a > single gpiochip, except for the global ARCH_NR_GPIOS. Why not allocate it with bitmap_zalloc() then? Bart