File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -1449,13 +1449,18 @@ static int __init gdrdrv_init(void)
1449
1449
gdr_msg (KERN_INFO , "The platform may support CPU cached mappings. Decision to use cached mappings is left to the pinning function.\n" );
1450
1450
1451
1451
#if defined(CONFIG_ARM64 )
1452
- for (int i = 0 ; i < ARRAY_SIZE (GDRDRV_BF3_PCI_ROOT_DEV_DEVICE_ID ); ++ i )
1453
1452
{
1454
- struct pci_dev * pdev = pci_get_device (GDRDRV_BF3_PCI_ROOT_DEV_VENDOR_ID , GDRDRV_BF3_PCI_ROOT_DEV_DEVICE_ID [i ], NULL );
1455
- if (pdev ) {
1456
- pci_dev_put (pdev );
1457
- gdrdrv_cpu_must_use_device_mapping = 1 ;
1458
- break ;
1453
+ // Some compilers are strict and do not allow us to declare a variable
1454
+ // in the for statement.
1455
+ int i ;
1456
+ for (i = 0 ; i < ARRAY_SIZE (GDRDRV_BF3_PCI_ROOT_DEV_DEVICE_ID ); ++ i )
1457
+ {
1458
+ struct pci_dev * pdev = pci_get_device (GDRDRV_BF3_PCI_ROOT_DEV_VENDOR_ID , GDRDRV_BF3_PCI_ROOT_DEV_DEVICE_ID [i ], NULL );
1459
+ if (pdev ) {
1460
+ pci_dev_put (pdev );
1461
+ gdrdrv_cpu_must_use_device_mapping = 1 ;
1462
+ break ;
1463
+ }
1459
1464
}
1460
1465
}
1461
1466
#endif
You can’t perform that action at this time.
0 commit comments