Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2056538imm; Sat, 4 Aug 2018 18:04:57 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe0gRl7F7D7xW7trbaX9/7JdosWXwfKVcyLxjs9vPFtTBGuANctmUiOkj1fG741jXcdDhqA X-Received: by 2002:a63:ff21:: with SMTP id k33-v6mr9160444pgi.38.1533431096958; Sat, 04 Aug 2018 18:04:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533431096; cv=none; d=google.com; s=arc-20160816; b=trnTsYxnvjYl+ztCl5GE3g1ENWdNlNsYtBnyThu+fCn6yvAwOjV1ahBTyi4Q6AcLSU n0m0DiuNWyWCibMBcfCfj7IzbfNhSg09Glmr6hnncIe6IrOzCetcT0ycGknz/N583mlt MsjNmg1F2k8MmZE2olsjtm7hVj+dEMJjH4vaGAMqUu1RSqcYN0Ur4o93HbIoZcPl40sm zhk3fs3FJd0f9Y1IvNAJ8dP7vQXRn+m5qg3BM3sfks8a+BS+Cu6zXWQRMO6EQcWdLwV9 Ec93oPn7DsAMtzjxHq76trlbwrPNYoLHfuQD2ljjFf3lUmNxPqU096SDoZnH3fGAWRR/ D2TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-filter:arc-authentication-results; bh=a/++NVgqsYQSXVipcbCMxOTCNlTa4WcXh3BmmT8Xo6Q=; b=EC62MFkLzgBnOfA+O8cygBBH8w+Z6VuvrtRQdivZnBjJKrCk4V2oEgk7pwCWKthRol 5CKQcazsUvdZfyUq5lLIKeBHPXus/VwDaca4lI9iLi43SQVtS4Kd7n9rrWW+TZno3ioz 4qmFerxZ4DT352xUo4YV5WyIa7FT16KxhzzfqXpNzP7HC+QRGLLQPGS0BtqlJoWEOIuv v3o5Aj498y5MFO4eUy+7IHRyc68GM3N20gXFHLjEU+H39bZccjpaMfO2ejjA8+jk2KH6 x1/Jk57XbB7Zwulad97TEb4LvOix5b624p9AvLfWwuQgMGEj3A8wVZcQIdwza+sAtT6B DDPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@iluvatar.ai header.s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB header.b=lhwCT7Hr; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=iluvatar.ai Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j24-v6si8793269pgj.145.2018.08.04.18.04.42; Sat, 04 Aug 2018 18:04:56 -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=@iluvatar.ai header.s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB header.b=lhwCT7Hr; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=iluvatar.ai Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727147AbeHEDGc (ORCPT + 99 others); Sat, 4 Aug 2018 23:06:32 -0400 Received: from mail.iluvatar.ai ([58.213.90.100]:4516 "EHLO mail.iluvatar.ai" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726298AbeHEDGc (ORCPT ); Sat, 4 Aug 2018 23:06:32 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 9610B120854B6; Sun, 5 Aug 2018 09:07:28 +0800 (CST) Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id VMBM52OeTlX3; Sun, 5 Aug 2018 09:07:28 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.iluvatar.ai (Postfix) with ESMTP id 0C7B61292775C; Sun, 5 Aug 2018 09:07:28 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.iluvatar.ai 0C7B61292775C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iluvatar.ai; s=809B2F8E-810B-11E8-86FD-A0A654EEFFEB; t=1533431248; bh=a/++NVgqsYQSXVipcbCMxOTCNlTa4WcXh3BmmT8Xo6Q=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=lhwCT7HrGFwJljaHwhddxN+6CbZdvKv2YMYY6PGHGwzpdTPoh+R/G+oL3Re28ejNp VmTURrFkUk09yyCnE6PNIx+sMXw2aPP/Wppne/9FQKcAlo5UJFVKrruahrN/fA+167 C+OSO2+8TQQwg0G8aacO0gvX7POkt9KKoNp1ZFbg= X-Virus-Scanned: amavisd-new at iluvatar.ai Received: from mail.iluvatar.ai ([127.0.0.1]) by localhost (mail.iluvatar.ai [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EN-k7p7UF0xX; Sun, 5 Aug 2018 09:07:27 +0800 (CST) Received: from hsj-ThinkPad-Edge-E431 (unknown [223.167.32.17]) by mail.iluvatar.ai (Postfix) with ESMTPSA id 12326120854B6; Sun, 5 Aug 2018 09:07:27 +0800 (CST) Date: Sun, 5 Aug 2018 09:03:44 +0800 From: Huang Shijie To: Peter Ujfalusi Cc: vkoul@kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com, gomonovych@gmail.com, keescook@chromium.org, horms+renesas@verge.net.au, geert+renesas@glider.be, shawnguo@kernel.org, baoyou.xie@linaro.org, michal.simek@xilinx.com, baohua@kernel.org, ludovic.desroches@microchip.com, linus.walleij@linaro.org, david.brown@linaro.org Subject: Re: [PATCH 00/46] Use dmaenginem_async_device_register to simplify code Message-ID: <20180805010342.GA10132@hsj-ThinkPad-Edge-E431> References: <20180803072016.21544-1-sjhuang@iluvatar.ai> <5d8b222c-6798-aebc-43fc-d4dab9b6f43b@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5d8b222c-6798-aebc-43fc-d4dab9b6f43b@ti.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 03, 2018 at 11:20:49AM +0300, Peter Ujfalusi wrote: > Hi, > > On 2018-08-03 10:19, Huang Shijie wrote: > > All the patches are using dmaenginem_async_device_register to simplify code > > except the last one: > > dmaengine: add COMPILE_TEST for the drivers > > > > I use the last one to do the compiler test. > > There are still 20 drivers which do not use the dmaenginem_async_device_register. > > Let me take a rest, if this patch set is accepted, I will do the rest. > > I think for most of the drivers this series is going to open a race > which is essentially: > > prior: > _remove() > { > ... > dma_async_device_register() > /* Free resources, disable HW, etc */ If these resources are managed by the devm_* APIs. We can use the dmaenginem_async_device_register(). The Devres will release all the things in the following order: ................................................ dma_async_device_unregister() /* Free resources, disable HW, etc */ ................................................ Thanks Huang Shijie