linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: ibmphp: Remove unneeded break
@ 2020-11-05 15:02 Bjorn Helgaas
  2020-11-13 23:15 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Helgaas @ 2020-11-05 15:02 UTC (permalink / raw)
  To: linux-pci; +Cc: Bjorn Helgaas, Tom Rix, Joe Perches

From: Bjorn Helgaas <bhelgaas@google.com>

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.

Link: https://lore.kernel.org/r/20201017160928.12698-1-trix@redhat.com
Link: https://lore.kernel.org/r/f530b7aeecbbf9654b4540cfa20023a4c2a11889.camel@perches
.com
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Tom Rix <trix@redhat.com>
Cc: Joe Perches <joe@perches.com>
---
 drivers/pci/hotplug/ibmphp_pci.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c
index e22d023f91d1..754c3f23282e 100644
--- a/drivers/pci/hotplug/ibmphp_pci.c
+++ b/drivers/pci/hotplug/ibmphp_pci.c
@@ -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 */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI: ibmphp: Remove unneeded break
  2020-11-05 15:02 [PATCH] PCI: ibmphp: Remove unneeded break Bjorn Helgaas
@ 2020-11-13 23:15 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2020-11-13 23:15 UTC (permalink / raw)
  To: linux-pci; +Cc: Bjorn Helgaas, Tom Rix, Joe Perches

On Thu, Nov 05, 2020 at 09:02:22AM -0600, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
> 
> 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.
> 
> Link: https://lore.kernel.org/r/20201017160928.12698-1-trix@redhat.com
> Link: https://lore.kernel.org/r/f530b7aeecbbf9654b4540cfa20023a4c2a11889.camel@perches
> .com
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Tom Rix <trix@redhat.com>
> Cc: Joe Perches <joe@perches.com>

Applied to pci/hotplug for v5.11.

> ---
>  drivers/pci/hotplug/ibmphp_pci.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c
> index e22d023f91d1..754c3f23282e 100644
> --- a/drivers/pci/hotplug/ibmphp_pci.c
> +++ b/drivers/pci/hotplug/ibmphp_pci.c
> @@ -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 */
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-13 23:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-05 15:02 [PATCH] PCI: ibmphp: Remove unneeded break Bjorn Helgaas
2020-11-13 23:15 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).