Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3637290pxb; Mon, 24 Jan 2022 14:06:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6jTzczxJet/UHQaLlzHm6oBwAnIUyFaS3yJXbBSWItK0fhjfWx39khkPOTzOFYVrIT8Hs X-Received: by 2002:a17:902:e0c4:b0:14a:9ad7:9a02 with SMTP id e4-20020a170902e0c400b0014a9ad79a02mr15708986pla.109.1643061998837; Mon, 24 Jan 2022 14:06:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643061998; cv=none; d=google.com; s=arc-20160816; b=bUveJDfD9COFSyy3tNuVJZgrmUrkvD/gAowXzi/bNOFAX23zVbcyQj2jVHKYp/SwyC T/u+ZGuYqlA2UjIVWGvV8RTfvXE2l6OEG2F7g1V/fXAmW6Nj5B/fJXb89xYQZPKdf9+P KiY0pvm8ynUeHhLgoZvpXvieZgTCjYIKBwqM7kxx+rBDuwm0sJaNYOdzL1+AE7lXURKR ipbQ38JlcW7CZuTvjwG65LRQBHGP+Vq+YJ/lZ6vEScQOYQGDLzWGLjfYRNeCJcuXHY5Q 5DegGNcmDUr6hlrdoO5oR1Xjl1TbmAM9i4mRVL5U26MqHT4/AjR+ZZcv4Tt9sfTFtfXk yUPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qdbbEgw1jqeWu+s0wZK6fLnaqUk8uE9PatvZlPD0+ug=; b=z6xaCzoj84MCFsgrpbQCMDovRT404OjXMG5DPc1W9FAIaThxL8UP05WGH6B0rY5BG0 gR2HS3BMpwg6wGx92Fo9LMepAYzvoepZRk0TrGTTxnAVmYfkfCMmgidD/Mq/TBHb2Py2 sgVeivc5efOnHQi55mAJ6Rc8XWWYvhjNSB0oyKXN109aDgC+sEXca183C1KDRyzR4TgA insEqq7xpJUkY8z6PKD6K9GNK5IWcz/9RF63dVPD5qu6M4sNNh/CHj1tqMErXOqkXGXw 2Ul3uycrIGAJZ4RBkbJkwkuLelI8Nk33OiNbj03lHQ3KTZ7NVLfAlE+L9EuP8kufu0H7 6a0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qFOYP4WE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si13929300pfh.152.2022.01.24.14.06.26; Mon, 24 Jan 2022 14:06:38 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=qFOYP4WE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1575685AbiAXVwP (ORCPT + 99 others); Mon, 24 Jan 2022 16:52:15 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:42788 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1450081AbiAXVTo (ORCPT ); Mon, 24 Jan 2022 16:19:44 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EC9F661469; Mon, 24 Jan 2022 21:19:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9EEBC340E4; Mon, 24 Jan 2022 21:19:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059181; bh=jq3qAwfolb3vJnwEB5So1WRHousxwOrTd3MkQgUiNl0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qFOYP4WEMMAkzzx8m2oqlUi9RN1M4MjMTcH3c72v7edAKVQnbedS49WEZorGf3JPd PES7c2zjuCQ5LNsKp2coKvCgcjlB3m0s4mw0aqxpqy2V6fjHVPxDts1G47TR0RRp3M MRFlbqy6+H84NsVF/rIgjx+t8yutunYVprssKTwY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Florian Fainelli , Baruch Siach , Rob Herring , Sasha Levin Subject: [PATCH 5.16 0530/1039] of: base: Fix phandle argument length mismatch error message Date: Mon, 24 Jan 2022 19:38:39 +0100 Message-Id: <20220124184143.098307142@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Baruch Siach [ Upstream commit 94a4950a4acff39b5847cc1fee4f65e160813493 ] The cell_count field of of_phandle_iterator is the number of cells we expect in the phandle arguments list when cells_name is missing. The error message should show the number of cells we actually see. Fixes: af3be70a3211 ("of: Improve of_phandle_iterator_next() error message") Cc: Florian Fainelli Signed-off-by: Baruch Siach Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/96519ac55be90a63fa44afe01480c30d08535465.1640881913.git.baruch@tkos.co.il Signed-off-by: Sasha Levin --- drivers/of/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 61de453b885cb..81b956ab2348e 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1349,9 +1349,9 @@ 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", + pr_err("%pOF: %s = %d found %td\n", it->parent, it->cells_name, - count, it->cell_count); + count, it->list_end - it->cur); goto err; } } -- 2.34.1