Re: [PATCH 4/4] pci: don't hide hard to understand sanity check in size calculation

2018-04-16 Thread Andrey Smirnov
On Sun, Apr 15, 2018 at 11:27 AM, Uwe Kleine-König wrote: > Hello Andrey, > > On Sat, Apr 14, 2018 at 09:25:59AM -0700, Andrey Smirnov wrote: >> On Fri, Apr 13, 2018 at 4:30 PM, Uwe Kleine-König >> wrote: >> > + /* >>

Re: [PATCH 4/4] pci: don't hide hard to understand sanity check in size calculation

2018-04-15 Thread Uwe Kleine-König
Hello Andrey, On Sat, Apr 14, 2018 at 09:25:59AM -0700, Andrey Smirnov wrote: > On Fri, Apr 13, 2018 at 4:30 PM, Uwe Kleine-König > wrote: > > + /* > > +* if maxbase isn't in the form 0b1...10...0 there is > > something > > +

Re: [PATCH 4/4] pci: don't hide hard to understand sanity check in size calculation

2018-04-14 Thread Andrey Smirnov
On Fri, Apr 13, 2018 at 4:30 PM, Uwe Kleine-König wrote: > pci_size() had a check that made it return 0 (i.e. an error) in some > cases. It took me a while to work out in which situations exactly this > check triggered: If writing 0xfffe to the BAR register