From patchwork Sat Jul 30 00:33:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iyappan Subramanian X-Patchwork-Id: 9252999 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EB4906075F for ; Sat, 30 Jul 2016 00:36:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA64C28442 for ; Sat, 30 Jul 2016 00:36:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEAC128446; Sat, 30 Jul 2016 00:36:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8E02228442 for ; Sat, 30 Jul 2016 00:36:11 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bTIE5-0006h7-Gk; Sat, 30 Jul 2016 00:34:01 +0000 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bTIDp-0006Yn-SL for linux-arm-kernel@lists.infradead.org; Sat, 30 Jul 2016 00:33:46 +0000 Received: by mail-pa0-x232.google.com with SMTP id pp5so35356046pac.3 for ; Fri, 29 Jul 2016 17:33:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7n1f0ekY8gv352s1Z+vNkWLPAyL9IJsfvRYhqIkVrCs=; b=oaY2QmVl3vr5Coe82nv3mRC1KBkpCVGj/JDWuNihLFKIu5D0bSxDKLvFY3yw552LXD 040+nmPbSO7JAsXMfSRftEabXCP+zGAquw2ftYvc69NFCLsBI0fRbdLvbjSdJI28dvh4 mF1GK0GE4jSaL5LmqXqcHzN61WlaiQoDbF6WU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7n1f0ekY8gv352s1Z+vNkWLPAyL9IJsfvRYhqIkVrCs=; b=LpL1X8SX/30A8ncZwGko/C4SsukzICd1U9kK7NnBzQ13SjogAgcVRsT7x6zrXowXvm nsNTdbuCcFnHvptZh5y1GZwewBrBbykvkiN1Q6i8nh/GGwLvOybLDnbeK76aedyiRZbE gLFWHke8IvRvZyEe0b+ufUWQj5rXS10aJ/vey6APzSm242A/ogFn/a+H0pU1otTgWt0R tD6pU5tEk9ea7CYD1tpfBbdkmiZPIsY/DwnLNzejqSCj8Ovtun0qSSzE/WgUPgXPjmGc /A1GbFTx8wCe66wQPUPafJVVvEK3GxA/ZTctabTvDRNTgEAqYH5QunfBsyDAcUe5TjDG Br+Q== X-Gm-Message-State: AEkoouvxB4lP0MCGH1Ll5JAIC2dWmzEx2tm921//eVv3y3VICMjVwQeR2CwttunzFVkMK5YN X-Received: by 10.66.41.133 with SMTP id f5mr74410881pal.70.1469838805138; Fri, 29 Jul 2016 17:33:25 -0700 (PDT) Received: from isubrama-dev.amcc.com ([206.80.4.98]) by smtp.gmail.com with ESMTPSA id o2sm27724157pfg.10.2016.07.29.17.33.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jul 2016 17:33:24 -0700 (PDT) From: Iyappan Subramanian To: davem@davemloft.net, netdev@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH net-next 01/10] drivers: net: xgene: Fix kbuild warning Date: Fri, 29 Jul 2016 17:33:54 -0700 Message-Id: <1469838843-19943-2-git-send-email-isubramanian@apm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469838843-19943-1-git-send-email-isubramanian@apm.com> References: <1469838843-19943-1-git-send-email-isubramanian@apm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160729_173345_987527_C2527821 X-CRM114-Status: GOOD ( 11.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: patches@apm.com, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, Iyappan Subramanian MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the following kbuild warning, when ACPI was not enabled. >> drivers/net/ethernet/apm/xgene/xgene_enet_hw.c:878:23: warning: 'phy_dev' may be used uninitialized in this function [-Wmaybe-uninitialized] phy_dev->advertising = phy_dev->supported; Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c index 7714b7d..b6bc6fa 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c @@ -776,15 +776,11 @@ int xgene_enet_phy_connect(struct net_device *ndev) netdev_err(ndev, "Could not connect to PHY\n"); return -ENODEV; } - - pdata->phy_dev = phy_dev; } else { #ifdef CONFIG_ACPI struct acpi_device *adev = acpi_phy_find_device(dev); if (adev) - pdata->phy_dev = adev->driver_data; - - phy_dev = pdata->phy_dev; + phy_dev = adev->driver_data; if (!phy_dev || phy_connect_direct(ndev, phy_dev, &xgene_enet_adjust_link, @@ -795,6 +791,7 @@ int xgene_enet_phy_connect(struct net_device *ndev) #endif } + pdata->phy_dev = phy_dev; pdata->phy_speed = SPEED_UNKNOWN; phy_dev->supported &= ~SUPPORTED_10baseT_Half & ~SUPPORTED_100baseT_Half &