RE: [PATCH] isci: correct erroneous for_each_isci_host macro

2014-01-21 Thread Dorau, Lukasz
On Monday, January 20, 2014 7:26 PM Dan Williams dan.j.willi...@intel.com wrote: On Mon, Jan 20, 2014 at 8:54 AM, Lukasz Dorau lukasz.do...@intel.com wrote: In the first place, the loop 'for' in the macro 'for_each_isci_host' (drivers/scsi/isci/host.h:314) is incorrect, because it accesses

[PATCH] isci: correct erroneous for_each_isci_host macro

2014-01-20 Thread Lukasz Dorau
In the first place, the loop 'for' in the macro 'for_each_isci_host' (drivers/scsi/isci/host.h:314) is incorrect, because it accesses the 3rd element of 2 element array. After the 2nd iteration it executes the instruction: ihost = to_pci_info(pdev)-hosts[2] (while the size of the 'hosts'

Re: [PATCH] isci: correct erroneous for_each_isci_host macro

2014-01-20 Thread Dan Williams
On Mon, Jan 20, 2014 at 8:54 AM, Lukasz Dorau lukasz.do...@intel.com wrote: In the first place, the loop 'for' in the macro 'for_each_isci_host' (drivers/scsi/isci/host.h:314) is incorrect, because it accesses the 3rd element of 2 element array. After the 2nd iteration it executes the