Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755225AbbFBF5G (ORCPT ); Tue, 2 Jun 2015 01:57:06 -0400 Received: from mga09.intel.com ([134.134.136.24]:28606 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751847AbbFBF45 (ORCPT ); Tue, 2 Jun 2015 01:56:57 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,538,1427785200"; d="scan'208";a="739201648" Message-ID: <556D45A3.9070708@linux.intel.com> Date: Tue, 02 Jun 2015 13:56:51 +0800 From: Jiang Liu Organization: Intel User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Hanjun Guo , "Rafael J . Wysocki" , Bjorn Helgaas , Marc Zyngier , Yijing Wang , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org CC: Lv Zheng , "lenb @ kernel . org" , LKML , linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [Patch v3 6/7] x86/PCI/ACPI: Use common interface to support PCI host bridge References: <1431593803-5213-1-git-send-email-jiang.liu@linux.intel.com> <1431593803-5213-7-git-send-email-jiang.liu@linux.intel.com> <555F355E.7060706@linaro.org> In-Reply-To: <555F355E.7060706@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1592 Lines: 50 On 2015/5/22 21:55, Hanjun Guo wrote: > On 2015年05月14日 16:56, Jiang Liu wrote: >> Use common interface to simplify ACPI PCI host bridge implementation. >> >> Signed-off-by: Jiang Liu >> --- >> arch/x86/pci/acpi.c | 292 >> +++++++++++++++------------------------------------ >> 1 file changed, 85 insertions(+), 207 deletions(-) >> > [...] >> -static void release_pci_root_info(struct pci_host_bridge *bridge) >> +static void pci_acpi_root_release_info(struct acpi_pci_root_info *ci) >> { >> - struct resource *res; >> - struct resource_entry *entry; >> - struct pci_root_info *info = bridge->release_data; >> - >> - resource_list_for_each_entry(entry, &bridge->windows) { >> - res = entry->res; >> - if (res->parent && >> - (res->flags & (IORESOURCE_MEM | IORESOURCE_IO))) >> - release_resource(res); >> - } >> - >> - teardown_mcfg_map(info); >> - kfree(info); >> + teardown_mcfg_map(ci); >> + kfree(ci); > > Implicit pointer cast? I think add a comment here that %p of ci > is same as %p of info would be helpful for review and easy understood. Good point, will change as: kfree(container_of(ci, struct pci_root_info, common)); Thanks! Gerry > > other than that, > > Reviewed-by: Hanjun Guo > > Thanks > Hanjun -- 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/