linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Chen Yu <yu.c.chen@intel.com>
Cc: linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Len Brown <lenb@kernel.org>, Rui Zhang <rui.zhang@intel.com>,
	Linux ACPI <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH] platform: Print the resource range if device failed to claim
Date: Thu, 22 Dec 2016 02:19:22 +0100	[thread overview]
Message-ID: <3581108.InxQuoaF8Q@aspire.rjw.lan> (raw)
In-Reply-To: <1482312295-13373-1-git-send-email-yu.c.chen@intel.com>

[CC Mika and linux-acpi]

On Wednesday, December 21, 2016 05:24:55 PM Chen Yu wrote:
> Sometimes we have the following error message:
>  platform MSFT0101:00: failed to claim resource 1
>  acpi MSFT0101:00: platform device creation failed: -16
> But there is not enough information to figure out which resource range
> failed to claim.
> 
> Thus print the resource range at first-place thus /proc/iomem or
> ioports should tell us who already claimed this resource, then
> the driver bug or incorrect resource assignment which is running
> into this conflict can be diagnosed:
>  platform MSFT0101:00: failed to claim resource 1: [mem 0xfed40000-0xfed40fff]
>  acpi MSFT0101:00: platform device creation failed: -16
> 
> Suggested-by: Len Brown <lenb@kernel.org>
> Reported-by: Wendy Wang <wendy.wang@intel.com>
> Signed-off-by: Chen Yu <yu.c.chen@intel.com>
> ---
>  drivers/base/platform.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> index c4af003..22a6430 100644
> --- a/drivers/base/platform.c
> +++ b/drivers/base/platform.c
> @@ -396,7 +396,7 @@ int platform_device_add(struct platform_device *pdev)
>  		}
>  
>  		if (p && insert_resource(p, r)) {
> -			dev_err(&pdev->dev, "failed to claim resource %d\n", i);
> +			dev_err(&pdev->dev, "failed to claim resource %d: %pR\n", i, r);

Do we still need the resource number?

>  			ret = -EBUSY;
>  			goto failed;
>  		}
> 

Thanks,
Rafael

  reply	other threads:[~2016-12-22  1:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-21  9:24 [PATCH] platform: Print the resource range if device failed to claim Chen Yu
2016-12-22  1:19 ` Rafael J. Wysocki [this message]
2016-12-22  3:32   ` Chen Yu
2016-12-22  9:18   ` Mika Westerberg

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=3581108.InxQuoaF8Q@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=yu.c.chen@intel.com \
    /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).