lkml.org 
[lkml]   [2012]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6 1/5] ACPI: Add acpi_handle_<level>() interfaces
From
Date
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





\
 
 \ /
  Last update: 2012-11-20 23:01    [W:0.612 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site