public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
	Lucas Stach <l.stach@pengutronix.de>
Cc: "Gustavo Padovan" <gustavo@padovan.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	"Daniel Stone" <daniels@collabora.com>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	"Riley Andrews" <riandrews@android.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	"Arve Hjønnevåg" <arve@android.com>,
	"Daniel Vetter" <daniel.vetter@intel.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"John Harrison" <John.C.Harrison@intel.com>
Subject: Re: [PATCH v12 1/2] kernel.h: add u64_to_user_ptr()
Date: Tue, 26 Apr 2016 07:40:43 -0700	[thread overview]
Message-ID: <1461681643.2726.140.camel@perches.com> (raw)
In-Reply-To: <20160426142906.GI7857@joana>

On Tue, 2016-04-26 at 11:29 -0300, Gustavo Padovan wrote:
> 2016-04-26 Lucas Stach <l.stach@pengutronix.de>:
> > Am Donnerstag, den 21.04.2016, 12:38 -0300 schrieb Gustavo Padovan:
> > > From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > > 
> > > This function had copies in 3 different files. Unify them in kernel.h.
> > > 
> > > Cc: Joe Perches <joe@perches.com>
> > > Cc: Andrew Morton <akpm@linux-foundation.org>
> > > Cc: David Airlie <airlied@linux.ie>
> > > Cc: Daniel Vetter <daniel.vetter@intel.com>
> > > Cc: Rob Clark <robdclark@gmail.com>
> > > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > > 
> > Though I normally prefer static inline functions, I see the benefits of
> > using the macro form here.

An inline could still work
	static inline void __user *u64_to_user_ptr(u64 address)
	{
		return (void __user *)(uintptr_t)address;
	}
if the macro was
	#define u64_to_user_ptr(x)		\
	({					\
		typecheck(u64, x);		\
		(u64_to_user_ptr)(x);		\
	})

the parenthesis around the u64_to_user_ptr
in the macro should prevent expansion.

  reply	other threads:[~2016-04-26 14:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21 15:38 [PATCH v12 0/2] staging/android: Sync ABI rework Gustavo Padovan
2016-04-21 15:38 ` [PATCH v12 1/2] kernel.h: add u64_to_user_ptr() Gustavo Padovan
2016-04-22  8:31   ` Daniel Vetter
2016-04-22 14:36     ` Gustavo Padovan
2016-04-22 15:13   ` Rob Clark
2016-04-24 10:42     ` Maarten Lankhorst
2016-04-26  9:01   ` Lucas Stach
2016-04-26 14:29     ` Gustavo Padovan
2016-04-26 14:40       ` Joe Perches [this message]
2016-07-11  7:51         ` Tomas Winkler
2016-04-21 15:38 ` [PATCH v12 2/2] staging/android: refactor SYNC IOCTLs Gustavo Padovan

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=1461681643.2726.140.camel@perches.com \
    --to=joe@perches.com \
    --cc=John.C.Harrison@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=arve@android.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=daniels@collabora.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=gustavo@padovan.org \
    --cc=l.stach@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riandrews@android.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