[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+i0qc5XOoG6BskcpApxHFWD65gPajbcLHjbCvbgrqV9UhT8iw@mail.gmail.com>
Date: Mon, 11 Jul 2016 10:51:58 +0300
From: Tomas Winkler <tomasw@...il.com>
To: Joe Perches <joe@...ches.com>
Cc: Gustavo Padovan <gustavo.padovan@...labora.co.uk>,
Lucas Stach <l.stach@...gutronix.de>,
Gustavo Padovan <gustavo@...ovan.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
driverdevel <devel@...verdev.osuosl.org>,
Daniel Stone <daniels@...labora.com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Riley Andrews <riandrews@...roid.com>,
dri-devel@...ts.freedesktop.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Arve Hjønnevåg <arve@...roid.com>,
Daniel Vetter <daniel.vetter@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
John Harrison <John.C.Harrison@...el.com>
Subject: Re: [PATCH v12 1/2] kernel.h: add u64_to_user_ptr()
> > > 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.
>
sparse is throwing 'warning: dereference of noderef expression' on
this macro now.
Any clues what need to be fixed
Thanks
Tomas
Powered by blists - more mailing lists