Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3593893pxb; Mon, 24 Jan 2022 13:04:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6yiqmVuBU88kyGAP4NK4/JlFHA570zqb4Bqs26ZNPUOz+tkOGEJTBNYnnMYn3DXI89g4e X-Received: by 2002:aa7:8003:0:b0:4bc:1a91:6df3 with SMTP id j3-20020aa78003000000b004bc1a916df3mr15610356pfi.26.1643058276653; Mon, 24 Jan 2022 13:04:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643058276; cv=none; d=google.com; s=arc-20160816; b=thJ3AIaeH0gmDjThbMtUcf7sAbOEBLF0RsSanMi3HMN2IV8+Y+nqMm+hkAbRzfmqoK Iod7oj3YtS4SJEvUewGPa9jwMwFgXjnKrCpe8RtQdzQxVwQkjOjbJA5lGKNWp+/pwsQ1 MeuHJnQa/Wn3u0mXDnRq3RIEsD4fkhe+dSttG7PiMucu2ndhM/drFNJ80P0ce/Y/7kxA m6ltu8MbmQELA4kOA7+v/2AL7z1NFuA0tB1eTInLB5XkSF1x6RNyvjZWaM5ioUUHNekf f2ujvoM3ajrrNiCOMS+pXquHFeU/7UbF0LbXHTl8zuJJiNj3RBlW6KntMR/Lel+ujODK 541g== 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=fX7ZdnV+NTFNg6fQWa5SdiX1AKGi3qZkIw7wA4awZOc=; b=tLltsPQhkSEPanBZImkJfH+A2LnNPOFNSUDQceIqhyRJpxA1aCKIXbFSxzuIv0knb2 W2wwdnbIhwulOoMQKxaCLrWlZqbyjRx4mmWUq5qfd/o/n8PiAMwleht8ebFH0n4sQFvx 3ZnSf1QX11fvKWjSKK9RX3HLAXfb3JMnjxOKGHBXczrZxb3+y4eRUVHC/aGgW2U+V77T +PDajDa637cZ0omGiJIYq54zH5NYArvEpsOUXFrioV4bBRzWvQZ1lG2M1jOnF6b1wl2g ypTmmDVD0i4OeuRAGGwoQsHjCmUi3jKDOtv5p23VwMZ6z2JK0ZVkheesLvCWkiO9HGgs 4IOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0WybXRca; 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 bk9si8005289pgb.669.2022.01.24.13.04.15; Mon, 24 Jan 2022 13:04:36 -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=0WybXRca; 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 S1383801AbiAXU1t (ORCPT + 99 others); Mon, 24 Jan 2022 15:27:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377477AbiAXUFc (ORCPT ); Mon, 24 Jan 2022 15:05:32 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32E65C08E874; Mon, 24 Jan 2022 11:31:59 -0800 (PST) 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 E322EB81235; Mon, 24 Jan 2022 19:31:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED5C6C340E5; Mon, 24 Jan 2022 19:31:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643052716; bh=jcxrBk633Q5y72o5iIj9XdKsxh6Z9iUt7QDvXfWK9l4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0WybXRca0eSCMSeq88U9L0CuZAOP4ZM8Rddg8EOfdmwNLErJy/D2DvTJ7dNEuyjGn yQuLawfNbuXbpGwDVYcFss64V7cEm89aXQvEI2g+w9YKwOLWHVoevloYgFQ3SSj5h+ v37MYjoqkXYW218zFlw56+1Nlr82TM0MFZSrLPQA= 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.4 151/320] of: base: Fix phandle argument length mismatch error message Date: Mon, 24 Jan 2022 19:42:15 +0100 Message-Id: <20220124183958.775283680@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183953.750177707@linuxfoundation.org> References: <20220124183953.750177707@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 1d667eb730e19..a240211653789 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1366,9 +1366,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