linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pnp: Switch to dev_dbg
@ 2021-05-12 20:44 Heiner Kallweit
  2021-05-17 14:58 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2021-05-12 20:44 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-acpi

Debug output in dmesg log may confuse users. Therefore let's restrict
debug output to cases where DEBUG is defined or dynamic debug output
is enabled for the respective code piece.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/pnp/core.c     | 5 ++---
 drivers/pnp/resource.c | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c
index ccdfbf397..4df5aa6a3 100644
--- a/drivers/pnp/core.c
+++ b/drivers/pnp/core.c
@@ -215,9 +215,8 @@ int pnp_add_device(struct pnp_dev *dev)
 	for (id = dev->id; id; id = id->next)
 		len += scnprintf(buf + len, sizeof(buf) - len, " %s", id->id);
 
-	dev_printk(KERN_DEBUG, &dev->dev, "%s device, IDs%s (%s)\n",
-		   dev->protocol->name, buf,
-		   dev->active ? "active" : "disabled");
+	dev_dbg(&dev->dev, "%s device, IDs%s (%s)\n", dev->protocol->name, buf,
+		dev->active ? "active" : "disabled");
 	return 0;
 }
 
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index 70d4ba957..2fa0f7d55 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -540,7 +540,7 @@ struct pnp_resource *pnp_add_irq_resource(struct pnp_dev *dev, int irq,
 	res->start = irq;
 	res->end = irq;
 
-	dev_printk(KERN_DEBUG, &dev->dev, "%pR\n", res);
+	dev_dbg(&dev->dev, "%pR\n", res);
 	return pnp_res;
 }
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] pnp: Switch to dev_dbg
  2021-05-12 20:44 [PATCH] pnp: Switch to dev_dbg Heiner Kallweit
@ 2021-05-17 14:58 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2021-05-17 14:58 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: Rafael J. Wysocki, ACPI Devel Maling List

On Thu, May 13, 2021 at 12:25 AM Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
> Debug output in dmesg log may confuse users. Therefore let's restrict
> debug output to cases where DEBUG is defined or dynamic debug output
> is enabled for the respective code piece.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
>  drivers/pnp/core.c     | 5 ++---
>  drivers/pnp/resource.c | 2 +-
>  2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c
> index ccdfbf397..4df5aa6a3 100644
> --- a/drivers/pnp/core.c
> +++ b/drivers/pnp/core.c
> @@ -215,9 +215,8 @@ int pnp_add_device(struct pnp_dev *dev)
>         for (id = dev->id; id; id = id->next)
>                 len += scnprintf(buf + len, sizeof(buf) - len, " %s", id->id);
>
> -       dev_printk(KERN_DEBUG, &dev->dev, "%s device, IDs%s (%s)\n",
> -                  dev->protocol->name, buf,
> -                  dev->active ? "active" : "disabled");
> +       dev_dbg(&dev->dev, "%s device, IDs%s (%s)\n", dev->protocol->name, buf,
> +               dev->active ? "active" : "disabled");
>         return 0;
>  }
>
> diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
> index 70d4ba957..2fa0f7d55 100644
> --- a/drivers/pnp/resource.c
> +++ b/drivers/pnp/resource.c
> @@ -540,7 +540,7 @@ struct pnp_resource *pnp_add_irq_resource(struct pnp_dev *dev, int irq,
>         res->start = irq;
>         res->end = irq;
>
> -       dev_printk(KERN_DEBUG, &dev->dev, "%pR\n", res);
> +       dev_dbg(&dev->dev, "%pR\n", res);
>         return pnp_res;
>  }
>
> --

Applied as 5.14 material with edits in the subject and changelog, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-17 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12 20:44 [PATCH] pnp: Switch to dev_dbg Heiner Kallweit
2021-05-17 14:58 ` Rafael J. Wysocki

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).