Skip to contentSkip to conversation

sparc: fix drivers/video/tcx.c warning

PATCH In review Robert Reif 2 participants 2 messages Apr 26, 2008 – Apr 27, 2008 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc: fix drivers/video/tcx.c warning

Fix compile warning:

CC drivers/video/tcx.o
drivers/video/tcx.c: In function ‘tcx_init_one’:
drivers/video/tcx.c:477: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 4 has type ‘resource_size_t’

This was the only sparc driver to use the resource directly in the printk so I changed it to physbase like the other drivers. Boot tested on SS4.

drivers/video/tcx.c +2 -2
index e5a9ddb..fd94dfb 100644
@@ -419,7 +419,7 @@ static int __devinit tcx_init_one(struct of_device *op)
 		par->mmap_map[6].size = SBUS_MMAP_EMPTY;
 	}
 
-	par->physbase = 0;
+	par->physbase = op->resource[0].start;
 	par->which_io = op->resource[0].flags & IORESOURCE_BITS;
 
 	for (i = 0; i < TCX_MMAP_ENTRIES; i++) {
@@ -473,7 +473,7 @@ static int __devinit tcx_init_one(struct of_device *op)
 	printk("%s: TCX at %lx:%lx, %s\n",
 	       dp->full_name,
 	       par->which_io,
-	       op->resource[0].start,
+	       par->physbase,
 	       par->lowdepth ? "8-bit only" : "24-bit depth");
 
 	return 0;
#1 lore raw

From: Robert Reif <[email protected]>
Date: Fri, 25 Apr 2008 23:22:28 -0400

Quoted 7 lines

Fix compile warning:

CC drivers/video/tcx.o
drivers/video/tcx.c: In function ‘tcx_init_one’:
drivers/video/tcx.c:477: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 4 has type ‘resource_size_t’

Quoted 5 lines

This was the only sparc driver to use the resource directly in the printk so I changed it to physbase like the other drivers. Boot tested on SS4.

Thanks a lot for this bug fix, patch applied!
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¬¥ªÜ–)îÇø§¶›¡Ü¨}©ž²Æ zÚ&j:+v‰¨þø¯ù®w¥þŠà2ŠÞ™¨è­Ú&¢)ß¡«a¶Úÿÿûàz¿äz¹Þ—ú+ƒùšŽŠÝ¢jÿŠwèþf