From patchwork Thu Mar 16 20:18:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Elfring X-Patchwork-Id: 1757983 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=web.de header.i=markus.elfring@web.de header.a=rsa-sha256 header.s=s29768273 header.b=tUxTjQkQ; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pczd9234Dz1yWp for ; Fri, 17 Mar 2023 07:39:09 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Pczd86W4Sz3cjN for ; Fri, 17 Mar 2023 07:39:08 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=web.de header.i=markus.elfring@web.de header.a=rsa-sha256 header.s=s29768273 header.b=tUxTjQkQ; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=web.de (client-ip=82.165.159.35; helo=mout-xforward.web.de; envelope-from=markus.elfring@web.de; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=web.de header.i=markus.elfring@web.de header.a=rsa-sha256 header.s=s29768273 header.b=tUxTjQkQ; dkim-atps=neutral Received: from mout-xforward.web.de (mout-xforward.web.de [82.165.159.35]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Pczcr1ZvKz2xWc for ; Fri, 17 Mar 2023 07:38:51 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1678999124; i=markus.elfring@web.de; bh=yRVNOUfOjIhUPee+fsAseodxf2S6OlCum8nReJFE93E=; h=X-UI-Sender-Class:Date:Subject:From:To:Cc:References:In-Reply-To; b=tUxTjQkQ7qmrjjTm3Aw0xyEHhXJrTo5Q0Jpe8B+Lls4cEwMQFkFEmvFIOWRaybNEw kD8G01jFz/Fqer7ZvR9zY3Tl8YyMUN25gjSzeisPRBC5F8JnOGE4sq0YLqo8+/xUJm fX0MYZZ8v0IlIIFctUjPBg/NiRScBCnZxCKcJq1Igi6GPslTuv3X4jBxLeCAuvk3mA pCzCHefJwFe1q+e4m/sPvcyIrKw4usgLkyxfwYacya0FRGUDxEkj4FQnJkVmt1N2na yh/IQTHJCNtcsom9Ky/kwEVRQUewYG87PIkW5yQuzB7LogY/ITYJvMupmQDRrjmoys rkv5CyzdE4Vag== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.81.83]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MQPZj-1ppjyW2Y3V-00MLmY; Thu, 16 Mar 2023 21:18:13 +0100 Message-ID: <349247ba-a539-2a36-0371-93a8f59d2975@web.de> Date: Thu, 16 Mar 2023 21:18:11 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: [PATCH 4/4] powerpc/4xx: Delete unnecessary variable initialisations in four functions Content-Language: en-GB From: Markus Elfring To: kernel-janitors@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Benjamin Herrenschmidt , Christophe Leroy , Josh Boyer , Michael Ellerman , Nicholas Piggin , Stefan Roese References: <72a7bfe2-6051-01b0-6c51-a0f8cc0c93a5@web.de> In-Reply-To: <72a7bfe2-6051-01b0-6c51-a0f8cc0c93a5@web.de> X-Provags-ID: V03:K1:v5sxuo7kDJ5P/yxyZ+V2WDJ7myWWQ9vYnkaF7vGJ9Yc7F09yr6H 1Nk7mYpmcD19JSqxExH7u01veIt3FvRCZZUh2fOvgQ8U2HviY84gTDL3SDZAzWVTFBJwETo ggL/fjNKn4DG/1/XkX8P+pQ6I+hTBhsHW3lEB2S2n22ktWlFqcTUq94vXV+P4HStmT90bN+ J8oXcs3FZrMOSTkstHQqQ== X-Spam-Flag: YES UI-OutboundReport: junk:10;M01:P0:wOhVZOuePdk=;FRPb3rW6EGgP/qav5XR+fbvmv3QEQ KxbJefXXdZPd50GcqK4okf/GhK9pCmbxNG1vRtsVknsagr+yPGfRLwa5IUvb1Vxb+tnK7GMfz zUB6bmgSHUdgl2QRQ1kp0G5vol8feM0hMfNzEMCni0oo4WNQsgUsxLKM/BPFk/feEc2SlPyR7 Cb7lYql3UKYQacvCP4g5Zj70QfdOjkXANfm7qyHz4roXRzPzO6pDQNPeoA3Djw2MEeid+WmcU noVmfvyales7VfC04LqG8EfHwFxPRZrLq8lN6g+KWKWUyXldPPhdjl+UNFNT9Unuazy/zxMQl +Mk2cgf6gtv1BQbcARf512RsK9zdy8OlMj3nFBxM1oNZN0FaCIXgtkY3Rb+987IWSrqhOQlok pB0zyAjAdS3BGuueCNFW3NVme6GdrXNHj/JzZkYu0B0hhJrthkq498VSPsTx28lx8dCM1j57g IL7jfjDM8PstGLNv4ADsHsPQy7P/W5SJbygxH0Vul6zKbnrNnwiFM4Mtr5VrZGZdC1qLn4XaG SQOzPcARcxnbASpHbJ0pt3ubcJw4Ix5izXPWIHxxkdjisyBt8gQ3/NLmSzSKequCgVX9BoiMP OMxC6RWVWlfSSn10LRZ0zRqtW6x4/awbA4DZwEYDSGb5KehwNaBibuHy36ws/wfDPMpDWJUye bbScx8tra3Bts49AsfXC+2wPojN2uzZgf4nYCUeXHAbhwKaoidInlB/JMI6hW2HBfjS1qTYUe RMfM4m7/HZE/u1ADzOlScDxJCx8fj5hTw9otKt7JzrgKyPd+VEwSxwf9ToHnoouwsFJ9x7R77 zpCpHzKHd8C9Bkv1Ts0xd1VStV9/kXBH3uiOHFpnR98w68i9779V/EpiiHcEknmT21fEaznir BZ+zKdxlh5O4ABfJAa1ebyrzYkv0oNMVULdz5ykgjoBS9nTtg5RWIcmrhuLma0PML3gOxfeX1 LGrS237xyx1iU8S66A8Y85TlE30Q5Ov1sH9ggrwfgDDRBo66isT19WDrSABHjHvuVmv86Z/5O ngRHyZnkhaAZbSgg= X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: LKML , cocci@inria.fr Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 ---  arch/powerpc/platforms/4xx/pci.c | 14 +++++++-------  1 file changed, 7 insertions(+), 7 deletions(-) -- 2.39.2 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;