Skip to contentSkip to conversation

PCI: ibmphp: Remove unneeded break

PATCH Applied Bjorn Helgaas 1 participant 2 messages Nov 5, 2020 – Nov 13, 2020 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: ibmphp: Remove unneeded break

From: Bjorn Helgaas <[email protected]>

A break is not needed if it is preceded by a return.

Based on Tom Rix's treewide patch; this instance extracted from Joe Perches' list.

.com

---
 drivers/pci/hotplug/ibmphp_pci.c | 2 --
 1 file changed, 2 deletions(-)
drivers/pci/hotplug/ibmphp_pci.c +0 -2
index e22d023f91d1..754c3f23282e 100644
@@ -294,7 +294,6 @@ int ibmphp_configure_card(struct pci_func *func, u8 slotno)
 				default:
 					err("MAJOR PROBLEM!!!!, header type not supported? %x\n", hdr_type);
 					return -ENXIO;
-					break;
 			}	/* end of switch */
 		}	/* end of valid device */
 	}	/* end of for */
@@ -1509,7 +1508,6 @@ static int unconfigure_boot_card(struct slot *slot_cur)
 				default:
 					err("MAJOR PROBLEM!!!! Cannot read device's header\n");
 					return -1;
-					break;
 			}	/* end of switch */
 		}	/* end of valid device */
 	}	/* end of for */
Signature · 1 line
2.25.1
author Applied
#1 lore raw
Quoted 7 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

A break is not needed if it is preceded by a return.

Based on Tom Rix's treewide patch; this instance extracted from Joe Perches' list.

Quoted 6 lines

.com

Applied to pci/hotplug for v5.11.

Quoted 27 lines
---
 drivers/pci/hotplug/ibmphp_pci.c | 2 --
 1 file changed, 2 deletions(-)
drivers/pci/hotplug/ibmphp_pci.c +0 -2
index e22d023f91d1..754c3f23282e 100644
@@ -294,7 +294,6 @@ int ibmphp_configure_card(struct pci_func *func, u8 slotno)
 				default:
 					err("MAJOR PROBLEM!!!!, header type not supported? %x\n", hdr_type);
 					return -ENXIO;
-					break;
 			}	/* end of switch */
 		}	/* end of valid device */
 	}	/* end of for */
@@ -1509,7 +1508,6 @@ static int unconfigure_boot_card(struct slot *slot_cur)
 				default:
 					err("MAJOR PROBLEM!!!! Cannot read device's header\n");
 					return -1;
-					break;
 			}	/* end of switch */
 		}	/* end of valid device */
 	}	/* end of for */
Signature · 1 line
2.25.1