Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1807199imm; Thu, 9 Aug 2018 02:14:38 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxoxgHiNnmLk0pKD98Lzdoa5q5n0kNK6/Ua/0+F8S5N1uidCpiGAfHTPxXgvvcUAM5XBugP X-Received: by 2002:a63:1e08:: with SMTP id e8-v6mr1319042pge.281.1533806078083; Thu, 09 Aug 2018 02:14:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533806078; cv=none; d=google.com; s=arc-20160816; b=LkeqaXzIyHD6r2GkiTPqWQlzQllVZzFWbTDkveK5DhwjPg8wk4kwYawyRxC9iTgUg+ ZChpH8HkMLdQmBKgny1u5kpKnPJPogNwwk5ghqYU7k7D26UU7as9+fXkj8f/HGYkaM0c ByldPVnsV95dfXTUZFiTljLG77SlIl4h/3n86C8oPlj2cchoeSBszauDIXt/3Bg026U5 Rk5IxP+UHY1MajbiZVVzNproYuELdjU6ZvZxAkIz5pZorZncx8gw/yNASVBAE4jcsPpM asxn4GA2gP1gLjcImMTqWe+G7xjZrxTVcNrFYSHJUgBtGJ4bznMIc6ZMkV9mWrGlIYxu RCpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=2RFqAjd0YLLvmmnvr4kJYOhZfZ3Fd7ukixN5JSz0NNU=; b=uv7fIomVbrYC4euxj9Sodc+Vw03kxk3o4W8MtzO5GVR4SfsxofPK7C2m2/zws33VHj XEYyqjHY3/RGg6g0iJ6WLeCS78j2qHw+f4LGA8pSScLGBHLOcZpFoxK/63wtD+b6Xrm3 klFSuoV4SzhA4nJbp/K6qqEmGj2/wHmGIwqd95LwJDUDKFvWTVIpHeITlJOngvnVXJGi /yjVLH+ORvtGM1+wMhOXntH4FXw6618YMMu+LWK5r/IGzELJbHKK2mdMBkWVB4Gba0p8 uC1s6DAaj9ZY9cdDR7kUbyBCXRe//H/iO6yGxCbGA5n4A7NavqE4aL0pM/mB2BbPOc2r 3JKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q12-v6si6648626pgg.532.2018.08.09.02.14.22; Thu, 09 Aug 2018 02:14:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729848AbeHILh2 (ORCPT + 99 others); Thu, 9 Aug 2018 07:37:28 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:43178 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727371AbeHILh2 (ORCPT ); Thu, 9 Aug 2018 07:37:28 -0400 X-UUID: cf8ff1d5ed8242559352abdb832aaf96-20180809 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1545081374; Thu, 09 Aug 2018 17:13:28 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs03n2.mediatek.inc (172.21.101.182) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Thu, 9 Aug 2018 17:13:20 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Thu, 9 Aug 2018 17:13:20 +0800 Message-ID: <1533806000.3347.6.camel@mtksdaap41> Subject: Re: [PATCH v2 2/3] i2c: Add helper to ease DMA handling From: Yingjoe Chen To: Wolfram Sang CC: Jun Gao , , , , , , Date: Thu, 9 Aug 2018 17:13:20 +0800 In-Reply-To: <20180808205752.llowh4bvu2wkuhga@ninjato> References: <1530955795-17714-1-git-send-email-jun.gao@mediatek.com> <1530955795-17714-3-git-send-email-jun.gao@mediatek.com> <20180808205752.llowh4bvu2wkuhga@ninjato> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-08-08 at 22:57 +0200, Wolfram Sang wrote: > On Sat, Jul 07, 2018 at 05:29:54PM +0800, Jun Gao wrote: > > From: Jun Gao > > > > This function is needed by i2c_get_dma_safe_msg_buf() potentially. > > It is used to free DMA safe buffer when DMA operation fails. > > > > Signed-off-by: Jun Gao > > Right, we need something like this. This leaks in the sh_mobile driver, > too :( > > I am still thinking if there is a nice way to put this functionality > into i2c_release_dma_safe_msg_buf() itself somehow... Wolfram, I have second thought on these API now. Recently, we have saw similar issue for spi device driver. I believe the reason for these api is because some arch changed to can not do DMA on stack recently. Maybe we should have dma_mapping to bounce buffer like it bounce un-dma-able address for those arch? or we should have a common driver API for this, not just for i2c? Joe.C