Skip to content

Commit 6ab23de

Browse files
committed
Merge branch 'pci/hotplug'
- Make ibmphp read-only arrays static instead of putting them on the stack (Colin Ian King) * pci/hotplug: PCI: ibmphp: Make read-only arrays static
2 parents 3e2a87a + 5810ab2 commit 6ab23de

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/pci/hotplug/ibmphp_pci.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ int ibmphp_configure_card(struct pci_func *func, u8 slotno)
329329
static int configure_device(struct pci_func *func)
330330
{
331331
u32 bar[6];
332-
u32 address[] = {
332+
static const u32 address[] = {
333333
PCI_BASE_ADDRESS_0,
334334
PCI_BASE_ADDRESS_1,
335335
PCI_BASE_ADDRESS_2,
@@ -564,7 +564,7 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
564564
struct resource_node *pfmem = NULL;
565565
struct resource_node *bus_pfmem[2] = {NULL, NULL};
566566
struct bus_node *bus;
567-
u32 address[] = {
567+
static const u32 address[] = {
568568
PCI_BASE_ADDRESS_0,
569569
PCI_BASE_ADDRESS_1,
570570
0
@@ -1053,7 +1053,7 @@ static struct res_needed *scan_behind_bridge(struct pci_func *func, u8 busno)
10531053
int howmany = 0; /*this is to see if there are any devices behind the bridge */
10541054

10551055
u32 bar[6], class;
1056-
u32 address[] = {
1056+
static const u32 address[] = {
10571057
PCI_BASE_ADDRESS_0,
10581058
PCI_BASE_ADDRESS_1,
10591059
PCI_BASE_ADDRESS_2,
@@ -1182,7 +1182,7 @@ static struct res_needed *scan_behind_bridge(struct pci_func *func, u8 busno)
11821182
static int unconfigure_boot_device(u8 busno, u8 device, u8 function)
11831183
{
11841184
u32 start_address;
1185-
u32 address[] = {
1185+
static const u32 address[] = {
11861186
PCI_BASE_ADDRESS_0,
11871187
PCI_BASE_ADDRESS_1,
11881188
PCI_BASE_ADDRESS_2,
@@ -1310,7 +1310,7 @@ static int unconfigure_boot_bridge(u8 busno, u8 device, u8 function)
13101310
struct resource_node *mem = NULL;
13111311
struct resource_node *pfmem = NULL;
13121312
struct bus_node *bus;
1313-
u32 address[] = {
1313+
static const u32 address[] = {
13141314
PCI_BASE_ADDRESS_0,
13151315
PCI_BASE_ADDRESS_1,
13161316
0

0 commit comments

Comments
 (0)