Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1520565imm; Sun, 8 Jul 2018 04:59:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcwJwvaGFwQQgUeOt0MFpSZ/iMzW21a2fxzW0EpVaE8bEjAYT3D09WI58Y3KkL4NrID9DrD X-Received: by 2002:a62:4ece:: with SMTP id c197-v6mr17467928pfb.240.1531051141791; Sun, 08 Jul 2018 04:59:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531051141; cv=none; d=google.com; s=arc-20160816; b=uum2uHvmpS6k5uZZyswl0z2zq8kljcOsvIJhES5oJEs9I4jtzuwhqwNgP1oOPtVkxg dln89lxL5owrs5mrkW/d4ZjFyw4LHoubXQoYNT73uiwsjMKxU8pXnNo8tkrQA4U3ZSlO onRAi6c4zKhOi6CUg0y1Ut77RjB9U1w7eaVgbRoWQhiFZrmMkjmdrQD7weWZYBQTpmKE YdijC2ur00YvqpUIfBDZ95XvXoQ3SaffIOGa04NWoFdYFuRdHI+Tx5+Lu+3FHQbeJPDl PEERZoFR32Y8FlMr0wRRwtsq+w7BJArRpEeBCAOVEEYIaQYapdusTDkfLrLB1gNUgFyf NiVw== 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 :from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=MIUH8G8MuccNYS3WVGhWhG1iJSzw91Q7Eno8hwNCPTA=; b=SqVPlDj3gW80lFqBJbu0nyXiwZrqDYBBXlEkYwabmqhFZxt5DddwCYmb9HkTMUuhnh YVu4EB7/2KlcjCQiGZfZLwPwF1CMv7HkuCQ9jNQDH+zCG5wiWI4vt38WU+8OGmJq2YBC zua4+37L768NX3sOBbK1Ss00fsNzhI5hcRxoHtPU0+uGpVbAvfgWlnpkGwUX55cOrajO 2cKW0IgwBq4h0+5I7NgwcH5UdAsXLEEcz3cKrz8kNsiWc5HzgfhcMpgNBSi/M8Q4yFKo m8vaFA4rTiFh/0+Y2rJdaerF6j1TKs5RotfMpOFFAnwmAz41BYn9F0QNnrXjUfGKomQy faSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@axentia.se header.s=selector1 header.b=ODcA38Lb; 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 i10-v6si13683373pfe.119.2018.07.08.04.58.47; Sun, 08 Jul 2018 04:59: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=ODcA38Lb; 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 S933042AbeGHL6L (ORCPT + 99 others); Sun, 8 Jul 2018 07:58:11 -0400 Received: from mail-he1eur01on0123.outbound.protection.outlook.com ([104.47.0.123]:32160 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932892AbeGHL6J (ORCPT ); Sun, 8 Jul 2018 07:58:09 -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=MIUH8G8MuccNYS3WVGhWhG1iJSzw91Q7Eno8hwNCPTA=; b=ODcA38LbSygG9TOhi20olAzb+3E801hQn7SwfuoT6+i6D1x9FEH1TkoM/bG9njbddOluoTKSYEOajRgy5SKYbDY2wC93sLJVC+owPI/FlqMdU8ocHA8EwJOIeARne436aVPP5l95a4KUSyLEkW1AXx2tTBCaI0EfVbQNlTjbzVs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; Received: from [192.168.13.3] (85.226.244.23) by VI1PR0201MB2464.eurprd02.prod.outlook.com (2603:10a6:800:55::7) 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 11:58:04 +0000 Subject: Re: [PATCH v2 2/3] i2c: Add helper to ease DMA handling 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> From: Peter Rosin Organization: Axentia Technologies AB Message-ID: Date: Sun, 8 Jul 2018 13:58:01 +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: <1530955795-17714-3-git-send-email-jun.gao@mediatek.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: HE1PR0701CA0070.eurprd07.prod.outlook.com (2603:10a6:3:64::14) To VI1PR0201MB2464.eurprd02.prod.outlook.com (2603:10a6:800:55::7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0c8baa88-7d56-4b80-4201-08d5e4ca1084 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:VI1PR0201MB2464; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0201MB2464;3:3R9D2335woM/lndgD2DyeBSGG4wLFaSAT27ZM8bai+dtO5z5oBjlsaH6lYpFV9e+BkSYmc1dckKe3jDP/W9pD7occ3PgUGPX1oLPo6nMtdghiMpd91MfDOTRsjXauu7hjgVcytvsmdmp2m8hUFYHd4vDQXFFq0dwifE68HA6unJj+asLc1vkai/8qTeEDRGoqwuuyuUV6Taa9ux8Y8wikM92GvdGi/g3tLxs/jklGgpEvV8Tfadlt3C54Os1/C8U;25:mHmkTi7RETRlCq6VRln+mkubQOxQGjBziuwF6oALa1J3o2zOP9pUE4YcZgeC9o8D0NPdawCZxMwaia+uYL2Momj3ahxe73CPishIioZIVlyNBnZRZ0qbUhh49aXcmz1ooX1UuskJDGw7tCizgCCbgKB3RQLA8JQbsFqSt6Z+Lt0MRqIqmzHpHpfHyVErBtrQZCvMxCfVqhg0fHBkxCPmK71sDk/TUg7sqBIJr4w97aQ9m1ztqsJGEBaYV5puIITsmGjLMBnWhrxMIPl9GS60e+TkMB6lHQXWNCOl1EN6/2UBdIZq8VA8F122HTbtgZwnpfaqPwOEXanZDjCQIas40Q==;31:nJk5C2fgv3jxR8fS3Q5+7ZO0MCPZ/3sPmNPDL89qZqFzbYO2L3v562sGcjIG0q5Y0RUbzesrQgim9yTLvTaRNLjzRd+JFd7T8N5bOh9aXlNAjvHj3bNzh6a2rrI8ZfvfuY7xG9yssp7P6mghRJmt6MTgRPWIULcR31MstcOV7kGNk6nlbiYk63y+iu9kuwvPFvvFJ8pV5McSnu7sUI1Eq2S6E8PPLBEbWMMbUHnDyMY= X-MS-TrafficTypeDiagnostic: VI1PR0201MB2464: 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)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(2016111802025)(20161123558120)(6043046)(6072148)(201708071742011)(7699016);SRVR:VI1PR0201MB2464;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0201MB2464; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0201MB2464;4:HqtTj3pA0lwNXbt8QLTW4HMjEgH1OPgZgJWtiduRsdz2Sd4GZFGKuFSOJdjBpEcF1P143uinbBbzJgpersGMeaWJd2PZwcn7qnfDjOEC3M+vFz+W9q6pMZQNvYv6MdHr5ZGLss3SDeyGD+2aoeowSxYByKO6H2mSnqyHgpV4yullSKXtYWodU6ioECUM2y7di25QIR+VleUDaBD+HOheBoJR58l0Oe3NiGlLa+JRsGiPAyd/YNq+6pC7KLP0yPghYQcLgKh/MgMcnrD4CL0L7Q== X-Forefront-PRVS: 0727122FC6 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(979002)(6049001)(396003)(39830400003)(366004)(136003)(346002)(376002)(189003)(199004)(8676002)(81166006)(7736002)(97736004)(81156014)(105586002)(8936002)(65806001)(229853002)(36756003)(64126003)(47776003)(305945005)(2906002)(6486002)(31696002)(86362001)(66066001)(65956001)(106356001)(3846002)(230700001)(31686004)(6116002)(6246003)(316002)(4326008)(3260700006)(68736007)(5660300001)(2616005)(16576012)(11346002)(117156002)(476003)(956004)(110136005)(486006)(446003)(50466002)(25786009)(76176011)(74482002)(65826007)(478600001)(52116002)(77096007)(58126008)(53546011)(386003)(16526019)(186003)(36916002)(6666003)(2486003)(52146003)(26005)(23676004)(53936002)(42262002)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0201MB2464;H:[192.168.13.3];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjA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dEovr9ms6W5FjK/gysBYcR1/TA1bLC2KySBoarKiQ32JwveWTFiwUXAQm0ikzbw+W2vtmFYuihz0CgOlBQj7qSCoFPA6JB7Pp7myTmoewc0Tt62LLA6M5aNOPUsqrmy9CVPrEpdqj7VcDJIKEi2W2hfB1JFR44G67ncObabY4x6TMz0gJ15fYVxdwZV5F4JjbDqVXFkM63Y1GWJQtla+a2D311MPQygmp0rnYInTE92/66okgyaMVvgkQnbym2mbj9B9+bHrOU325WFTugVJD69J5IxjlILq6veAbXfO2GAQcd9vpkwA7Zg9PFlqAUu3bPHU/g==;5:pe2VZjLpHM+BeU+bFhuKWf4a1UC59a3HYt5CqUmXEOLDq2Xp5hzMWT4mQs29r8pFLHHGC1eklbr5NrAOGcmo426edi4ohSLa6jVRR9cLRSWmWU7t8LPJVPFhm37jYD7BXjDtxQgurwpOjGGI+szH5H8mlMjXVXhzcO/6Ex04gIQ=;24:8P2NY0PU4UvGzUFc1UcWPnR+cTEykRCTUeSTqSHiRFehS2g8KHN/6tgMROxmKDAqGrs7V2vciwG0g1eIsEFBZ4BA4GwkSPgRFCRmOjfDsks= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR0201MB2464;7:OWO0Z5ECXHSkqwdOqYf5osdBUsxpOGjdQlfnR6B0EfRT4YQinoJabfBZJ3vqMDfcx12yZFQnprDZEds1JMsCMfo2BAt/lUl3gLxGz1nFSpD/BSTjM2Tocwc8hLAPjuKfj6booJKHhiC3mvwsHH2iRFW0S0XHH11F3VM8LNr/Y/aiqYQSSYydy9t/94xdaEVxECrXmKAiz+c9XyoeM1lU9X6q6GWNZHn4Om+KyAcUN9RHou+pCTcx+Y4ed8iEspUw X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2018 11:58:04.8485 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0c8baa88-7d56-4b80-4201-08d5e4ca1084 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0201MB2464 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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); > /** >