* [PATCH 18/20] [powerpc,sata_svw] Constify & voidify get_property()
@ 2006-07-04 6:47 Jeremy Kerr
0 siblings, 0 replies; 2+ messages in thread
From: Jeremy Kerr @ 2006-07-04 6:47 UTC (permalink / raw)
To: linuxppc-dev; +Cc: linux-ide
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>
---
sata_svw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/drivers/scsi/sata_svw.c
===================================================================
--- linux-2.6.orig/drivers/scsi/sata_svw.c
+++ 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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 18/20] [powerpc,sata_svw] Constify & voidify get_property()
@ 2006-07-04 6:47 Jeremy Kerr
0 siblings, 0 replies; 2+ messages in thread
From: Jeremy Kerr @ 2006-07-04 6:47 UTC (permalink / raw)
To: linuxppc-dev; +Cc: linux-ide
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>
---
sata_svw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/drivers/scsi/sata_svw.c
===================================================================
--- linux-2.6.orig/drivers/scsi/sata_svw.c
+++ 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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-07-04 6:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-04 6:47 [PATCH 18/20] [powerpc,sata_svw] Constify & voidify get_property() Jeremy Kerr
-- strict thread matches above, loose matches on Subject: below --
2006-07-04 6:47 Jeremy Kerr
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.