All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: defxx: Fix warning of uninitialized variable
@ 2015-10-01  2:05 Deepa Dinamani
  2015-10-01  2:42 ` [Outreachy kernel] " Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Deepa Dinamani @ 2015-10-01  2:05 UTC (permalink / raw)
  To: outreachy-kernel

This adds explicit initialization of bar_start and bar_len
resource arrays in accordance with the compiler warning.

Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
---
 drivers/net/fddi/defxx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c
index 7f975a2..bd73948 100644
--- a/drivers/net/fddi/defxx.c
+++ b/drivers/net/fddi/defxx.c
@@ -439,6 +439,9 @@ static void dfx_get_bars(struct device *bdev,
 	int dfx_bus_tc = DFX_BUS_TC(bdev);
 	int dfx_use_mmio = DFX_MMIO || dfx_bus_tc;
 
+	memset(bar_start, 0, sizeof(resource_size_t) * 3);
+	memset(bar_len, 0, sizeof(resource_size_t) * 3);
+
 	if (dfx_bus_pci) {
 		int num = dfx_use_mmio ? 0 : 1;
 
-- 
1.9.1



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

* Re: [Outreachy kernel] [PATCH] net: defxx: Fix warning of uninitialized variable
  2015-10-01  2:05 [PATCH] net: defxx: Fix warning of uninitialized variable Deepa Dinamani
@ 2015-10-01  2:42 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2015-10-01  2:42 UTC (permalink / raw)
  To: Deepa Dinamani; +Cc: outreachy-kernel

On Wed, Sep 30, 2015 at 07:05:13PM -0700, Deepa Dinamani wrote:
> This adds explicit initialization of bar_start and bar_len
> resource arrays in accordance with the compiler warning.
> 
> Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
> ---
>  drivers/net/fddi/defxx.c | 3 +++

Note, we can't do anything with patches outside of drivers/staging/ in
the kernel tree for the Outreachy application process, sorry.  I'd
recommend staying away from other parts of the kernel right now, unless
the mentor you have contacted tells you otherwise.

thanks,

greg k-h


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

end of thread, other threads:[~2015-10-01  2:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01  2:05 [PATCH] net: defxx: Fix warning of uninitialized variable Deepa Dinamani
2015-10-01  2:42 ` [Outreachy kernel] " Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.