linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saravana Kannan <saravanak@google.com>
To: Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>
Cc: Saravana Kannan <saravanak@google.com>,
	kernel-team@android.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] of: Reduce log level of of_phandle_iterator_next()
Date: Tue, 19 Nov 2019 20:00:45 -0800	[thread overview]
Message-ID: <20191120040045.81115-1-saravanak@google.com> (raw)

These error messages are mostly useful for debugging malformed device
tree data. So change these messages from error to debug messages to
avoid spamming the end user. Any error messages that might actually be
useful to the user is probably going to come from the caller of these
APIs. So leave it to them to decide if they need to print any error
messages.

Signed-off-by: Saravana Kannan <saravanak@google.com>
---
 drivers/of/base.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 1d667eb730e1..4762e826f13e 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1335,8 +1335,8 @@ int of_phandle_iterator_next(struct of_phandle_iterator *it)
 
 		if (it->cells_name) {
 			if (!it->node) {
-				pr_err("%pOF: could not find phandle\n",
-				       it->parent);
+				pr_debug("%pOF: could not find phandle\n",
+					 it->parent);
 				goto err;
 			}
 
@@ -1350,10 +1350,10 @@ int of_phandle_iterator_next(struct of_phandle_iterator *it)
 				if (it->cell_count >= 0) {
 					count = it->cell_count;
 				} else {
-					pr_err("%pOF: could not get %s for %pOF\n",
-					       it->parent,
-					       it->cells_name,
-					       it->node);
+					pr_debug("%pOF: could not get %s for %pOF\n",
+						 it->parent,
+						 it->cells_name,
+						 it->node);
 					goto err;
 				}
 			}
@@ -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",
-			       it->parent, it->cells_name,
-			       count, it->cell_count);
+			pr_debug("%pOF: %s = %d found %d\n",
+				 it->parent, it->cells_name,
+				 count, it->cell_count);
 			goto err;
 		}
 	}
-- 
2.24.0.432.g9d3f5f5b63-goog


             reply	other threads:[~2019-11-20  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-20  4:00 Saravana Kannan [this message]
2019-11-20 16:09 ` [PATCH] of: Reduce log level of of_phandle_iterator_next() Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191120040045.81115-1-saravanak@google.com \
    --to=saravanak@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).