Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp4352731rwp; Sun, 16 Jul 2023 00:49:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlFUg35Rxr32/G3hYvH9TSPbFlxW9jVzfGnMsJLQyleL1puZa0nLJi5t8lGp/zZom8dncB0B X-Received: by 2002:a17:90b:3c84:b0:262:e6a9:bf1 with SMTP id pv4-20020a17090b3c8400b00262e6a90bf1mr3598322pjb.1.1689493775048; Sun, 16 Jul 2023 00:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689493775; cv=none; d=google.com; s=arc-20160816; b=azZK6rI7d3A4RZ719C36HCI2jANYd6nCNbFznUoBzlCaIXzc/7UrNw7zoV7wAmKHSr jSOIaIrPJG/qka+Fesw+wzAeSFGr7BXvA27kl1EjE+576+5p86ZOwiSBywBArd/Dp8cD SKdS3IbHNHuT1+C6xPm5bt878zCsKCjOQnQfIBGeGVHwO+b86oJccvq3YXVmuMKWRGoG Dk/kfOhC0cAmGNpqOsR/HPfnH3tu5CAiO4+VfjvdnVww7rt96CYmwPN0OWcqH9vtBKuN 7aa/rg1wYoc9rUBV6hRt2wioCFUorRunRAQXuRc0WdpFtFpLmobtkayYjBDype14Iq/x bwqw== 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=rGyQgy1tt1PDmgJTMhtwwTX/XIugZRQbuHruVB84HcQ=; fh=oZhaJJWnTpvIKf+2uKcteGINCgKUgq9VGljfc4WWmu8=; b=K+1/IOx3fG5Y1chUy/jOpTxhjtoGxFNe18WK2IWY0FKE5aYoMwOs1Grha6J6XjxG2D xiAjbEVkvjzeErh6WaSrp38cTv5+2b6G915g638KlXhvLGB3eC3oI+oJFZ6aB2F0bo9Y jnRIqWZeqM9sQ0cRV2vM48+NbUWDBAPMq6LmERQuCRcpiNHN/3cMyJQF8IsSBt0PPp0M sEysNbsR3tOrNYTbhOe1cTSegG2fid+CC/mRe636CmVXS4Dj4Ri6Qv9a3I45nV9XEBzK v5cpgFhU0+5Ahq3/CBplf7Qo/hdQWwCwyYkEFXWs1vPtH1KkzCzkTkjHwZ9I+Rx9aNag ojrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CGsnTkxb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id me11-20020a17090b17cb00b00262e49c31c2si4296865pjb.28.2023.07.16.00.49.21; Sun, 16 Jul 2023 00:49:35 -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=@linaro.org header.s=google header.b=CGsnTkxb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229450AbjGPHmz (ORCPT + 99 others); Sun, 16 Jul 2023 03:42:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjGPHmy (ORCPT ); Sun, 16 Jul 2023 03:42:54 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ACAA184 for ; Sun, 16 Jul 2023 00:42:52 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id 3f1490d57ef6-caf3a97aa3dso3666945276.1 for ; Sun, 16 Jul 2023 00:42:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689493372; x=1692085372; 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=rGyQgy1tt1PDmgJTMhtwwTX/XIugZRQbuHruVB84HcQ=; b=CGsnTkxbqszhuNrcGYQ9Op7fDz9S4b26u1cpKXOssfX25p6PhYy+r+iQ0cJQ94EV1p EnG2cepNfG7Mp+4strlI9XDsXNUArR/xFaA2ECSCdb9Qv1oANkIhsZkNdWNEhfInxaaG T7btLQ0Lud9dgTvP530VuSj+ZIiska6fXAzzVuUdGqAViyqrtTH7Lwp/YMtNuEbAksRY ufVjlfvYw9idpRdjAQ11o3PSGbgmJD0Tmh+bxJk1GH6cK5ifURCPI0eCVQS7Mnl5WKKW rCumTa9Fvbm4Kqg7edj5apnu9o3P8f4YIdt3tvQ36S4hOlwi0Q7rFwiVeIe9ztYrWRcR RQRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689493372; x=1692085372; 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=rGyQgy1tt1PDmgJTMhtwwTX/XIugZRQbuHruVB84HcQ=; b=RLCWNNNXNr/+KdjFvh3EV6SDYXhC0yOfdr18VMiYiT3fJZdxHtcOIQ80SY7u3/nFZP xuZDTYoCUsFQRLF0bQ3lbinmhdc39Hiv/XPJu5BYcbHxf6bkvP+CfnRnRqOtoE522QeF flJ9QF8+LpmrRpEriZ/2VfXWRy2NGy4oQkhZ1g3BDuzdwmuAig+BJ0SD9Jp/u5IWk7Zo Pmjh26tsL3OgAljjesAyIkS9xn7n7ePoMWJVChNOqwjZiKUTeaeYFpMyEfrdWoX0ideC 65M29lm0gUbCitYQ/ctjSlBHkrXuswLfV7EqSScVAZRkrMlpZuTfS4sSdR3uVaIC6qMq y1wg== X-Gm-Message-State: ABy/qLbvINVU7ChmYEfEUSB+FUTJoHM09Q5Asku0vWZFeF0V25teC3g5 ur0gYg8z9ekbeidtV5VKPU21++k3s+hxmdlF4r4PRBiLSS4E3gugkaQ= X-Received: by 2002:a0d:ca91:0:b0:56f:ff55:2b7d with SMTP id m139-20020a0dca91000000b0056fff552b7dmr11520910ywd.17.1689493371826; Sun, 16 Jul 2023 00:42:51 -0700 (PDT) MIME-Version: 1.0 References: <20230306211237.14876-1-asmaa@nvidia.com> In-Reply-To: <20230306211237.14876-1-asmaa@nvidia.com> From: Linus Walleij Date: Sun, 16 Jul 2023 09:42:40 +0200 Message-ID: Subject: Re: [PATCH v4] gpio: mmio: handle "ngpios" properly in bgpio_init() To: Asmaa Mnebhi Cc: andy.shevchenko@gmail.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,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, Mar 6, 2023 at 10:12=E2=80=AFPM Asmaa Mnebhi wro= te: > 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: Linus Walleij Yours, Linus Walleij