RE: [PATCH] isci: reformulate for_each_isci_host macro to fix an oops

2014-01-20 Thread Dorau, Lukasz
On Thursday, January 16, 2014 2:16 PM Lukasz Dorau wrote: > > The loop 'for' in macro 'for_each_isci_host' (drivers/scsi/isci/init.c:717) > is executed more times than it can be. Regardless the condition: >'id < ARRAY_SIZE(to_pci_info(pdev)->hosts)' (drivers/scsi/isci/host.h:315) > it is exe

[PATCH] isci: reformulate for_each_isci_host macro to fix an oops

2014-01-16 Thread Lukasz Dorau
The loop 'for' in macro 'for_each_isci_host' (drivers/scsi/isci/init.c:717) is executed more times than it can be. Regardless the condition: 'id < ARRAY_SIZE(to_pci_info(pdev)->hosts)' (drivers/scsi/isci/host.h:315) it is executed when id equals ARRAY_SIZE(to_pci_info(pdev)->hosts) too. (Remark: