Skip to contentSkip to conversation

driver core: silence device link messages unless debugging

PATCH In review Jerome Brunet 3 participants 3 messages Dec 21, 2018 – Jan 11, 2019

Subsystems (2)
lore
Share & tools
lore

Jerome Brunet

author reviewer
#0 lore raw

PATCH 1/1 driver core: silence device link messages unless debugging

On platforms making a fair use of regulators, the dev_info() messages coming from the device link function are a bit too verbose. The amount of message will increase further with the clock framework joining the device link party.

These messages looks valuable for people debugging device link related issues, so dev_dbg() looks more appropriate than dev_info().

---
 drivers/base/core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/base/core.c +3 -3
index 04bbcd779e11..8d330f921ad7 100644
@@ -301,7 +301,7 @@ struct device_link *device_link_add(struct device *consumer,
 	list_add_tail_rcu(&link->s_node, &supplier->links.consumers);
 	list_add_tail_rcu(&link->c_node, &consumer->links.suppliers);
 
-	dev_info(consumer, "Linked as a consumer to %s\n", dev_name(supplier));
+	dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier));
 
  out:
 	device_pm_unlock();
@@ -327,8 +327,8 @@ static void __device_link_del(struct kref *kref)
 {
 	struct device_link *link = container_of(kref, struct device_link, kref);
 
-	dev_info(link->consumer, "Dropping the link to %s\n",
-		 dev_name(link->supplier));
+	dev_dbg(link->consumer, "Dropping the link to %s\n",
+		dev_name(link->supplier));
 
 	if (link->flags & DL_FLAG_PM_RUNTIME)
 		pm_runtime_drop_link(link->consumer);
Signature · 1 line
2.19.2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Jerome Brunet

On platforms making a fair use of regulators, the dev_info() messages coming from the device link function are a bit too verbose. The amount of message will increase further with the clock framework joining the device link party.

These messages looks valuable for people debugging device link related issues, so dev_dbg() looks more appropriate than dev_info().

Quoted 30 lines
---
 drivers/base/core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/base/core.c +3 -3
index 04bbcd779e11..8d330f921ad7 100644
@@ -301,7 +301,7 @@ struct device_link *device_link_add(struct device *consumer,
 	list_add_tail_rcu(&link->s_node, &supplier->links.consumers);
 	list_add_tail_rcu(&link->c_node, &consumer->links.suppliers);
 
-	dev_info(consumer, "Linked as a consumer to %s\n", dev_name(supplier));
+	dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier));
 
  out:
 	device_pm_unlock();
@@ -327,8 +327,8 @@ static void __device_link_del(struct kref *kref)
 {
 	struct device_link *link = container_of(kref, struct device_link, kref);
 
-	dev_info(link->consumer, "Dropping the link to %s\n",
-		 dev_name(link->supplier));
+	dev_dbg(link->consumer, "Dropping the link to %s\n",
+		dev_name(link->supplier));
 
 	if (link->flags & DL_FLAG_PM_RUNTIME)
 		pm_runtime_drop_link(link->consumer);
Signature · 1 line
2.19.2
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Jerome Brunet
Quoted 10 lines · Jerome Brunet

On platforms making a fair use of regulators, the dev_info() messages coming from the device link function are a bit too verbose. The amount of message will increase further with the clock framework joining the device link party.

These messages looks valuable for people debugging device link related issues, so dev_dbg() looks more appropriate than dev_info().

Quoted 31 lines
---
 drivers/base/core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/base/core.c +3 -4
index 04bbcd779e11..8d330f921ad7 100644
@@ -301,7 +301,7 @@ struct device_link *device_link_add(struct device *consumer,
        list_add_tail_rcu(&link->s_node, &supplier->links.consumers);
        list_add_tail_rcu(&link->c_node, &consumer->links.suppliers);
 
-       dev_info(consumer, "Linked as a consumer to %s\n", dev_name(supplier));
+       dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier));
 
  out:
        device_pm_unlock();
@@ -327,8 +327,8 @@ static void __device_link_del(struct kref *kref)
 {
        struct device_link *link = container_of(kref, struct device_link, kref);
 
-       dev_info(link->consumer, "Dropping the link to %s\n",
-                dev_name(link->supplier));
+       dev_dbg(link->consumer, "Dropping the link to %s\n",
+               dev_name(link->supplier));
 
        if (link->flags & DL_FLAG_PM_RUNTIME)
                pm_runtime_drop_link(link->consumer);
--

2.19.2