linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] DAC960: fix some compiler warnings
@ 2012-02-10 14:54 Danny Kukawka
  2012-02-10 14:54 ` [PATCH 2/2] DAC960: fix -Wuninitialized warning Danny Kukawka
  0 siblings, 1 reply; 2+ messages in thread
From: Danny Kukawka @ 2012-02-10 14:54 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Danny Kukawka, Lucas De Marchi, Jens Axboe, linux-kernel

Two patches for DAC960. The first one is a resend from 26.01.2012.

Danny Kukawka (2):
  DAC960: fix DAC960_V2_IOCTL_Opcode_T -Wenum-compare warning
  DAC960: fix -Wuninitialized warning

 drivers/block/DAC960.c                     |   18 ++-
 1 files changed, 10 insertions(+), 8 deletions(-)

-- 
1.7.7.3


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

* [PATCH 2/2] DAC960: fix -Wuninitialized warning
  2012-02-10 14:54 [PATCH 0/2] DAC960: fix some compiler warnings Danny Kukawka
@ 2012-02-10 14:54 ` Danny Kukawka
  0 siblings, 0 replies; 2+ messages in thread
From: Danny Kukawka @ 2012-02-10 14:54 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Danny Kukawka, Lucas De Marchi, Jens Axboe, linux-kernel

Set CommandMailbox with memset before use it. Fix for:

drivers/block/DAC960.c: In function ‘DAC960_V1_EnableMemoryMailboxInterface’:
arch/x86/include/asm/io.h:61:1: warning: ‘CommandMailbox.Bytes[12]’
 may be used uninitialized in this function [-Wuninitialized]
drivers/block/DAC960.c:1175:30: note: ‘CommandMailbox.Bytes[12]’
 was declared here

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
 drivers/block/DAC960.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index 66b8729..40000e2 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -1177,7 +1177,8 @@ static bool DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T
   int TimeoutCounter;
   int i;
 
-  
+  memset(&CommandMailbox, 0, sizeof(DAC960_V1_CommandMailbox_T));
+
   if (pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32)))
 	return DAC960_Failure(Controller, "DMA mask out of range");
   Controller->BounceBufferLimit = DMA_BIT_MASK(32);
-- 
1.7.7.3


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

end of thread, other threads:[~2012-02-10 14:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-10 14:54 [PATCH 0/2] DAC960: fix some compiler warnings Danny Kukawka
2012-02-10 14:54 ` [PATCH 2/2] DAC960: fix -Wuninitialized warning Danny Kukawka

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