Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7198493rwp; Tue, 18 Jul 2023 11:28:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlFSwmLsjEyWkBQo/807Z+Vf8aMPnyA83QXw5q2rXxSR4gGadf6m357nBhXBPn+H8g3gBmYZ X-Received: by 2002:aa7:df8a:0:b0:51e:28eb:30c6 with SMTP id b10-20020aa7df8a000000b0051e28eb30c6mr594055edy.34.1689704912743; Tue, 18 Jul 2023 11:28:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689704912; cv=none; d=google.com; s=arc-20160816; b=HRyTNida5qATHKd6eZSQUgEEdUEJ8pG0OJNmaOT0Xivno6+aVZw3kDGUVPAT3XWtBp U1nrbrhP4EF2ERX338X6e6/u2vcpMp2Fom81n3pFWcJUs6/yHerddzy3BNRQZiK6HV3X nIseDDcOyeIIXL29tmdrruv5+c8wJ8iRkXI4F+BTq5BiEsA4ZyxgoVm4hY6HvzeAAWA+ uOobjfsw3Pfb8jKSX4rfphGPX9rWH/az1k1SBIduz8+UN4Tcy9qsoKLUZJsgz9Xp2E7I 3A3afwFQe5aQvnqi5F/VGdyYEawAdKDuTHp63Md+llwaIZ/iDs42AaEBzs5iPT9KVUe5 HExg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=PHoshmM+VxwXRx5Tjz92hKdcnwt2Qr7T9UogtdInLdU=; fh=qMLhzbCj+MuHNAuZBv13nqcV6DzlFj1VEnwcUsQwdag=; b=oYVi5MsMt/UrQIcTyEB15UkkqRzMth8UOpJsPM9gNPhxhnew6vURsu0cC4MQVFo+wC KPyTM/pc1q1DKx7G5h9Bzt4M147PqyECehjVwmraPN0SIv+UDsLRJUXgkk+wN7iWEh2x kxiOuNNNJDoar8IbD4MNy2CSs4tQRWdLF8xVWdoAIYy/TRxupQBMh1B3FA0kOzzUupk9 O9PFRGtwUflfYUdg40i6+ymbllrNm0lJtM/aL/Glsg0avmHqhIUF6fsbPXsnu9WGyy+8 rzlrKeokIcDUSiJ7PZPxC/6eLVgvEB0JELbVmKu/9idDKlXlMTYrkYUdIXv/xfRI5Xhh IY7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=r6hSi27s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n20-20020a05640204d400b0051df225e708si1599739edw.46.2023.07.18.11.28.09; Tue, 18 Jul 2023 11:28:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=r6hSi27s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229449AbjGRSSp (ORCPT + 99 others); Tue, 18 Jul 2023 14:18:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbjGRSSo (ORCPT ); Tue, 18 Jul 2023 14:18:44 -0400 Received: from mail-ua1-x936.google.com (mail-ua1-x936.google.com [IPv6:2607:f8b0:4864:20::936]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1992B6 for ; Tue, 18 Jul 2023 11:18:42 -0700 (PDT) Received: by mail-ua1-x936.google.com with SMTP id a1e0cc1a2514c-799b3a301b0so617468241.3 for ; Tue, 18 Jul 2023 11:18:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1689704322; x=1692296322; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PHoshmM+VxwXRx5Tjz92hKdcnwt2Qr7T9UogtdInLdU=; b=r6hSi27sXLci817+wmdk010XKYb6lADLAiz5gjiw7F4GKBOeEosr05r9bA4R3tYJn3 upXcyy0CqBhobmzzximzdpDGtFCdKEI6xKIMrNgz7D31KHmo+C8XyrbY2fms+1RmMQLK Jpa22+iIVdtueJtpBFu9SauiRRmvbZaniJ4t5tBRo2q2YUA/yKhrVfN9UFQeEOqt73Em n9ZMdv3DmQ1Qk3DMXVLZO3Asqm8TrU4SCrGL/WhrR1fJ46cx0/+msmUrX4Niac5q/+BQ d0k1+ILpBga5s2SIeT1Eyy2oHgvNMeUb54LZo68PkgQRClzm3n7maYtK7N63f42EyyN+ IG0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689704322; x=1692296322; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PHoshmM+VxwXRx5Tjz92hKdcnwt2Qr7T9UogtdInLdU=; b=LajByyozDPbvHlwzW83xEGAmKSvLMa9fPWhorgi1cvn/Kq2FCoCq0QTFiPk7FyYf9g GQKl+D/QAWmO5I/bKbqaJa9oLUa7XBg6LnKXPjYzGOH2vqPpWamiDgQc2XntFwr6ZDGP w92s4dQc+Zf2kLnXZlhpgJCEug7XjC3E6aLXt0MEVMSOgXIhQk3oZBkVTTg3BRijPEy5 oTL/ViXPmMlkKRVE93d2teWzwhifBPESpN/pYoYJHGY/+j9xSsDKN7knQBN5L22E6PAI XR9bKwMTb5l5BM7yrMYVaNFANZT66rRxYfpC8R2y7WVnZi40CeQvOlDs0tOWvgTettkv 0vEg== X-Gm-Message-State: ABy/qLaYDDYiRbc+LOAK4IDvVoH3fI0O8p6Yo7VT9laSgpZ6Kq6FDCHU 3brwGDvhsePK8z1m4WFtiR6xEVNHYSF4lfzrX4NY5g== X-Received: by 2002:a67:fac5:0:b0:445:bd5:5293 with SMTP id g5-20020a67fac5000000b004450bd55293mr71566vsq.30.1689704321912; Tue, 18 Jul 2023 11:18:41 -0700 (PDT) MIME-Version: 1.0 References: <20230710214910.31892-1-asmaa@nvidia.com> In-Reply-To: <20230710214910.31892-1-asmaa@nvidia.com> From: Bartosz Golaszewski Date: Tue, 18 Jul 2023 20:18:31 +0200 Message-ID: Subject: Re: [PATCH v5] gpio: mmio: handle "ngpios" properly in bgpio_init() To: Asmaa Mnebhi Cc: andy.shevchenko@gmail.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, davthompson@nvidia.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 10, 2023 at 11:49=E2=80=AFPM Asmaa Mnebhi wr= ote: > > bgpio_init() uses "sz" argument to populate ngpio, which is not > accurate. Instead, read the "ngpios" property from the DT and if it > doesn't exist, use the "sz" argument. With this change, drivers no > longer need to overwrite the ngpio variable after calling bgpio_init(). > > Signed-off-by: Asmaa Mnebhi > Reviewed-by: Andy Shevchenko > --- Applied, thanks! Bart