lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 2 Jun 2015 14:29:53 +0800
From:	Hanjun Guo <guohanjun@...wei.com>
To:	Jiang Liu <jiang.liu@...ux.intel.com>,
	Hanjun Guo <hanjun.guo@...aro.org>,
	"Rafael J . Wysocki" <rjw@...ysocki.net>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Marc Zyngier <marc.zyngier@....com>,
	Yijing Wang <wangyijing@...wei.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, <x86@...nel.org>
CC:	Lv Zheng <lv.zheng@...el.com>,
	"lenb @ kernel . org" <lenb@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>, <linux-pci@...r.kernel.org>,
	<linux-acpi@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [Patch v3 6/7] x86/PCI/ACPI: Use common interface to support
 PCI host bridge

On 2015/6/2 13:56, Jiang Liu wrote:
> 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@...ux.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));

This way is better :)

Thanks
Hanjun

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ