linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: linux-next: build failure after merge of the omap_dss2 tree
Date: Fri, 26 Apr 2013 08:31:03 +0300	[thread overview]
Message-ID: <517A1117.7000501@ti.com> (raw)
In-Reply-To: <20130426151027.db71ddf367c85fe0682cbff6@canb.auug.org.au>

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

On 2013-04-26 08:10, Stephen Rothwell wrote:
> Hi Tomi,
> 
> After merging the omap_dss2 tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> drivers/video/ps3fb.c: In function 'ps3fb_mmap':
> drivers/video/ps3fb.c:710:2: error: implicit declaration of function 'vm_ioremap_memory' [-Werror=implicit-function-declaration]
> drivers/video/ps3fb.c:712:2: error: 'offset' undeclared (first use in this function)
> 
> Caused by commit 6ea19860d6c5 ("fbdev/ps3fb: use vm_iomap_memory()").
> 
> I have used the omap_dss2 tree from next-20130424 for today.
> 

Thanks. Updated patch below. I couldn't right away find where to download a
ppc64 toolchain, so not compile tested...

 Tomi


From 11bd5933abe033fb7a3a0d1f1bd2cb4b6df8143f Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date: Thu, 18 Apr 2013 07:52:42 +0300
Subject: [PATCH] fbdev/ps3fb: use vm_iomap_memory()

Use vm_iomap_memory() instead of [io_]remap_pfn_range().
vm_iomap_memory() gives us much simpler API to map memory to userspace,
and reduces possibilities for bugs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
 drivers/video/ps3fb.c |   18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c
index 920c27b..d9f08c6 100644
--- a/drivers/video/ps3fb.c
+++ b/drivers/video/ps3fb.c
@@ -705,21 +705,15 @@ static int ps3fb_pan_display(struct fb_var_screeninfo *var,
 
 static int ps3fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
 {
-	unsigned long size, offset;
+	int r;
 
-	size = vma->vm_end - vma->vm_start;
-	offset = vma->vm_pgoff << PAGE_SHIFT;
-	if (offset + size > info->fix.smem_len)
-		return -EINVAL;
-
-	offset += info->fix.smem_start;
-	if (remap_pfn_range(vma, vma->vm_start, offset >> PAGE_SHIFT,
-			    size, vma->vm_page_prot))
-		return -EAGAIN;
+	r = vm_iomap_memory(vma, info->fix.smem_start, info->fix.smem_len);
 
 	dev_dbg(info->device, "ps3fb: mmap framebuffer P(%lx)->V(%lx)\n",
-		offset, vma->vm_start);
-	return 0;
+		info->fix.smem_start + vma->vm_pgoff << PAGE_SHIFT,
+		vma->vm_start);
+
+	return r;
 }
 
     /*
-- 
1.7.10.4




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 899 bytes --]

  reply	other threads:[~2013-04-26  5:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26  5:10 linux-next: build failure after merge of the omap_dss2 tree Stephen Rothwell
2013-04-26  5:31 ` Tomi Valkeinen [this message]
2013-04-26  5:56   ` Stephen Rothwell
2013-04-26  6:57     ` Tomi Valkeinen
  -- strict thread matches above, loose matches on Subject: below --
2014-03-04  3:35 Stephen Rothwell
2014-03-04  6:58 ` Tomi Valkeinen
2014-03-05  3:32 Stephen Rothwell
2014-03-05  7:01 ` Tomi Valkeinen
2014-11-17  8:09 Stephen Rothwell
2014-11-18 14:53 ` Tomi Valkeinen
2014-11-18 15:07   ` David Herrmann
2014-11-25 11:00     ` Tomi Valkeinen
2014-11-25 11:20       ` Hans de Goede
2014-11-25 12:11         ` Tomi Valkeinen
2014-11-25 22:07           ` Stephen Rothwell
2014-11-26  8:16             ` Tomi Valkeinen

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=517A1117.7000501@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).