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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 21 Jan 2010 11:47:13 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Alex Chiang <achiang@...com>
CC:	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ivan Kokshaysky <ink@...assic.park.msu.ru>,
	Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>,
	Bjorn Helgaas <bjorn.helgaas@...com>,
	linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH 1/9] pci: add pci_bridge_release_unused_res and	pci_bus_release_unused_bridge_res

On 01/21/2010 10:18 AM, Alex Chiang wrote:
>   
> Sorry, this is getting into bike-shed territory.
> 
> I'm a lot happier with the code now, so may as well fix up a few
> style issues before it goes in.
> 
>> +static void pci_bridge_release_resources(struct pci_bus *bus,
>> +					  unsigned long type)
>> +{
> 
> [...]
> 
>> +	if (changed) {
>> +		if (type & IORESOURCE_PREFETCH) {
>> +			/* avoiding touch the one without PREF */
>> +			type = IORESOURCE_PREFETCH;
>> +		}
> 
> Strictly speaking, you don't need those curly braces. If you want
> readability, how about moving the comment up?
> 
> 		/* Only setup prefetch resources */
> 		if (type & IORESOURCE_PREFETCH)
> 			type = IORESOURCE_PREFETCH;
> 
> 
>> +		__pci_setup_bridge(bus, type);
>> +	}
>> +}
>> +
>> +static void __ref pci_bus_release_bridge_resources(struct pci_bus *bus,
>> +						   unsigned long type,
>> +						   enum release_type rel_type)
>> +{
> 
> [...]
> 
>> +
>> +	/* The root bus? */
> 
> Useless comment.
> 
>> +	if (pci_is_root_bus(bus))
>> +		return;
>> +
>> +	if ((bus->self->class >> 8) != PCI_CLASS_BRIDGE_PCI)
>> +		return;
>> +
>> +	if (((rel_type == leaf_only) && is_leaf_bridge) ||
>> +		    (rel_type == whole_subtree))
>> +		pci_bridge_release_resources(bus, type);
>> +}
> 
> Can clean this up a bit too with short-circuit logic.
> 
> 	if ((rel_type == whole_subtree) || is_leaf_bridge)
> 		pci_bridge_release_resources(bus, type);
> 
> If you clean those up, you can add my:
> 
> Reviewed-by: Alex Chiang <achiang@...com>

ok thanks.
--
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