Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1555771imm; Sun, 8 Jul 2018 05:48:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfQIRisS3uOfNRKAztHqWgmaKNCyMiqbCZBe6PC7oAvNy3aGYtW+RMgOTyaeaIXUoyBy6wF X-Received: by 2002:a63:7f16:: with SMTP id a22-v6mr15442403pgd.255.1531054081654; Sun, 08 Jul 2018 05:48:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531054081; cv=none; d=google.com; s=arc-20160816; b=oXoYLkRH8Ork5bxwjg9E+q+cYHbRvETu45mxbnlYJYONXDs9zuVU6dJXVtlEF22MyT ay8nsndmWBeAXCiXZaH9U6S180r5ekCjW2dUUlAHdJg7tfq8yo13Wo4qNeMgMeRQdcO5 kbwp6iTjCsTu+nDaaWTMTwxaqIDBa8BcXjSh56jdBFYyeFWH5UaK9NrVMT/AzEkVCy9T kIv6w8VpsokgXXD1GzJzL4WdelCvFXBw1i1A23m9gLEHOacxdMi4xebYtmNCUdwRglYV pqbBdAYeXhAIdE4IOwh+lzqgmiFngYnKx40AAn1gb740TjMu3pHe8e45uz5dVf4gnQWo Pw5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :references:cc:to:from:subject:dkim-signature :arc-authentication-results; bh=P4Jxwqzd5A0ahk0Uz1p1Qh1gIKpuJx9cviQkR9Assm8=; b=guWP8fyDOCrefLehcXgNtB/M2K6kL6x2os6lH/Zud0u2/aFL+T7rMqxXVKbj7op1Y3 0plqg6V0tOPeCajoMSdBNfk4xopnRKnePYmNxhdcbd+ihylzHGJbAWHuoXudWvOoadrC jkAv1Glf6zpKRashrYeszXh8NKWA8HAWSqFkGmMpx+yizcc+d8d+Q3oFNZxevcX0+3Zs hNS7NZsDYGMhGCVBxaXHih9QeNUp4dJxrNniHdC132Q9FOz+kGXiLNCNcmm19kJ7UmV0 WYZv8CG6L2N7NSlIrvbW0IPsthWpxFG/lhxhQsI6dbIMG396pasX4PVt4qF4sPHgfX0I bidw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@axentia.se header.s=selector1 header.b=h4D0fMpG; 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 m13-v6si12394963pls.70.2018.07.08.05.47.47; Sun, 08 Jul 2018 05:48:01 -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; dkim=pass header.i=@axentia.se header.s=selector1 header.b=h4D0fMpG; 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 S1754262AbeGHMqx (ORCPT + 99 others); Sun, 8 Jul 2018 08:46:53 -0400 Received: from mail-eopbgr70103.outbound.protection.outlook.com ([40.107.7.103]:42726 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932380AbeGHMqu (ORCPT ); Sun, 8 Jul 2018 08:46:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentia.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P4Jxwqzd5A0ahk0Uz1p1Qh1gIKpuJx9cviQkR9Assm8=; b=h4D0fMpGqbDdNDckeDe/GqwhKYYpVVWczbXPjj+SVQE5dzjgSd75A6WktVahHAV8RFCFw5DLNUEUNMyGc79O7/Mc4GrD8sWgbhMbFM5XK0RUtjygdzRm1zxh0lSsYBfl6lOR4/+k2xWlKV4eYYaTsV13dpQ0SC0y9crw0JzGMSw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; Received: from [192.168.13.3] (85.226.244.23) by AM5PR0201MB2449.eurprd02.prod.outlook.com (2603:10a6:203:34::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.21; Sun, 8 Jul 2018 12:46:47 +0000 Subject: Re: [PATCH v2 2/3] i2c: Add helper to ease DMA handling From: Peter Rosin To: Jun Gao , Wolfram Sang Cc: srv_heupstream@mediatek.com, devicetree@vger.kernel.org, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org References: <1530955795-17714-1-git-send-email-jun.gao@mediatek.com> <1530955795-17714-3-git-send-email-jun.gao@mediatek.com> Organization: Axentia Technologies AB Message-ID: Date: Sun, 8 Jul 2018 14:46:42 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: HE1PR05CA0341.eurprd05.prod.outlook.com (2603:10a6:7:92::36) To AM5PR0201MB2449.eurprd02.prod.outlook.com (2603:10a6:203:34::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 81fe1bd3-220c-41b9-570a-08d5e4d0de38 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652040)(7021125)(8989117)(5600053)(711020)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020);SRVR:AM5PR0201MB2449; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2449;3:vpauRVMlfhVBqvz5/b50yASbgQbq3uKoh0UrFSSJIx/Cs7dnkCMreNav9LUfsqE6q+DMJkgz7W7sUVr0woo8U5YreuoBzEJk4FsnAsVCKDWihA4g8vMXJkuS+5rV8HiVUnAES34wQwP+E1bpp1rvRair1LPiAhJlCch3NOHOlcdeLvHRiWbqZAip1K5lhQDbQDOxeqN5u8LCKw3RwvLewGQbRFch+zKoIKfBTmionku8B9nsmVxerQxNupkNeJkq;25:JEiOR+HYDgyfM+YqWM+F4NXoaFLWsg+R+jYRZIglk/OM5qXH0DqezjyKs1MSYxYQZqZjxSYCzB5/Z7YYHoTqo6kKzIDTf9SMJjZp0s6VwikA4bc4wFuwNqQaLcM1+UgBuAG8mwacSyTFYE6IeSuvbktZv6YDjJ2BIJJslWpy7WD2WdmfzmWoEr4Yn+YW+H7mch0Etpsz6bY8WWEj/R6F0sfl2T8d+ZFhsYSJkRrYnzMh8amVEl+oUoGuen9jT9dpD1WxxpnVxeV9KSEI2xRRp1eg/KzNLGlLxv0G/2zf4SvlvykTiPVVzIRC2zBIsJLgjQTA4PfrRuSPsMSwZwEZdg==;31:ZUCIdMneP4cdNPNNB/NYbCoj7SeyER2gU/ChBnU6UjGw9iFkUSW3BMYjs34D5M6jmhPR3wbK9wvtPbwttGcDcWngzzLQOxUOa8ZpJmiHTDMxfjLIcqAhaA5YmuTFBVzjcwMhkBKlOP3awdit6XKrDV496ARZfMQifCMBF8htcRPr3veIdP8UzN71YVvvA/5NWkd1b2/JGnTgp1Ax1xVqb++GOMfciA5xp7V3CkfxtAg= X-MS-TrafficTypeDiagnostic: AM5PR0201MB2449: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(2016111802025)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6043046)(6072148)(201708071742011)(7699016);SRVR:AM5PR0201MB2449;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0201MB2449; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2449;4:Q3JZ4I8LbXyxsW5g6iRY9R04B0gXHGiy2rEa5ThGTvVV7B0DhFFeK2GSYBEFHsi+BrthmVf4Veqf8VGHLiUXLJqM7eDLNwzLTJPFWzdDCWb6OPcuiOhvV8ARhzYTIuTSh8Og2kKpEJcV+yWucS4Zp3h4YUehHOHbx4zHVSArCUxaxGocNcWOU5dkKrmKEZy4BFY3HJX09EIK5eADmEiNmf+anQiVa2v7ycm1pSBH8vP3B6k3dcpoLgw1jVuzpvVd8iGp6bTpmaHd32v2vKU1HA== X-Forefront-PRVS: 0727122FC6 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(136003)(396003)(376002)(366004)(39830400003)(346002)(199004)(189003)(2616005)(476003)(50466002)(230700001)(3846002)(6116002)(316002)(58126008)(105586002)(6246003)(446003)(16576012)(2906002)(110136005)(52116002)(2486003)(36916002)(52146003)(23676004)(97736004)(11346002)(117156002)(956004)(16526019)(478600001)(31686004)(3260700006)(25786009)(229853002)(186003)(486006)(26005)(386003)(77096007)(76176011)(53546011)(4326008)(106356001)(31696002)(53936002)(6666003)(6486002)(68736007)(74482002)(8936002)(8676002)(65826007)(305945005)(7736002)(81156014)(65956001)(66066001)(81166006)(5660300001)(86362001)(36756003)(64126003)(47776003)(65806001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:AM5PR0201MB2449;H:[192.168.13.3];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjAyMDFNQjI0NDk7MjM6NG9nMWI0bVVvdGNSSVEzVldKUys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LOeen+e7IVOSYCO0YRipcbmbJG7osF0bgpHitHs3bd9bI8ZVRLZbx+nWod+pScwJ8gfOdQ++wzyZMqZTURwBcOf9KT4zFaoW7fB25M8SkOFgwgeSg==;5:0/L/FLdyKCHY+ESFuG/sTDejt7vlZeutCKAZqlxc+WlihexjUhUOVyNL1Cfh56GHxyJ1gYnvoESgk3z/6P32LtvPs0yuUUp84gBcwxxcWQXvy5BOGEQJZQEGj2xVvvj8NVkcf/rbli+4FDdPjhA06ht9ubBHLhw4jSQt6M9ByX0=;24:886jizMwhk1XPKP8GgP8N6wAYw9LjoXvL5Ixdo48MyUP9ODfAvToELWQfPVakdjaD0C+Ts6F8bJuX1spAbEkYwf1wVxD0r3ASD8i1XanoMc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2449;7:b6J7bXDVEOr0Rl4lz94Wpr/Ye+LJP4XklqhzAjZ4REKYHs7Q7HvODH3IPdPahvvSohCrxCXTbs0KewdFA4baCHpbPdCIZepnncU8Q6IAiquoh18ft9hIl2e/9Gfznw0BoEf7IP9jkmf6mRo0e4VbnYiDOli9vvOmdugQcbyOrXrCTQG/gXMmwZhElA1Dj9LemQwQPxwkYaed08XJ/18laARXsNY0i76d3T14wW921omhiA9q9klJwnb9tySYoTaa X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2018 12:46:47.0093 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 81fe1bd3-220c-41b9-570a-08d5e4d0de38 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0201MB2449 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-07-08 13:58, Peter Rosin wrote: > On 2018-07-07 11:29, 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 >> --- >> drivers/i2c/i2c-core-base.c | 14 ++++++++++++++ >> include/linux/i2c.h | 1 + >> 2 files changed, 15 insertions(+) >> >> diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c >> index 31d16ad..2b518ea 100644 >> --- a/drivers/i2c/i2c-core-base.c >> +++ b/drivers/i2c/i2c-core-base.c >> @@ -2288,6 +2288,20 @@ void i2c_release_dma_safe_msg_buf(struct i2c_msg *msg, u8 *buf) >> } >> EXPORT_SYMBOL_GPL(i2c_release_dma_safe_msg_buf); >> >> +/** >> + * i2c_free_dma_safe_msg_buf - free DMA safe buffer >> + * @msg: the message related to DMA safe buffer >> + * @buf: the buffer obtained from i2c_get_dma_safe_msg_buf(). May be NULL. >> + */ >> +void i2c_free_dma_safe_msg_buf(struct i2c_msg *msg, u8 *buf) >> +{ >> + if (!buf || buf == msg->buf) >> + return; >> + >> + kfree(buf); > > Considering that the i2c-core-smbus.c file does the following for its > DMA safe buffers... > > static void i2c_smbus_try_get_dmabuf(struct i2c_msg *msg, u8 init_val) > { > bool is_read = msg->flags & I2C_M_RD; > unsigned char *dma_buf; > > dma_buf = kzalloc(I2C_SMBUS_BLOCK_MAX + (is_read ? 2 : 3), GFP_KERNEL); > if (!dma_buf) > return; > > msg->buf = dma_buf; > msg->flags |= I2C_M_DMA_SAFE; > > if (init_val) > msg->buf[0] = init_val; > } > > ...I do not think your variant of i2c_release_dma_safe_msg_buf is > appropriate for the i2c-core-base.c file. It's simply not possible to have > central knowledge of the rules for when to free the buffer, and encoding one > set of rules is only confusing (when there are more than one set of rules). > I suggest that you make your variant driver specific. Ignore me. Your i2c_free_dma_safe_msg_buf is of course compatible with the existing i2c_smbus_try_get_dmabuf. Sorry for the noise. Cheers, Peter ( However, the naming of these two functions are not really consistent... ) > Cheers, > Peter > >> +} >> +EXPORT_SYMBOL_GPL(i2c_free_dma_safe_msg_buf); >> + >> MODULE_AUTHOR("Simon G. Vogl "); >> MODULE_DESCRIPTION("I2C-Bus main module"); >> MODULE_LICENSE("GPL"); >> diff --git a/include/linux/i2c.h b/include/linux/i2c.h >> index 254cd34..6d62f93 100644 >> --- a/include/linux/i2c.h >> +++ b/include/linux/i2c.h >> @@ -860,6 +860,7 @@ static inline u8 i2c_8bit_addr_from_msg(const struct i2c_msg *msg) >> >> u8 *i2c_get_dma_safe_msg_buf(struct i2c_msg *msg, unsigned int threshold); >> void i2c_release_dma_safe_msg_buf(struct i2c_msg *msg, u8 *buf); >> +void i2c_free_dma_safe_msg_buf(struct i2c_msg *msg, u8 *buf); >> >> int i2c_handle_smbus_host_notify(struct i2c_adapter *adap, unsigned short addr); >> /** >> >