mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Toshi Kani <toshi.kani@hp.com>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Subject: [PATCH 2/2] ACPI: Print diagnostic messages if device links cannot be created
Date: Thu, 08 Aug 2013 01:55:52 +0200	[thread overview]
Message-ID: <13381284.aBozDrehN8@vostro.rjw.lan> (raw)
In-Reply-To: <5685060.iNWFUGc9at@vostro.rjw.lan>

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Although the device links created by acpi_bind_one() are not
essential from the kernel functionality point of view, user space
may be confused when they are missing, so print diagnostic messages
to the kernel log if they can't be created.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/acpi/glue.c |    7 +++++++
 1 file changed, 7 insertions(+)

Index: linux-pm/drivers/acpi/glue.c
===================================================================
--- linux-pm.orig/drivers/acpi/glue.c
+++ linux-pm/drivers/acpi/glue.c
@@ -252,8 +252,15 @@ int acpi_bind_one(struct device *dev, ac
 	acpi_physnode_link_name(physical_node_name, node_id);
 	retval = sysfs_create_link(&acpi_dev->dev.kobj, &dev->kobj,
 				   physical_node_name);
+	if (retval)
+		dev_err(&acpi_dev->dev, "Failed to create link %s (%d)\n",
+			physical_node_name, retval);
+
 	retval = sysfs_create_link(&dev->kobj, &acpi_dev->dev.kobj,
 				   "firmware_node");
+	if (retval)
+		dev_err(dev, "Failed to create link firmware_node (%d)\n",
+			retval);
 
 	mutex_unlock(&acpi_dev->physical_node_lock);
 


  parent reply	other threads:[~2013-08-07 23:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07 23:54 [PATCH 0/2] ACPI: More acpi_bind_one() cleanups Rafael J. Wysocki
2013-08-07 23:55 ` [PATCH 1/2] ACPI: Drop unnecessary label from acpi_bind_one() Rafael J. Wysocki
2013-08-07 23:55 ` Rafael J. Wysocki [this message]
2013-08-08 19:33 ` [PATCH 0/2] ACPI: More acpi_bind_one() cleanups Toshi Kani

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=13381284.aBozDrehN8@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=toshi.kani@hp.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

all inboxes | Powered by JetHome®