From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98EB6C433FE for ; Mon, 14 Feb 2022 10:12:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3A1DA403AC; Mon, 14 Feb 2022 10:12:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CRkQ1V4rO_ug; Mon, 14 Feb 2022 10:12:31 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 7B8A740500; Mon, 14 Feb 2022 10:12:30 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 903AAC007C; Mon, 14 Feb 2022 10:12:28 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id C2D82C0077 for ; Mon, 14 Feb 2022 10:12:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id ABA6240484 for ; Mon, 14 Feb 2022 10:12:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vbtxK3oAZfXB for ; Mon, 14 Feb 2022 10:12:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by smtp2.osuosl.org (Postfix) with ESMTPS id BC706403AC for ; Mon, 14 Feb 2022 10:12:26 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 50CA1B80E11; Mon, 14 Feb 2022 10:12:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D67CC340E9; Mon, 14 Feb 2022 10:12:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644833544; bh=x2ADvJVG4KISFTdwFK99lBGP04AokizyuA6ZhikneHU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kK6EkXGq8VYPwLoeolFaXsCgFxfGMmowLgTxRLi9LN+dbxfJ2rV1sfcrrYgvsZ/uB SsConmaBs7UjyorHV8yh/I/pqtpoBKPrzh7kixUlfOIUkLhi/UcAKOUJXz8lEEqd08 N1XtTH/bg9bAP+6emhv0mT0XTG/WfXlxj7/I8mXg= Date: Mon, 14 Feb 2022 11:01:29 +0100 From: Greg Kroah-Hartman To: Christoph Hellwig Subject: Re: [PATCH v5 02/14] driver core: Add dma_cleanup callback in bus_type Message-ID: References: <20220104015644.2294354-1-baolu.lu@linux.intel.com> <20220104015644.2294354-3-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: Stuart Yoder , rafael@kernel.org, David Airlie , linux-pci@vger.kernel.org, Thierry Reding , Diana Craciun , Dmitry Osipenko , Will Deacon , Ashok Raj , Jonathan Hunter , Jason Gunthorpe , Kevin Tian , Chaitanya Kulkarni , Alex Williamson , kvm@vger.kernel.org, Bjorn Helgaas , Dan Williams , Cornelia Huck , linux-kernel@vger.kernel.org, Li Yang , iommu@lists.linux-foundation.org, Jacob jun Pan , Daniel Vetter , Robin Murphy X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Tue, Jan 04, 2022 at 02:08:36AM -0800, Christoph Hellwig wrote: > All these bus callouts still looks horrible and just create tons of > boilerplate code. I can't remember anymore what one vs. the other looks like. Having an explicit "opt-in" for a bus is good, in that no code breaks and only if you want to use this do you have to set the flag. Why do you want it to be "always"? thanks, greg k-h _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A5A5C433FE for ; Mon, 14 Feb 2022 10:49:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244021AbiBNKtz (ORCPT ); Mon, 14 Feb 2022 05:49:55 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:38822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349252AbiBNKtS (ORCPT ); Mon, 14 Feb 2022 05:49:18 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B8D2BF95C; Mon, 14 Feb 2022 02:12:26 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3B2D6B80DC7; Mon, 14 Feb 2022 10:12:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D67CC340E9; Mon, 14 Feb 2022 10:12:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644833544; bh=x2ADvJVG4KISFTdwFK99lBGP04AokizyuA6ZhikneHU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kK6EkXGq8VYPwLoeolFaXsCgFxfGMmowLgTxRLi9LN+dbxfJ2rV1sfcrrYgvsZ/uB SsConmaBs7UjyorHV8yh/I/pqtpoBKPrzh7kixUlfOIUkLhi/UcAKOUJXz8lEEqd08 N1XtTH/bg9bAP+6emhv0mT0XTG/WfXlxj7/I8mXg= Date: Mon, 14 Feb 2022 11:01:29 +0100 From: Greg Kroah-Hartman To: Christoph Hellwig Cc: Lu Baolu , Joerg Roedel , Alex Williamson , Bjorn Helgaas , Jason Gunthorpe , Kevin Tian , Ashok Raj , Will Deacon , Robin Murphy , Dan Williams , rafael@kernel.org, Diana Craciun , Cornelia Huck , Eric Auger , Liu Yi L , Jacob jun Pan , Chaitanya Kulkarni , Stuart Yoder , Laurentiu Tudor , Thierry Reding , David Airlie , Daniel Vetter , Jonathan Hunter , Li Yang , Dmitry Osipenko , iommu@lists.linux-foundation.org, linux-pci@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 02/14] driver core: Add dma_cleanup callback in bus_type Message-ID: References: <20220104015644.2294354-1-baolu.lu@linux.intel.com> <20220104015644.2294354-3-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 04, 2022 at 02:08:36AM -0800, Christoph Hellwig wrote: > All these bus callouts still looks horrible and just create tons of > boilerplate code. I can't remember anymore what one vs. the other looks like. Having an explicit "opt-in" for a bus is good, in that no code breaks and only if you want to use this do you have to set the flag. Why do you want it to be "always"? thanks, greg k-h