netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] net: macb: fix build warning
@ 2016-01-25  6:13 Sudip Mukherjee
  2016-01-25  8:45 ` Nicolas Ferre
  2016-01-25 18:52 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2016-01-25  6:13 UTC (permalink / raw)
  To: Nicolas Ferre; +Cc: linux-kernel, netdev, Sudip Mukherjee

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 <sudip@vectorindia.org>
---
 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;
-- 
1.9.1

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

* Re: [PATCH 2/3] net: macb: fix build warning
  2016-01-25  6:13 [PATCH 2/3] net: macb: fix build warning Sudip Mukherjee
@ 2016-01-25  8:45 ` Nicolas Ferre
  2016-01-25 18:52 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Ferre @ 2016-01-25  8:45 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: linux-kernel, netdev

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 <sudip@vectorindia.org>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

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

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

* Re: [PATCH 2/3] net: macb: fix build warning
  2016-01-25  6:13 [PATCH 2/3] net: macb: fix build warning Sudip Mukherjee
  2016-01-25  8:45 ` Nicolas Ferre
@ 2016-01-25 18:52 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-01-25 18:52 UTC (permalink / raw)
  To: sudipm.mukherjee; +Cc: nicolas.ferre, linux-kernel, netdev

From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Date: Mon, 25 Jan 2016 11:43:09 +0530

> 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 <sudip@vectorindia.org>

Applied.

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

end of thread, other threads:[~2016-01-25 18:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-25  6:13 [PATCH 2/3] net: macb: fix build warning Sudip Mukherjee
2016-01-25  8:45 ` Nicolas Ferre
2016-01-25 18:52 ` David Miller

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).