Re: [PATCH v3 4/6] PCI: generic: Correct, and avoid overflow, in bus_max calculation.

2015-09-23 Thread Arnd Bergmann
On Wednesday 23 September 2015 08:50:45 David Daney wrote: > On 09/23/2015 01:01 AM, Arnd Bergmann wrote: > > On Tuesday 22 September 2015 16:49:15 David Daney wrote: > >> From: David Daney > >> diff --git a/Documentation/devicetree/bindings/pci/host-generic-pci.txt > >> b/Documentation/devicetre

Re: [PATCH v3 4/6] PCI: generic: Correct, and avoid overflow, in bus_max calculation.

2015-09-23 Thread David Daney
On 09/23/2015 01:01 AM, Arnd Bergmann wrote: On Tuesday 22 September 2015 16:49:15 David Daney wrote: From: David Daney There are two problems with the bus_max calculation: 1) The u8 data type can overflow for large config space windows. 2) The calculation is incorrect for a bus range that d

Re: [PATCH v3 4/6] PCI: generic: Correct, and avoid overflow, in bus_max calculation.

2015-09-23 Thread Arnd Bergmann
On Tuesday 22 September 2015 16:49:15 David Daney wrote: > From: David Daney > > There are two problems with the bus_max calculation: > > 1) The u8 data type can overflow for large config space windows. > > 2) The calculation is incorrect for a bus range that doesn't start at >zero. > > Si

[PATCH v3 4/6] PCI: generic: Correct, and avoid overflow, in bus_max calculation.

2015-09-22 Thread David Daney
From: David Daney There are two problems with the bus_max calculation: 1) The u8 data type can overflow for large config space windows. 2) The calculation is incorrect for a bus range that doesn't start at zero. Since the configuration space is relative to bus zero, make bus_max just be the