Received: by 10.213.65.68 with SMTP id h4csp475313imn; Thu, 22 Mar 2018 01:18:33 -0700 (PDT) X-Google-Smtp-Source: AG47ELt+RqNNkjzP04U7SY6XGgJYzlpOWWLUf7p1NzngXdQt1/QRlODFZV8v3fiPi257QT4qee5l X-Received: by 10.167.130.10 with SMTP id k10mr19619496pfi.11.1521706713729; Thu, 22 Mar 2018 01:18:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521706713; cv=none; d=google.com; s=arc-20160816; b=VEOcDpkukYj0mNKb9fgaP/Wu2ElhRfBfwESHnzwkcH4FTbI0Yp1WUPVLyliESXezEP uKTF8dYC22/zm7BGMnXJkiTFU5LUnfCZBjX73CgYhrQBKNSZwnCSIQwQhE0XBLdAEcM3 6msMOLO9eEcDdJx22V/zLWTWUXciShdy9GEuS+pc52Ji+ji+xD9Pd0+kWFxcUQwVUDyW x/XsemJUDyLvQZYznPKFeCG4usgSA4LeiRgC9ZlWvWJCeQVZqZsK7nLrwLTZbz3jFO0K Kc8Nlu6vcTZlOrDx07yPMn0JfCCpiik9bkWtWBi8ni9ZTFcVlqSrOwi3eQKCIBWXN2se exGQ== 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:arc-authentication-results; bh=4GJdulOvPTeJpCVtnq9feKFUwtSvS/B2NAd2/WLAUAk=; b=TPV8RBnWcWU6LA5Q/OaV7VxIHxXzAxwb0bwAKtyBupSGOKa7VtWXJ6jOXwMnLowdvv u8in3Ycenz+ep0+WWNmOFHNz5NM4VhUZqP1YH1K/v8Ua1DOnBb9Hfy7N/s/t3vEFoE+P x2mZXghcvJpa8zv8SEikJeq0dT0qKZPvC/rTXdjdJp9uwv4JofIWq+AGa0LapamzuESX 0smFXjkS3ZsC+Z/6vPzYOBbZRXo6u1UzG5LqOw0dPSwh8c9ZLw6SPuR3F5q4qYG3iXX4 VQm3EqSjzuUBENl9W75QZTLT99sni+FnrGpNKDrg83fekqxLZc3Q5Skh5+JccY56Yzyk 8Kjg== 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 p12si3876230pgv.384.2018.03.22.01.18.17; Thu, 22 Mar 2018 01:18:33 -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 S1752638AbeCVIRM (ORCPT + 99 others); Thu, 22 Mar 2018 04:17:12 -0400 Received: from verein.lst.de ([213.95.11.211]:46090 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752504AbeCVIRH (ORCPT ); Thu, 22 Mar 2018 04:17:07 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 8B07FDE815; Thu, 22 Mar 2018 09:17:05 +0100 (CET) Date: Thu, 22 Mar 2018 09:17:05 +0100 From: "hch@lst.de" To: Bharat Bhushan Cc: Nipun Gupta , "robin.murphy@arm.com" , "hch@lst.de" , "linux@armlinux.org.uk" , "gregkh@linuxfoundation.org" , "m.szyprowski@samsung.com" , "bhelgaas@google.com" , "zajec5@gmail.com" , "andy.gross@linaro.org" , "david.brown@linaro.org" , "dan.j.williams@intel.com" , "vinod.koul@intel.com" , "thierry.reding@gmail.com" , "robh+dt@kernel.org" , "frowand.list@gmail.com" , "jarkko.sakkinen@linux.intel.com" , "rafael.j.wysocki@intel.com" , "dmitry.torokhov@gmail.com" , "johan@kernel.org" , "msuchanek@suse.de" , "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "linux-wireless@vger.kernel.org" , "linux-arm-msm@vger.kernel.org" , "linux-soc@vger.kernel.org" , "dmaengine@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "linux-tegra@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-pci@vger.kernel.org" , Leo Li Subject: Re: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure Message-ID: <20180322081705.GB29444@lst.de> References: <1520868292-2479-1-git-send-email-nipun.gupta@nxp.com> <1521615323-4752-1-git-send-email-nipun.gupta@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > +int dma_configure(struct device *dev) > > +{ > > + if (dev->bus->dma_configure) > > + return dev->bus->dma_configure(dev); > > What if dma_common_configure() is called in case "bus->dma_configure" is not defined? Then we'd still have a dependency of common code on OF and ACPI. On the other hand we'd get free OF and ACPI dma ranges parsing for everyone, which might be handy. And which would really help mitigating the risk that we missed some bus that gets dma configuration from OF, so maybe it actually is a good idea. I'd just rename it to dma_default_configure or similar in that case.