Linux-Next Archive on lore.kernel.org
 help / color / Atom feed
From: Pauli Nieminen <suokkos@gmail.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Dave Airlie <airlied@linux.ie>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.sourceforge.net
Subject: [PATCH] drm/radeon: Fix printf type warning in 64bit system.
Date: Mon,  1 Mar 2010 11:37:11 +0200
Message-ID: <1267436231-5524-1-git-send-email-suokkos@gmail.com> (raw)
In-Reply-To: <20100301181452.9efa3661.sfr@canb.auug.org.au>

Type of iterator was promoted to unsigned long in 64bit systems.

*header is small structure so it is alwas safe to cast return value
of sizeof operator to int.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
---
 drivers/gpu/drm/radeon/r300_cmdbuf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r300_cmdbuf.c b/drivers/gpu/drm/radeon/r300_cmdbuf.c
index 18d3ff8..27930fc 100644
--- a/drivers/gpu/drm/radeon/r300_cmdbuf.c
+++ b/drivers/gpu/drm/radeon/r300_cmdbuf.c
@@ -1148,7 +1148,7 @@ int r300_do_cp_cmdbuf(struct drm_device *dev,
 		default:
 			DRM_ERROR("bad cmd_type %i at byte %d\n",
 				  header->header.cmd_type,
-				  cmdbuf->buffer->iterator - sizeof(*header));
+				  cmdbuf->buffer->iterator - (int)sizeof(*header));
 			ret = -EINVAL;
 			goto cleanup;
 		}
-- 
1.6.3.3


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-01  7:14 linux-next: build warning after merge of the drm tree Stephen Rothwell
2010-03-01  9:37 ` Pauli Nieminen [this message]

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=1267436231-5524-1-git-send-email-suokkos@gmail.com \
    --to=suokkos@gmail.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.sourceforge.net \
    --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

Linux-Next Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
		linux-next@vger.kernel.org
	public-inbox-index linux-next

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git