[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170911142700.GK3405@mtr-leonro.local>
Date: Mon, 11 Sep 2017 17:27:00 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Doug Ledford <dledford@...hat.com>,
Sean Hefty <sean.hefty@...el.com>,
Hal Rosenstock <hal.rosenstock@...il.com>,
Christoph Hellwig <hch@...radead.org>,
Matan Barak <matanb@...lanox.com>,
Yishai Hadas <yishaih@...lanox.com>,
Moses Reuben <mosesr@...lanox.com>, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] IB/uverbs: clean up INIT_UDATA() macro usage
On Wed, Sep 06, 2017 at 11:34:26PM +0200, Arnd Bergmann wrote:
> After changing INIT_UDATA_BUF_OR_NULL() to an inline function,
> this does the same change to INIT_UDATA for consistency.
> I'm keeping it separate as this part is much larger and
> we wouldn't want to backport this to stable kernels if we
> ever want to address the gcc warnings by backporting the
> first patch.
>
> Again, using an inline function gives us better type
> safety here among other issues with macros. I'm using
> u64_to_user_ptr() to convert the user pointer to simplify
> the logic rather than adding lots of new type casts.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> drivers/infiniband/core/uverbs.h | 22 +++---
> drivers/infiniband/core/uverbs_cmd.c | 125 +++++++++++++++--------------------
> 2 files changed, 67 insertions(+), 80 deletions(-)
>
Thanks, for doing it and for spotting light on u64_to_user_ptr().
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists