Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422766Ab2JXWDc (ORCPT ); Wed, 24 Oct 2012 18:03:32 -0400 Received: from ogre.sisk.pl ([193.178.161.156]:35678 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422648Ab2JXWD3 (ORCPT ); Wed, 24 Oct 2012 18:03:29 -0400 From: "Rafael J. Wysocki" To: Toshi Kani Cc: Yasuaki Ishimatsu , linux-acpi@vger.kernel.org, lenb@kernel.org, linux-kernel@vger.kernel.org, shli@fusionio.com Subject: Re: [PATCH] ACPI: dock: Remove redundant ACPI NS walk Date: Thu, 25 Oct 2012 00:07:24 +0200 Message-ID: <3037298.yInkQxASad@vostro.rjw.lan> User-Agent: KMail/4.8.5 (Linux/3.6.2-6-desktop; KDE/4.8.5; x86_64; ; ) In-Reply-To: <1349969385.23493.53.camel@misato.fc.hp.com> References: <1347481849-17973-1-git-send-email-toshi.kani@hp.com> <1349875217.23493.25.camel@misato.fc.hp.com> <1349969385.23493.53.camel@misato.fc.hp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4104 Lines: 125 On Thursday 11 of October 2012 09:29:45 Toshi Kani wrote: > Hi Len, > > Can you please review this patch? Applied to linux-pm.git/acpi-next as v3.8 material. Thanks, Rafael > On Wed, 2012-10-10 at 07:20 -0600, Toshi Kani wrote: > > On Wed, 2012-10-10 at 10:14 +0900, Yasuaki Ishimatsu wrote: > > > Hi Toshi, > > > > > > Sorry for late reply. > > > > > > 2012/09/13 5:30, Toshi Kani wrote: > > > > Combined two ACPI namespace walks, which look for dock stations > > > > and then bays separately, into a single walk. > > > > > > > > Signed-off-by: Toshi Kani > > > > --- > > > > > > I have not tested the patch. But it looks good to me. > > > > > > Reviewed-by: Yasuaki Ishimatsu > > > > Hi Yasuaki, > > > > Thanks for the review! I did test the patch with _DCK and PNP0C0A in > > ACPI. > > > > -Toshi > > > > > > > > > > Thanks, > > > Yasuaki Ishimatsu > > > > > > > drivers/acpi/dock.c | 26 +++++++------------------- > > > > 1 files changed, 7 insertions(+), 19 deletions(-) > > > > > > > > diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c > > > > index 88eb143..ae4ebf2 100644 > > > > --- a/drivers/acpi/dock.c > > > > +++ b/drivers/acpi/dock.c > > > > @@ -1016,44 +1016,32 @@ static int dock_remove(struct dock_station *ds) > > > > } > > > > > > > > /** > > > > - * find_dock - look for a dock station > > > > + * find_dock_and_bay - look for dock stations and bays > > > > * @handle: acpi handle of a device > > > > * @lvl: unused > > > > - * @context: counter of dock stations found > > > > + * @context: unused > > > > * @rv: unused > > > > * > > > > - * This is called by acpi_walk_namespace to look for dock stations. > > > > + * This is called by acpi_walk_namespace to look for dock stations and bays. > > > > */ > > > > static __init acpi_status > > > > -find_dock(acpi_handle handle, u32 lvl, void *context, void **rv) > > > > +find_dock_and_bay(acpi_handle handle, u32 lvl, void *context, void **rv) > > > > { > > > > - if (is_dock(handle)) > > > > + if (is_dock(handle) || is_ejectable_bay(handle)) > > > > dock_add(handle); > > > > > > > > return AE_OK; > > > > } > > > > > > > > -static __init acpi_status > > > > -find_bay(acpi_handle handle, u32 lvl, void *context, void **rv) > > > > -{ > > > > - /* If bay is a dock, it's already handled */ > > > > - if (is_ejectable_bay(handle) && !is_dock(handle)) > > > > - dock_add(handle); > > > > - return AE_OK; > > > > -} > > > > - > > > > static int __init dock_init(void) > > > > { > > > > if (acpi_disabled) > > > > return 0; > > > > > > > > - /* look for a dock station */ > > > > + /* look for dock stations and bays */ > > > > acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, > > > > - ACPI_UINT32_MAX, find_dock, NULL, NULL, NULL); > > > > + ACPI_UINT32_MAX, find_dock_and_bay, NULL, NULL, NULL); > > > > > > > > - /* look for bay */ > > > > - acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, > > > > - ACPI_UINT32_MAX, find_bay, NULL, NULL, NULL); > > > > if (!dock_station_count) { > > > > printk(KERN_INFO PREFIX "No dock devices found.\n"); > > > > return 0; > > > > > > > > > > > > > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > Please read the FAQ at http://www.tux.org/lkml/ > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/