Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp483064ybz; Fri, 17 Apr 2020 04:54:42 -0700 (PDT) X-Google-Smtp-Source: APiQypIEx04SYEZFoY82Wue1zoXhk/lxm/+IGt/lcV5vAMz8/1IiW2xCM2YAZY1Rhn76h3BwMKAl X-Received: by 2002:a50:cd89:: with SMTP id p9mr2520975edi.188.1587124482511; Fri, 17 Apr 2020 04:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587124482; cv=none; d=google.com; s=arc-20160816; b=gihlwnVXM3vfH5V12/XqLr9qsaLWTREpQAvhDVhd3X7EebiEttShVg638D07Urk7p8 s/qdQN9Jiq1HmNLLeHr/ESYMCukDyFKBYiIEX3NuXrebVQRwXtnhQ5dYFlg7vyhg8UDH PGfRjxmeBZlkjiGSmyfllKTMx9N93yWyT1PftvG/H1BGvRyueFAi+hqFR8XLXvcTVc+b pIhrkTLtxb9wTBTGcEFe+MX4O1aTQJxRTvbUQ6I//JD9pmG8TaEbHnWuezkKkhwquPxW c9cVW/yQD74QRSli36i+l6BlM2hq46GxL5Bi6h/7KPffMapNvsqonbs0AnVbFV6yvzR6 PLmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fOHFM9elPBqZ53StmEbbuJGOBdc8SihR2GSmdzRs9uY=; b=ZnEIQBJ5frpjZH+eNBPvX/El9F1HPdc+4HRXZDnnd6lw1wCkIBDfTRkgjFvNz41rrc Pkhx8H62g/pN42Dyp6Xs9y/cwDp0eyTvXX+9W83x+hT/JNP0xZ879a5P7DuN2c63aD0q 8brfB9CO2Gn8CowKQ8FGdkw+EHSh5ouPaUHyOU4wPtQGG+r6fkAkgxrX1kb9d/B2JUX1 Cw3jWNoQS2jTnei57vqDH+E1ZOp8JK4RE2S5LfSlw4mbVdL0j54cR8hoyopqjMZ8DFEC R4J+5goQ+ez46WVMj5b1oA4cL/fJwit1tO0UboAPJQ+NaSHX53DsXdlMNYffFGEMLAcF tgwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fMBCf9rO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si14777388ejj.79.2020.04.17.04.54.19; Fri, 17 Apr 2020 04:54:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fMBCf9rO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730526AbgDQLvn (ORCPT + 99 others); Fri, 17 Apr 2020 07:51:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730410AbgDQLvn (ORCPT ); Fri, 17 Apr 2020 07:51:43 -0400 Received: from mail-ua1-x942.google.com (mail-ua1-x942.google.com [IPv6:2607:f8b0:4864:20::942]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAF35C061A0C for ; Fri, 17 Apr 2020 04:51:42 -0700 (PDT) Received: by mail-ua1-x942.google.com with SMTP id v24so549028uak.0 for ; Fri, 17 Apr 2020 04:51:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fOHFM9elPBqZ53StmEbbuJGOBdc8SihR2GSmdzRs9uY=; b=fMBCf9rOwilC1Z6Zixv2jAkeDoBbxoQeuGNlsPNTLbDswvHwzz7iLxOphekUuKVqeF Qn0ggF1zoOm+Or2djEeeJGzuDDFRF7v1IClvr+VYsYw0IMCAkP04EfKMZRjblTi3rOJ7 wYWU51MpN6ZElokLiqRmQN7mHlbC890Dl+mpo8TLTrcZzqyDcx4wjqHcSd2SApybyb8Q 7Bewaw/qrHUFuEXg5kdULw5Dfr6ub2RuVOD6TU8NZyzuo02/mjevhpdMd53w6KaIvMFE MOXrJDBF6/Es0NfS4DM1SdeFWa+bj4mz/t//QzlwvAiUPZiGZkQlwsDIpD4Yc5vwJllI CzMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fOHFM9elPBqZ53StmEbbuJGOBdc8SihR2GSmdzRs9uY=; b=ZbJvxOKUnQqouH+EnUIcaNnTpYRHRcrGBdzhrbPeQef+MayOomfhbkfAcjB91cYmqD oFGE3PcuRTsdpVpScpAu+1e4FVUv1Adyaad3r2SUVk+ob5jWlvWN/hAgdXIfC536yRQo wAgHGXpAF1bTf+PXE3oVzEnoxS1I84H+fH58QL+qnRlg6RNXLZYggZlov1jODX59bj0i xfMRA3P4x4WKr+L2rgpIAl1EGBfbsKUuVL2aLyMKietx6QyuXDFwCi1PppJFg2roeq6j c3fGm2l7PWjVAgazP2kN1sfsWiIwSFP/VKOXWW+dMnh5TrIcsb5gA2si+4Po0n6VaQYO 1uOA== X-Gm-Message-State: AGi0Pua2k1JIbtmKcut22ptIc06a2opVvnm6glxlZ3XXlvBFPUum5aAm kJMIPep+MGgWC2J5Y3k4bhXccUp+ymbvDKdeDjUUfOL5z0k= X-Received: by 2002:ab0:6449:: with SMTP id j9mr2012699uap.19.1587124302013; Fri, 17 Apr 2020 04:51:42 -0700 (PDT) MIME-Version: 1.0 References: <20200331183844.30488-1-ulf.hansson@linaro.org> In-Reply-To: <20200331183844.30488-1-ulf.hansson@linaro.org> From: Ulf Hansson Date: Fri, 17 Apr 2020 13:51:06 +0200 Message-ID: Subject: Re: [PATCH v2 0/2] amba/platform: Initialize dma_parms at the bus level To: Greg Kroah-Hartman , Arnd Bergmann , Linus Walleij Cc: Christoph Hellwig , Linux Kernel Mailing List , "Rafael J . Wysocki" , Russell King , Robin Murphy , Vinod Koul , Haibo Chen , Ludovic Barre , Linux ARM , dmaengine@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org - Greg, Arnd, Linus, etc, On Tue, 31 Mar 2020 at 20:38, Ulf Hansson wrote: > > It's currently the amba/platform driver's responsibility to initialize the > pointer, dma_parms, for its corresponding struct device. The benefit with this > approach allows us to avoid the initialization and to not waste memory for the > struct device_dma_parameters, as this can be decided on a case by case basis. > > However, it has turned out that this approach is not very practical. Not only > does it lead to open coding, but also to real errors. In principle callers of > dma_set_max_seg_size() doesn't check the error code, but just assumes it > succeeds. > > For these reasons, this series initializes the dma_parms from the amba/platform > bus at the device registration point. This also follows the way the PCI devices > are being managed, see pci_device_add(). > > If it turns out that this is an acceptable solution, we probably also want the > changes for stable, but I am not sure if it applies without conflicts. > > The series is based on v5.6. > > Kind regards > Ulf Hansson > > > Ulf Hansson (2): > driver core: platform: Initialize dma_parms for platform devices > amba: Initialize dma_parms for amba devices > > drivers/amba/bus.c | 1 + > drivers/base/platform.c | 2 ++ > include/linux/amba/bus.h | 1 + > include/linux/platform_device.h | 1 + > 4 files changed, 5 insertions(+) > > -- > 2.20.1 > Does this look okay or is there anything you would like me to change? Kind regards Uffe