From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932188AbcAYIpn (ORCPT ); Mon, 25 Jan 2016 03:45:43 -0500 Received: from eusmtp01.atmel.com ([212.144.249.242]:5567 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751117AbcAYIpj (ORCPT ); Mon, 25 Jan 2016 03:45:39 -0500 Subject: Re: [PATCH 2/3] net: macb: fix build warning To: Sudip Mukherjee References: <1453702389-601-1-git-send-email-sudipm.mukherjee@gmail.com> CC: , From: Nicolas Ferre Organization: atmel Message-ID: <56A5E0B0.4070802@atmel.com> Date: Mon, 25 Jan 2016 09:45:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1453702389-601-1-git-send-email-sudipm.mukherjee@gmail.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.161.30.18] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 25/01/2016 07:13, Sudip Mukherjee a écrit : > We are getting build warning about: > macb.c:2889:13: warning: 'tx_clk' may be used uninitialized in this function > macb.c:2888:11: warning: 'hclk' may be used uninitialized in this function > > In reality they are not used uninitialized as clk_init() will initialize > them, this patch will just silence the warning. > > Signed-off-by: Sudip Mukherjee Acked-by: Nicolas Ferre Thanks for your patch. Bye, > --- > drivers/net/ethernet/cadence/macb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c > index 9d9984a..50c9410 100644 > --- a/drivers/net/ethernet/cadence/macb.c > +++ b/drivers/net/ethernet/cadence/macb.c > @@ -2823,7 +2823,7 @@ static int macb_probe(struct platform_device *pdev) > struct device_node *np = pdev->dev.of_node; > struct device_node *phy_node; > const struct macb_config *macb_config = NULL; > - struct clk *pclk, *hclk, *tx_clk; > + struct clk *pclk, *hclk = NULL, *tx_clk = NULL; > unsigned int queue_mask, num_queues; > struct macb_platform_data *pdata; > bool native_io; > -- Nicolas Ferre