[dpdk-dev] [PATCH 2/2] pci: rearrange logic from compare loop

2015-05-19 Thread Bruce Richardson
On Mon, Apr 13, 2015 at 03:11:11PM -0700, Stephen Hemminger wrote: > Do some cleanup of pci scan loop. > * check errors first > * don't initialize variables where not necessary > * cuddle else (follow existing style) > * chop off conditional after return > > Signed-off-by: Stephen Hemminge

[dpdk-dev] [PATCH 2/2] pci: rearrange logic from compare loop

2015-04-14 Thread Stephen Hemminger
There is no need to initialize a variable that is only used as a loop variable. On Tue, Apr 14, 2015 at 2:30 AM, Qiu, Michael wrote: > On 4/14/2015 6:11 AM, Stephen Hemminger wrote: > > Do some cleanup of pci scan loop. > > * check errors first > > * don't initialize variables where not ne

[dpdk-dev] [PATCH 2/2] pci: rearrange logic from compare loop

2015-04-14 Thread Qiu, Michael
On 4/14/2015 6:11 AM, Stephen Hemminger wrote: > Do some cleanup of pci scan loop. > * check errors first > * don't initialize variables where not necessary Why? It should be better to initialize variables when define it. Thanks, Michael > * cuddle else (follow existing style) > * chop of

[dpdk-dev] [PATCH 2/2] pci: rearrange logic from compare loop

2015-04-13 Thread Stephen Hemminger
Do some cleanup of pci scan loop. * check errors first * don't initialize variables where not necessary * cuddle else (follow existing style) * chop off conditional after return Signed-off-by: Stephen Hemminger --- lib/librte_eal/linuxapp/eal/eal_pci.c | 24 1 f