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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12D92C433F5 for ; Wed, 15 Dec 2021 22:46:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=hvbI6g0idgFoHtaDH5Pg3US1w72b+nD3DORHSC5gxMg=; b=SltO0VTwoyJy5v+PwPt7ak79Ma ci1ti607u9DhotJJ9h79vAktQC+0uZ0yDZHB3z4lclOSiLAjM05N5TxUnTJfWfUnqQHsjpdMsGFuE b3lt3SVNbfHfuWOb/enDs+MvN0U7cLKLk+w8el03lPUJDVI32SPW5cS55tKJEdIqWmcAZAv6Jl7kQ XsukEb2R9kZvXx6OPaFpE3TLm1y3G0czy53WEk5UySgh31vkrUhHrpQ5NXqWkSmCcnEsDzmIX9lr5 f7Cyj1KQ66gQJLIZZpHTsBkz1Ln0EUyF0nyNKnrp3eBQYUMy7bW8GOF4hfL2GthqZhZnQZsS6MYSh UkXCGVMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxd15-002zpj-5n; Wed, 15 Dec 2021 22:44:55 +0000 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxd11-002zpD-AC for linux-arm-kernel@lists.infradead.org; Wed, 15 Dec 2021 22:44:52 +0000 Received: by mail-pj1-x1035.google.com with SMTP id c22-20020a17090a109600b001b101f02dd1so555782pja.5 for ; Wed, 15 Dec 2021 14:44:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=q4UzIW8jjvFD9MXINw3scaTFcXx6xR/65YR9cdnFtJo=; b=GRvMIyxPRNtzcsDe+NtBBO75NgVay7h53HFPf4w2DZlAi3j7BLj0C70kazfWyuEnvc EoaCcARXjgg5shU0sINC0XHVzUYI0vb1o2Y2NLPhftGaVJ5CZ5wgMRBejV/weSMiWoSE t9wede+K3DTlqIk8wWGoxqRZx2Iuc10WuVivY8wUcHKnjQc5QDzlIu+Qb/Gr2T9ZRoV7 jjaYxvovtV5ZRZueO2jqKLsPWxTfGc08s9241YCRRI+0VonkuzovIJV1dlwL8xJlxdSK OAlrbJeowkCY7Nn6N3TPkoicsxGnFTt3+khhBFSX0YVw3qfLIrX9oM4njvPI/wGMRZYq EDBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=q4UzIW8jjvFD9MXINw3scaTFcXx6xR/65YR9cdnFtJo=; b=FDABY4IF4UOzeJjFUlnQxBNMgLRLkKuq1BbscRKCxWfaBU0u7YCs7yd5eAUTvrgyla WI3PA/7SW8livKpKBfBlizWbcKzb69bim2Ztbq+n1+6SN8w+M181HDgNhQzoJjfzeh1l MQYMYUhaSKKRi2DB7ILJoOmQl9AjvCRU5T6xJnXGsBPzeH9M89soR2Jfico9x7j6DOt0 tbFIIosIC8+QDCgloO/o6JeIHabXXsca5Hf0VL9R+t5jVO6vvTEtd1e3gzsFIx+ebpS6 ad83sWQeb8qKL26HbPr7zerKq8YVP5XeAjR2JHm8rw/RZjosaXscm3EaS7IEwNbwWqUj iyug== X-Gm-Message-State: AOAM5335R6C69uGhEg1tz0DtM2uUy3r/qanwZACvFWhCMl0PcfxbxKJk LyZsGUrbD2iQA0TglntqFu4= X-Google-Smtp-Source: ABdhPJyRVECjLwh6/a45lJzjdGytwuXKsisg0bwzAmdfjZcJlw9+DYfpVIVT8BpO3Rci6hyEqq1aSA== X-Received: by 2002:a17:902:6b8c:b0:148:8a86:a01c with SMTP id p12-20020a1709026b8c00b001488a86a01cmr13270930plk.50.1639608290506; Wed, 15 Dec 2021 14:44:50 -0800 (PST) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id l2sm3797362pfc.42.2021.12.15.14.44.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Dec 2021 14:44:49 -0800 (PST) Subject: Re: [PATCH] arm64: dts: qcom: ipq6018: Fix gpio-ranges property To: Baruch Siach , Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Sricharan R References: <8a744cfd96aff5754bfdcf7298d208ddca5b319a.1638862030.git.baruch@tkos.co.il> From: Florian Fainelli Message-ID: <281f0532-2f3b-362a-5df6-d9cbe302606a@gmail.com> Date: Wed, 15 Dec 2021 14:44:48 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <8a744cfd96aff5754bfdcf7298d208ddca5b319a.1638862030.git.baruch@tkos.co.il> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211215_144451_453429_82FCD765 X-CRM114-Status: GOOD ( 25.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 12/6/21 11:27 PM, Baruch Siach wrote: > There must be three parameters in gpio-ranges property. Fixes this not > very helpful error message: > > OF: /soc/pinctrl@1000000: (null) = 3 found 3 > > Fixes: 1e8277854b49 ("arm64: dts: Add ipq6018 SoC and CP01 board support") > Cc: Sricharan R > Signed-off-by: Baruch Siach > --- > > The error message was improved in commit af3be70a321 ("of: Improve > of_phandle_iterator_next() error message"), but there is evidently some > more room for improvement. As I don't really understand the code, I > added the commit author and the DT list to Cc. In the commit message you find what the error message was and then became which tells you which property was used to determine the cell size, and what count was obtained instead. In your particular case here however, since the proper was with the 'gpio-ranges' property and there is no property that indicates the cell size AFAICT, it might been more helpful to revert back to the old message maybe? So maybe something like which is hopefully the best of both worlds: diff --git a/drivers/of/base.c b/drivers/of/base.c index 372a177f3b80..63bff37bf035 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1378,9 +1378,13 @@ int of_phandle_iterator_next(struct of_phandle_iterator *it) * property data length */ if (it->cur + count > it->list_end) { - pr_err("%pOF: %s = %d found %d\n", - it->parent, it->cells_name, - count, it->cell_count); + if (it->cells_name) + pr_err("%pOF: %s = %d found %d\n", + it->parent, it->cells_name, + count, it->cell_count); + else + pr_err("%pOF: arguments longer than property\n", + it->parent); goto err; } } > --- > arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi > index 6a22bb5f42f4..a717fc17523d 100644 > --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi > +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi > @@ -220,7 +220,7 @@ tlmm: pinctrl@1000000 { > interrupts = ; > gpio-controller; > #gpio-cells = <2>; > - gpio-ranges = <&tlmm 0 80>; > + gpio-ranges = <&tlmm 0 0 80>; > interrupt-controller; > #interrupt-cells = <2>; > > -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel