Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3604130pxb; Mon, 24 Jan 2022 13:18:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwXmL34Dix04tVDwW4mh3K8jJlA5teRHMVpIRxRFa7B5bsoqKsnmE4ibwzSHWY5KkNo73nq X-Received: by 2002:a63:b702:: with SMTP id t2mr13294256pgf.49.1643059122315; Mon, 24 Jan 2022 13:18:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643059122; cv=none; d=google.com; s=arc-20160816; b=mCSp6C1KGQabtfPJo9xaFTgWtvZ4xW/CweDHS2AO9P0r8nNsslZLE9HBWV5BKtunKx 9t8R25iO8TaeCYhvTTobdsoog0KMl23flksCtKd91joKneaPtaULC4KgBIDaQjul5Tyo cYZDu56Sp94S5drioS9A8iZL6ao+/gjT/vxFzN1/P5ucvb5lk7N5uPoLVnChTrjIFZ03 gVp+MIE232LI8c3mFnL9oDuBqMnkRz1+KnDPnOagNpuL4wwMMeaADVx0j+n1gpTrLH1r BBnaVKvvEZqjnTBceKr4xV04gVJPADB2UY4Bwi2AucGk2/8rfVpiWI3g3GeJLZLHydbB a2TA== 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=3+DQ18gqaIBqIlt3drRVwosNx9f9KJfCzAuLIkDvzok=; b=YTx4wU1hz4cUi7MqchmpgtrDmfOlRuL7uxUsJW5sgCJ7vYMpub+W+FTatDbyFebnzG mHEOB+aM32Q5+aH2/6U2D/ZmPCkQlAClKj6YI5844b9Gj5z5mutMoL4l63/H/r5Yc22E syx8gFQul5EaCTfHbTI6BcuCvH6r+LdOUbTXfBDAjTpVslXLkz+fVUY+SVCbK8yDe070 x6rcaroxZG3nm805PAZ4LNMAtXBjk/JDRelPn4Z5FSG5U0J/nS0PYR6B+tlcGPjoDBFX n+TNXZQBj4CvpB2gz0b3xHFkYFdHcCJyzPIUOuPyd0z6E/9r9aBOx9MNeHTCF7HxoHuA WEUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qHNL9dE+; 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 l5si14365123pgq.400.2022.01.24.13.18.24; Mon, 24 Jan 2022 13:18:42 -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=qHNL9dE+; 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 S1442687AbiAXUzF (ORCPT + 99 others); Mon, 24 Jan 2022 15:55:05 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:36182 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385324AbiAXUcZ (ORCPT ); Mon, 24 Jan 2022 15:32:25 -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 ams.source.kernel.org (Postfix) with ESMTPS id 38729B80FA1; Mon, 24 Jan 2022 20:32:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57A70C340E8; Mon, 24 Jan 2022 20:32:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643056342; bh=cWCfpUm6/xCPD6xXNOQTKl0dLRuxo0mq3m5aeNsLg/o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qHNL9dE+flxwLFcjvWgUG/MAcZh7WHt4X5Op9QIuOkKiwmgBbiX+22vGcZ2CanoH0 okBWBmAlcPvE0N/boh6d1CWsIHeYk+4ZTcQRyn1BPRBdUFvNga+O6rVZB3FhKYcMYF JLORgvK44mUQ7+xOVmrGkyjNMiyxPLaaB4GooCMM= 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.15 452/846] of: base: Fix phandle argument length mismatch error message Date: Mon, 24 Jan 2022 19:39:29 +0100 Message-Id: <20220124184116.581350857@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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 0ac17256258d5..211c4da5abef6 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1327,9 +1327,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