public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Bligh <mbligh@google.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Sujoy Gupta <sujoy@google.com>, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] fix compiler warning in drivers/media/video/video-buf.c
Date: Thu, 28 Sep 2006 10:31:58 -0700	[thread overview]
Message-ID: <451C070E.8080800@google.com> (raw)

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

Using a double cast to avoid compiler warnings when
building for PAE. Compiler doesn't like direct casting
of a 32 bit ptr to 64 bit integer.

From: Sujoy Gupta <sujoy@google.com>
Signed-off-by: Martin J. Bligh <mbligh@google.com>

[-- Attachment #2: 2.6.18-videobuf --]
[-- Type: text/plain, Size: 864 bytes --]

diff -aurpN -X /home/mbligh/.diff.exclude linux-2.6.18/drivers/media/video/video-buf.c 2.6.18-videobuf/drivers/media/video/video-buf.c
--- linux-2.6.18/drivers/media/video/video-buf.c	2006-06-17 18:49:35.000000000 -0700
+++ 2.6.18-videobuf/drivers/media/video/video-buf.c	2006-09-28 10:28:54.000000000 -0700
@@ -365,7 +365,12 @@ videobuf_iolock(struct videobuf_queue* q
 		if (NULL == fbuf)
 			return -EINVAL;
 		/* FIXME: need sanity checks for vb->boff */
-		bus   = (dma_addr_t)fbuf->base + vb->boff;
+		/*
+		 * Using a double cast to avoid compiler warnings when
+		 * building for PAE. Compiler doesn't like direct casting 
+		 * of a 32 bit ptr to 64 bit integer.
+		 */
+		bus   = (dma_addr_t)(size_t)fbuf->base + vb->boff;
 		pages = PAGE_ALIGN(vb->size) >> PAGE_SHIFT;
 		err = videobuf_dma_init_overlay(&vb->dma,PCI_DMA_FROMDEVICE,
 						bus, pages);

             reply	other threads:[~2006-09-28 17:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-28 17:31 Martin Bligh [this message]
2006-09-28 17:37 ` [PATCH] fix compiler warning in drivers/media/video/video-buf.c Nish Aravamudan
2006-09-28 17:51 ` Andrew Morton
2006-09-29 19:54   ` Mauro Carvalho Chehab
2006-09-29 19:59     ` Martin Bligh

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=451C070E.8080800@google.com \
    --to=mbligh@google.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sujoy@google.com \
    /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