Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp514589ybz; Wed, 22 Apr 2020 02:44:57 -0700 (PDT) X-Google-Smtp-Source: APiQypJ8fawjm1ZW1rIO2dSSGABmNJ80w0U7QlKXZcC+ImnnItFQpJwNyGC0YKEfWDe+rntsN4HV X-Received: by 2002:a50:9dcd:: with SMTP id l13mr17936864edk.126.1587548697466; Wed, 22 Apr 2020 02:44:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587548697; cv=none; d=google.com; s=arc-20160816; b=R4eWXEDybPEC6TYa3CQ2QM82KU5YGNyO2orECC/BxGSGnUOho/MyRQi4BTNT4225qO sPvk8q+do2q5BZczSPwvN4pwJW9hO+M+y9jeTAndKHUipH9frwbI6SYSCYwh8pnRcjMO vFMmBuIR/0hO3x+61mqvtp5Y2BS2LRsMsR4u6hlIYWDeZHsemC4T70nVUKchG8Y3xHJr dBE9lr1XKa7rmTsRk/FDEVEAfWo4nDMkPui/j9S+RAUd++YQAJw+NjEpYgGqyx0PWtcz VYwXGLC1bY/EJeP3IohXR0jp/5mqrvUUzr4I0x3Flym/I7RdR2MLWhgjscUpj1FVbyzt Bp7Q== 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; bh=u0FHbetRGLF7iPDLFs7K1A+PYVcnWdavTYvEkG2SgmM=; b=wQllA7FGCYgoPrIJ0ht5LS9f4La8MXpsYibLiUzTbxWuKbTi7e/OqynE+wmKoknvs3 NVqH+kEhht9ox/uKfRcAaVDid3srNG8nk/Rz/1md0P//5v45eMB5PPTxm5lBDhkNLWmG xUyedEaFJAV5L/D40Gg+q2YmOdaAdVhYEplEeKyPYEguJYiD1GlCj9v3WQNtqRuuX9Uu AlG8sw+st1X8k1V5uM175X/Ic3fVNJVkAV1fd3vvi7CeogJFPJFgKkRXggvn6DHu4F5U Vj8N7VSumtQGqs0ZJ6ceDwZRXIuVxAwcomYOt8Qcl59R7Lk2kIigWYLDXBauXNNIUU6L eUiw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n10si3073850edt.563.2020.04.22.02.44.34; Wed, 22 Apr 2020 02:44:57 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726294AbgDVJmm (ORCPT + 99 others); Wed, 22 Apr 2020 05:42:42 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:35319 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbgDVJml (ORCPT ); Wed, 22 Apr 2020 05:42:41 -0400 Received: from mail-qk1-f174.google.com ([209.85.222.174]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPSA (Nemesis) id 1Mq2vS-1ioIer3XkY-00n9PS; Wed, 22 Apr 2020 11:42:40 +0200 Received: by mail-qk1-f174.google.com with SMTP id b188so91078qkd.9; Wed, 22 Apr 2020 02:42:39 -0700 (PDT) X-Gm-Message-State: AGi0PubM0Ba3/xw6lyC7pKnhEUWBk8gpJR9KO/ZvyTFLJOd90ZYf3o4o zW34phKCJ86TzuyqNK0hq8MA4HZLpjkmweVUGD4= X-Received: by 2002:a37:ba47:: with SMTP id k68mr25543488qkf.394.1587548558376; Wed, 22 Apr 2020 02:42:38 -0700 (PDT) MIME-Version: 1.0 References: <20200331183844.30488-1-ulf.hansson@linaro.org> <20200331183844.30488-3-ulf.hansson@linaro.org> In-Reply-To: <20200331183844.30488-3-ulf.hansson@linaro.org> From: Arnd Bergmann Date: Wed, 22 Apr 2020 11:42:22 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/2] amba: Initialize dma_parms for amba devices To: Ulf Hansson Cc: Greg Kroah-Hartman , "Rafael J . Wysocki" , "linux-kernel@vger.kernel.org" , Christoph Hellwig , Russell King , Linus Walleij , Robin Murphy , Vinod Koul , Haibo Chen , Ludovic Barre , Linux ARM , dmaengine@vger.kernel.org, "# 3.4.x" Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:IpJyPZ9YBAl88UI2HJR5kQYmnDmW08TgqsV+OQjKOowGbohVjnD ii7n7Y5DOK1sN2B4v+bLcNrtDlkCkmvXwmnOKkumRw4j2FT/7I2fPFDH42UgRdiu1XqCrrp WA2NHTjUJF35g/zH0OhUhc137HHVrAluaM0z2t0TeYD2ruHZkBLC4S13TujU8aH9sc+psfp ZGY0yP/zCguOyVfHo4oNw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:HawH5AsHXXY=:E+b9brVrsc23wamVONBRqz bbg/iXJldYC8tI3huGwcyai7iHTbI5A90q9VtamjnUvRxGUDq/K2fS7ehWGBbH+3q4dcd4UUp be4G1dvcGHiEElQ8ae+g2OfjAaKQ93ZtS1ugSycZ+XCjJ+Fo8xxECFr2iaK4dJpLjvKo4gy// qgyGttThQHXW6+vQUQGWux/puHUcC08BLS9isWX4vFeL/B5ce3nom1CFocLF4alPx2eDMzmpY rzudb1MT/Qmgd4lzZjrwouB4mT98/X2hDKQpWeUrRJ9TBh0XW6SvdRAYSNDwTyYAB6vS79b9l UhXOPqRGG3B/vB60Y1swlZdYCzthNOEsTt3+RS4BjFxTrbw67cGlYP+A+5PpduAjGMHJOAWKx zjmDielINiLOtXgrksflJ7KH3aFoj6mw+6b73FvlVy0645GDygpoOQjS5lsjZNc5AEj7iN9S2 zKqAUaSQa3iBxeK6QBFqM6tJJN7y+n0mXTR5ungacj7vWD73/TBpNFYrP7uLCvAL6+xBtQrEX z/6xbTUxpH6RcY9bw7lgP/sa0OtGZHDFOI+gqc+471xHLrQHp+iyvBqhV7S0oi8eWra989BRF e4lyNcQ9X4Z/cyzd3Gzie+bC+d6e6c1cHXLs+l+NLUQ5aOIMDlFdGoDhTzdJ/OS8qTj/aJI70 Wd0ec5+EmULhNJbhFeures05auGRALI9kX8dpc208rFnCmgotWLq7x/ZoT4vwhLHM4hFFEVOF bfirkaW89wbnq+eja8vBZikMap8Sobe+EOcTWhRu0f6nZ2NxYFgTfbfGXwluE72mkq4+EIlqy ZZnAo8O/Kbp8SHSOa+lZL0xoGUrdtYRdvb4lonxBkLD484QR14= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 31, 2020 at 8:38 PM Ulf Hansson wrote: > > It's currently the amba 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, let's do the initialization from the common amba bus at > the device registration point. This also follows the way the PCI devices > are being managed, see pci_device_add(). > > Suggested-by: Christoph Hellwig > Cc: Russell King > Cc: > Signed-off-by: Ulf Hansson > --- Reviewed-by: Arnd Bergmann