Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2099068ybl; Thu, 15 Aug 2019 06:33:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0kLVQDyLRvrXee9G1mIDhHaGqOiMbBr6xL7tKOIeuocdytUgYH5qWN0votPF/5yjmA20C X-Received: by 2002:a17:90a:77c9:: with SMTP id e9mr2128506pjs.141.1565876009120; Thu, 15 Aug 2019 06:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565876009; cv=none; d=google.com; s=arc-20160816; b=mH6HoPx4E72q02QtFxdGaWt1AmE1YnxtA+XfsT/12NykSgsfKIpDARcofk03upQyTJ 4s5RbOPtQ854EWsYSX4LHfZ9zHbPXeIuW+x/Y/eLrtdDGxUfOIJtY14KgK4BIrl0KxvK zG7wIZkYZNvQBnlc0JAHm8UWbzyBN+lZz2ym1cq2jhI+nSYA1bBZ7wAmqA3Jp1AgGCnp zGVZwqwf1jmBHZQ4lyeSxm/tpDRHybnOeljdPo6e/nEiH1WvzuOnnSgFS8GzXVmQTWNq qw39eJAeKl1jNzj83moubkzlB1Ci8znsMaAjo52qaED2mhB3t9K++yhnspsrmXIM/5ic OHnw== 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; bh=QpW7/Z7xy9y7fJfnIoZvHgT3xauD79O20NwMpJzJOyU=; b=do4U8Y/hIWoA1s3Hv8sIOryeHM9fz5dG+TdZBWAxN2jXeNuG42q97GRspBkUJF/nhf 9GJwLhjSD6vdTvzIooZwSzj5OKGeDI/aULwx3NaIkRUi3okRAXOAN4s/Z15yoJxEllts roA3fTJe0ClWPJNGy2TK+Ly4MvKhMGPVM+dbtpqZLza/NLvxG1+VbrRpEZjio0pMXvJv ZESxgXDi3cOhDVtQhUvAktdr8J6rgMzBvF9fY57YjnAX8eeabaCIU/0O/h8pUG5XrQf8 HjBogU4nkoVgHWOp5hR/swryZ/ztsfZ9utHl613MsXlUYSD7TUbhTdF3guCghq6HHaaA CcNQ== 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 a24si2045636pfi.205.2019.08.15.06.33.13; Thu, 15 Aug 2019 06:33:29 -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 S1732315AbfHONcN (ORCPT + 99 others); Thu, 15 Aug 2019 09:32:13 -0400 Received: from verein.lst.de ([213.95.11.211]:46747 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730635AbfHONcM (ORCPT ); Thu, 15 Aug 2019 09:32:12 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id AA62D68BFE; Thu, 15 Aug 2019 15:32:04 +0200 (CEST) Date: Thu, 15 Aug 2019 15:32:04 +0200 From: Christoph Hellwig To: Robin Murphy Cc: Christoph Hellwig , Greg Kroah-Hartman , Maxime Chevallier , linux-arch@vger.kernel.org, Olav Kongas , Gavin Li , linuxppc-dev@lists.ozlabs.org, Mathias Nyman , Geoff Levand , Fabio Estevam , Sascha Hauer , linux-usb@vger.kernel.org, Michal Simek , linux-kernel@vger.kernel.org, Tony Prisk , iommu@lists.linux-foundation.org, Alan Stern , NXP Linux Team , Pengutronix Kernel Team , Minas Harutyunyan , Shawn Guo , Bin Liu , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 6/6] driver core: initialize a default DMA mask for platform device Message-ID: <20190815133204.GD12036@lst.de> References: <20190811080520.21712-1-hch@lst.de> <20190811080520.21712-7-hch@lst.de> 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 On Wed, Aug 14, 2019 at 04:49:13PM +0100, Robin Murphy wrote: >> because we have to support platform_device structures that are >> statically allocated. > > This would be a good point to also get rid of the long-standing bodge in > platform_device_register_full(). platform_device_register_full looks odd to start with, especially as the coumentation is rather lacking.. >> +static void setup_pdev_archdata(struct platform_device *pdev) > > Bikeshed: painting the generic DMA API properties as "archdata" feels a bit > off-target :/ > >> +{ >> + if (!pdev->dev.coherent_dma_mask) >> + pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); >> + if (!pdev->dma_mask) >> + pdev->dma_mask = DMA_BIT_MASK(32); >> + if (!pdev->dev.dma_mask) >> + pdev->dev.dma_mask = &pdev->dma_mask; >> + arch_setup_pdev_archdata(pdev); > > AFAICS m68k's implementation of that arch hook becomes entirely redundant > after this change, so may as well go. That would just leave powerpc's > actual archdata, which at a glance looks like it could probably be cleaned > up with not *too* much trouble. Actually I think we can just kill both off. At the point archdata is indeed entirely misnamed.