[PATCH v3] resource: Downgrade "resource sanity check" warning to debug level

Manuel Quintero Fonseca posted 1 patch 1 day, 19 hours ago
kernel/resource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v3] resource: Downgrade "resource sanity check" warning to debug level
Posted by Manuel Quintero Fonseca 1 day, 19 hours ago
The "resource sanity check" warning currently triggers on certain
systems, causing unnecessary noise in the kernel logs for users.
Following the maintainer's suggestion, this patch downgrades the log
level from pr_warn to pr_debug.

This change reduces log clutter while keeping the diagnostic
information available for debugging purposes if needed.

Signed-off-by: Manuel Quintero Fonseca <sakunix@yahoo.com>
---
v3:
   - Downgrade 'resource sanity check' warning to debug level to reduce log 
     noise, as suggested by the maintainer.
   - Drop the previous DMI-based quirk approach as it is no longer needed.

 kernel/resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/resource.c b/kernel/resource.c
index d02a53fb95d8..e676ea99c93c 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -1859,7 +1859,7 @@ int iomem_map_sanity_check(resource_size_t addr, unsigned long size)
 		if (p->flags & IORESOURCE_BUSY)
 			continue;
 
-		pr_warn("resource sanity check: requesting [mem %pa-%pa], which spans more than %s %pR\n",
+		pr_debug("resource sanity check: requesting [mem %pa-%pa], which spans more than %s %pR\n",
 			&addr, &end, p->name, p);
 		err = -1;
 		break;
-- 
2.47.3
Re: [PATCH v3] resource: Downgrade "resource sanity check" warning to debug level
Posted by Rafael J. Wysocki 1 day, 2 hours ago
On Sat, May 23, 2026 at 2:01 AM Manuel Quintero Fonseca
<sakunix@yahoo.com> wrote:
>
> The "resource sanity check" warning currently triggers on certain
> systems, causing unnecessary noise in the kernel logs for users.

The fact that it triggers at all is not a problem.  In principle, it
may help to diagnose a functional issue.  However, it sometimes
doesn't mean that there is a functional issue, which is a problem.

I would say something like

 The "resource sanity check" warning need not mean that there is a
functional issue
 and in the cases when there isn't one, it is just useless and confusing noise.

> Following the maintainer's suggestion, this patch downgrades the log
> level from pr_warn to pr_debug.

Instead of the first part of the sentence above, you may use a
Suggested-by tag (pointing to the person whose suggestion is followed)
and the "this patch" part is redundant.

I would just say

 For this reason, downgrade the log level of it from "warn" to "debug".

> This change reduces log clutter while keeping the diagnostic
> information available for debugging purposes if needed.

The word "change" can be dropped from the above sentence.

> Signed-off-by: Manuel Quintero Fonseca <sakunix@yahoo.com>

It would be nice to add a Link: tag pointing to the discussion on the
previous version of the patch.

> ---
> v3:
>    - Downgrade 'resource sanity check' warning to debug level to reduce log
>      noise, as suggested by the maintainer.
>    - Drop the previous DMI-based quirk approach as it is no longer needed.
>
>  kernel/resource.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/resource.c b/kernel/resource.c
> index d02a53fb95d8..e676ea99c93c 100644
> --- a/kernel/resource.c
> +++ b/kernel/resource.c
> @@ -1859,7 +1859,7 @@ int iomem_map_sanity_check(resource_size_t addr, unsigned long size)
>                 if (p->flags & IORESOURCE_BUSY)
>                         continue;
>
> -               pr_warn("resource sanity check: requesting [mem %pa-%pa], which spans more than %s %pR\n",
> +               pr_debug("resource sanity check: requesting [mem %pa-%pa], which spans more than %s %pR\n",
>                         &addr, &end, p->name, p);
>                 err = -1;
>                 break;
> --

And the code change looks good to me.
Re: [PATCH v3] resource: Downgrade "resource sanity check" warning to debug level
Posted by Andrew Morton 1 day, 17 hours ago
On Fri, 22 May 2026 17:01:31 -0700 Manuel Quintero Fonseca <sakunix@yahoo.com> wrote:

> The "resource sanity check" warning currently triggers on certain
> systems, causing unnecessary noise in the kernel logs for users.
> Following the maintainer's suggestion, this patch downgrades the log
> level from pr_warn to pr_debug.

um, who is "the maintainer"?

hp2:/usr/src/25> grep kernel/resource.c MAINTAINERS
hp2:/usr/src/25> 

> This change reduces log clutter while keeping the diagnostic
> information available for debugging purposes if needed.
> 
> ...
>
> --- a/kernel/resource.c
> +++ b/kernel/resource.c
> @@ -1859,7 +1859,7 @@ int iomem_map_sanity_check(resource_size_t addr, unsigned long size)
>  		if (p->flags & IORESOURCE_BUSY)
>  			continue;
>  
> -		pr_warn("resource sanity check: requesting [mem %pa-%pa], which spans more than %s %pR\n",
> +		pr_debug("resource sanity check: requesting [mem %pa-%pa], which spans more than %s %pR\n",
>  			&addr, &end, p->name, p);
>  		err = -1;
>  		break;

lgtm, thanks.