瀏覽代碼

[POWERPC] sata_svw: 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

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Jeremy Kerr 19 年之前
父節點
當前提交
af5f92d881
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/scsi/sata_svw.c

+ 1 - 1
drivers/scsi/sata_svw.c

@@ -268,7 +268,7 @@ static int k2_sata_proc_info(struct Scsi_Host *shost, char *page, char **start,
 	/* Match it to a port node */
 	/* Match it to a port node */
 	index = (ap == ap->host_set->ports[0]) ? 0 : 1;
 	index = (ap == ap->host_set->ports[0]) ? 0 : 1;
 	for (np = np->child; np != NULL; np = np->sibling) {
 	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)
 		if (!reg)
 			continue;
 			continue;
 		if (index == *reg)
 		if (index == *reg)