Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751906AbdIUOSH (ORCPT ); Thu, 21 Sep 2017 10:18:07 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6536 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751675AbdIUOSF (ORCPT ); Thu, 21 Sep 2017 10:18:05 -0400 Date: Thu, 21 Sep 2017 15:17:44 +0100 From: Jonathan Cameron To: Wolfram Sang CC: , , , , , , Subject: Re: [RFC PATCH v5 6/6] i2c: dev: mark RDWR buffers as DMA_SAFE Message-ID: <20170921151744.000054d0@huawei.com> In-Reply-To: <20170920185956.13874-7-wsa+renesas@sang-engineering.com> References: <20170920185956.13874-1-wsa+renesas@sang-engineering.com> <20170920185956.13874-7-wsa+renesas@sang-engineering.com> Organization: Huawei X-Mailer: Claws Mail 3.15.0 (GTK+ 2.24.31; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.206.48.115] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.59C3CA17.00C9,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: f5cbe839c172e71a517e9372dd9b2a83 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 940 Lines: 31 On Wed, 20 Sep 2017 20:59:56 +0200 Wolfram Sang wrote: > Signed-off-by: Wolfram Sang Makes sense as do the other drivers. Feel free to add Reviewed-by: Jonathan Cameron to all of them (though they hardly took a lot of reviewing given how simple the patches were :) > --- > drivers/i2c/i2c-dev.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c > index 6f638bbc922db4..bbc7aadb4c899d 100644 > --- a/drivers/i2c/i2c-dev.c > +++ b/drivers/i2c/i2c-dev.c > @@ -280,6 +280,8 @@ static noinline int i2cdev_ioctl_rdwr(struct i2c_client *client, > res = PTR_ERR(rdwr_pa[i].buf); > break; > } > + /* memdup_user allocates with GFP_KERNEL, so DMA is ok */ > + rdwr_pa[i].flags |= I2C_M_DMA_SAFE; > > /* > * If the message length is received from the slave (similar