Skip to contentSkip to conversation

Constify & voidify get_property()

PATCH New Jeremy Kerr 1 participant 1 message Jul 12, 2006 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 14/16 Constify & voidify get_property()

Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later.

sata_svw changes

---

resend: rebase after benh's IRQ changes

 sata_svw.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/sata_svw.c +1 -1
Index: linux-2.6/drivers/scsi/sata_svw.c
===================================================================
@@ -268,7 +268,7 @@ static int k2_sata_proc_info(struct Scsi
 	/* Match it to a port node */
 	index = (ap == ap->host_set->ports[0]) ? 0 : 1;
 	for (np = np->child; np != NULL; np = np->sibling) {
-		u32 *reg = (u32 *)get_property(np, "reg", NULL);
+		const u32 *reg = get_property(np, "reg", NULL);
 		if (!reg)
 			continue;
 		if (index == *reg)