[PATCH 4/4] powerpc/4xx: Delete unnecessary variable initialisations in four functions
Markus Elfring
Markus.Elfring at web.de
Fri Mar 17 07:18:11 AEDT 2023
Date: Thu, 16 Mar 2023 19:56:21 +0100
Some local variables will be set to an appropriate value before usage.
Thus omit explicit initialisations at the beginning of these functions.
Signed-off-by: Markus Elfring <elfring at users.sourceforge.net>
---
arch/powerpc/platforms/4xx/pci.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/platforms/4xx/pci.c b/arch/powerpc/platforms/4xx/pci.c
index 0c0848f0c819..ebc030e12663 100644
--- a/arch/powerpc/platforms/4xx/pci.c
+++ b/arch/powerpc/platforms/4xx/pci.c
@@ -323,8 +323,8 @@ static void __init ppc4xx_probe_pci_bridge(struct device_node *np)
struct resource rsrc_cfg;
struct resource rsrc_reg;
struct resource dma_window;
- struct pci_controller *hose = NULL;
- void __iomem *reg = NULL;
+ struct pci_controller *hose;
+ void __iomem *reg;
const int *bus_range;
int primary = 0;
@@ -523,8 +523,8 @@ static void __init ppc4xx_probe_pcix_bridge(struct device_node *np)
struct resource rsrc_cfg;
struct resource rsrc_reg;
struct resource dma_window;
- struct pci_controller *hose = NULL;
- void __iomem *reg = NULL;
+ struct pci_controller *hose;
+ void __iomem *reg;
const int *bus_range;
int big_pim = 0, msi = 0, primary = 0;
@@ -1403,7 +1403,7 @@ static struct ppc4xx_pciex_hwops ppc_476fpe_pcie_hwops __initdata =
static int __init ppc4xx_pciex_check_core_init(struct device_node *np)
{
static int core_init;
- int count = -ENODEV;
+ int count;
if (core_init++)
return 0;
@@ -1905,10 +1905,10 @@ static void __init ppc4xx_configure_pciex_PIMs(struct ppc4xx_pciex_port *port,
static void __init ppc4xx_pciex_port_setup_hose(struct ppc4xx_pciex_port *port)
{
struct resource dma_window;
- struct pci_controller *hose = NULL;
+ struct pci_controller *hose;
const int *bus_range;
int primary = 0, busses;
- void __iomem *mbase = NULL, *cfg_data = NULL;
+ void __iomem *mbase, *cfg_data = NULL;
const u32 *pval;
u32 val;
--
2.39.2
More information about the Linuxppc-dev
mailing list