All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Fix a bogus cast in execbuffer2
Date: Fri, 22 Feb 2013 13:47:49 +0000	[thread overview]
Message-ID: <20130222134749.GC23278@cantiga.alporthouse.com> (raw)
In-Reply-To: <1361540542-16515-1-git-send-email-ville.syrjala@linux.intel.com>

On Fri, Feb 22, 2013 at 03:42:22PM +0200, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The pointer passed to copy_from_user() was cast to the wrong type. This
> doesn't cause any issues, but it confuses the reader. Just cast to
> void * like we do for the other execbuffer kernel<->user copies.

  static inline void __user *to_user_ptr(u64 address)
  {
	return (void __user *)(uintptr_t)address;
  }

That should tidy up this repeated idiom.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

      reply	other threads:[~2013-02-22 13:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-22 13:42 [PATCH] drm/i915: Fix a bogus cast in execbuffer2 ville.syrjala
2013-02-22 13:47 ` Chris Wilson [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=20130222134749.GC23278@cantiga.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.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 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.