Skip to contentSkip to conversation

SATA: use NULL for ptrs

PATCH New Randy Dunlap 1 participant 1 message Feb 14, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SATA: use NULL for ptrs

From: Randy Dunlap <[email protected]>

Fix sparse warnings in SATA:
drivers/ata/sata_sil.c:342:9: warning: Using plain integer as NULL pointer drivers/ata/sata_mv.c:2056:55: warning: Using plain integer as NULL pointer

---
 drivers/ata/sata_mv.c  |    2 +-
 drivers/ata/sata_sil.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/ata/sata_mv.c +1 -1
@@ -2053,7 +2053,7 @@ static void mv_port_init(struct ata_iopo
 	port->altstatus_addr = port->ctl_addr = shd_base + SHD_CTL_AST_OFS;
 
 	/* unused: */
-	port->cmd_addr = port->bmdma_addr = port->scr_addr = 0;
+	port->cmd_addr = port->bmdma_addr = port->scr_addr = NULL;
 
 	/* Clear any currently outstanding port interrupt conditions */
 	serr_ofs = mv_scr_offset(SCR_ERROR);
drivers/ata/sata_sil.c +1 -1
@@ -339,7 +339,7 @@ static inline void __iomem *sil_scr_addr
 		break;
 	}
 
-	return 0;
+	return NULL;
 }
 
 static u32 sil_scr_read (struct ata_port *ap, unsigned int sc_reg)