lkml.org 
[lkml]   [2015]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch v3 6/7] x86/PCI/ACPI: Use common interface to support PCI host bridge
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 <jiang.liu@linux.intel.com>
>> ---
>> 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 <hanjun.guo@linaro.org>
>
> Thanks
> Hanjun


\
 
 \ /
  Last update: 2015-06-02 08:41    [W:0.065 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site