Skip to contentSkip to conversation

: ata: fix unused variable warning in sil_host_intr()

PATCH In review Prarit Bhargava 2 participants 3 messages May 27, 2010 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : ata: fix unused variable warning in sil_host_intr()

Warning seen with 'make -j24 CONFIG_DEBUG_SECTION_MISMATCH=y':

drivers/ata/sata_sil.c: In function ‘sil_host_intr’:
drivers/ata/sata_sil.c:442: error: ‘serror’ may be used uninitialized in this function

drivers/ata/sata_sil.c +1 -1
index 3cb69d5..d7c616c 100644
@@ -439,7 +439,7 @@ static void sil_host_intr(struct ata_port *ap, u32 bmdma2)
 	u8 status;
 
 	if (unlikely(bmdma2 & SIL_DMA_SATA_IRQ)) {
-		u32 serror;
+		u32 uninitialized_var(serror);
 
 		/* SIEN doesn't mask SATA IRQs on some 3112s.  Those
 		 * controllers continue to assert IRQ as long as
#1 lore raw

Hello.

Prarit Bhargava wrote:

s/unused/uninitialized/ in the subject. Unused variable is a
different thing.

Quoted 1 line

Warning seen with 'make -j24 CONFIG_DEBUG_SECTION_MISMATCH=y':

I don't think any of these matters here...

Quoted 4 lines

drivers/ata/sata_sil.c: In function ‘sil_host_intr’:
drivers/ata/sata_sil.c:442: error: ‘serror’ may be used uninitialized in this function

MBR, Sergei

#2 lore raw
Quoted 6 lines

Hello.

Prarit Bhargava wrote:

s/unused/uninitialized/ in the subject. Unused variable is a
different thing.

Oops. Sorry for the typo.

P.

Quoted 12 lines
Quoted 2 lines

Warning seen with 'make -j24 CONFIG_DEBUG_SECTION_MISMATCH=y':

I don't think any of these matters here...

Quoted 4 lines

drivers/ata/sata_sil.c: In function ‘sil_host_intr’:
drivers/ata/sata_sil.c:442: error: ‘serror’ may be used uninitialized in this function

MBR, Sergei