mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Toshi Kani <toshi.kani@hp.com>
To: Joe Perches <joe@perches.com>
Cc: linux-acpi@vger.kernel.org, rjw@sisk.pl, lenb@kernel.org,
	linux-kernel@vger.kernel.org, bhelgaas@google.com,
	isimatu.yasuaki@jp.fujitsu.com, vijaymohan.pandarathil@hp.com
Subject: Re: [PATCH v6 1/5] ACPI: Add acpi_handle_<level>() interfaces
Date: Tue, 20 Nov 2012 14:12:11 -0700	[thread overview]
Message-ID: <1353445931.10939.100.camel@misato.fc.hp.com> (raw)
In-Reply-To: <1353445837.17819.20.camel@joe-AO722>

On Tue, 2012-11-20 at 13:10 -0800, Joe Perches wrote:
> On Tue, 2012-11-20 at 13:44 -0700, Toshi Kani wrote:
> > This interface acquires the global namespace
> > mutex and may not be called from interrupt context.
> []
> > diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
> []
> > +/**
> > + * acpi_handle_printk: Print message with ACPI prefix and object path
> > + *
> > + * This function is called through acpi_handle_<level> macros and prints
> > + * a message with ACPI prefix and object path.  This function acquires
> > + * the global namespace mutex and may not be called from interrupt context.
> > + */
> > +void
> > +acpi_handle_printk(const char *level, acpi_handle handle, const char *fmt, ...)
> > +{
> []
> > +	ret = acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
> > +	if (ret == AE_OK)
> > +		path = buffer.pointer;
> > +	else
> > +		path = "<n/a>";
> 
> Perhaps:
> 	if (in_interrupt() ||
> 	    acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer) != AE_OK)
> 		path = "<n/a>";
> 	else
> 		path = buffer.pointer;
> 
> so that any interrupt context still works, just
> not printing the correct acpi_get_name;

Hi Joe,

Good idea.  I will update the patch as you suggested.

Thanks,
-Toshi




  reply	other threads:[~2012-11-20 21:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-20 20:44 [PATCH v6 0/5] ACPI: hotplug messages improvement Toshi Kani
2012-11-20 20:44 ` [PATCH v6 1/5] ACPI: Add acpi_handle_<level>() interfaces Toshi Kani
2012-11-20 21:10   ` Joe Perches
2012-11-20 21:12     ` Toshi Kani [this message]
2012-11-20 20:44 ` [PATCH v6 2/5] ACPI: Update CPU hotplug error messages Toshi Kani
2012-11-20 20:44 ` [PATCH v6 3/5] ACPI: Update Memory " Toshi Kani
2012-11-20 20:44 ` [PATCH v6 4/5] ACPI: Update Container " Toshi Kani
2012-11-20 20:44 ` [PATCH v6 5/5] ACPI: Update Dock " 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=1353445931.10939.100.camel@misato.fc.hp.com \
    --to=toshi.kani@hp.com \
    --cc=bhelgaas@google.com \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=joe@perches.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=vijaymohan.pandarathil@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®