All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Reif <reif@earthlink.net>
To: sparclinux@vger.kernel.org
Subject: [PATCH] sparc: fix drivers/video/tcx.c warning
Date: Sat, 26 Apr 2008 03:22:28 +0000	[thread overview]
Message-ID: <48129FF4.7040701@earthlink.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

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.

Signed-off-by: Robert Reif <reif@earthlink.net>


[-- Attachment #2: tcx.diff.txt --]
[-- Type: text/plain, Size: 717 bytes --]

diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c
index e5a9ddb..fd94dfb 100644
--- a/drivers/video/tcx.c
+++ b/drivers/video/tcx.c
@@ -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;

             reply	other threads:[~2008-04-26  3:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-26  3:22 Robert Reif [this message]
2008-04-27  5:29 ` [PATCH] sparc: fix drivers/video/tcx.c warning David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48129FF4.7040701@earthlink.net \
    --to=reif@earthlink.net \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.