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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 632FBC43331 for ; Thu, 26 Mar 2020 11:03:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 356F020409 for ; Thu, 26 Mar 2020 11:03:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sl3RooGD"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wTmRLYka" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 356F020409 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F09xqskeAFJ36ZROdg+EZHAvWM4tzkTPr0XB2H4MngI=; b=sl3RooGDSifKit L74ecQZK5FNnIQU1aC6dJUcPumjeD20ymyUsSixsO7ooq1eP9zgHMvLHK2EBS5tIqW0/X/ZnWo93g YnycFbgy2GcRZG2P6jVhCDRrfJmxrtsQvGWgozHgoayXefHOwmJNWFrKC2w5xs8IvxM46//2ImolU y7bBYwEvxzF+o9hc+sexWIAuRWIKebLU8N46DlemDYKu4RLzQvNL8pSNIq2v6A7k6pBz9vntNSmmZ F18FTOUe6C4u9HqLDwKZQGYwS2S+fz/gvxAqCuZnHjK4jJ2V0sFEhftnxrByIZ6ets1JGdqj1vXWR R7GLJQizpJasZ/fKHWnQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jHQHv-0006PK-HY; Thu, 26 Mar 2020 11:03:03 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jHQHO-0006F3-6I for linux-arm-kernel@lists.infradead.org; Thu, 26 Mar 2020 11:02:32 +0000 Received: by mail-lj1-x242.google.com with SMTP id w1so5904106ljh.5 for ; Thu, 26 Mar 2020 04:02:29 -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=dBYI2pw9sfGjCi0bzv0yJEEWCyqkyjizmfbFD6llCpw=; b=wTmRLYkaXfjcDQz+CdaZDxndUCSZxc+ZmhUW90ynmlTOSPwHaSPR/ClhO/nWxAf7KV 4qbWZyni701zQEPh+GULzYXBJxAUVIBHjJXNvg5C3+il+bmdr2lje+8Fq7GiQ+0JtyfK eHrlGTE66PPY62wp1VinlnBxYkMI9JO103TdN/wSPU6ZndMqYfHMyxZNKAJ96zdibjd4 d6P/2e2ei6EJUpHWQRRHplaPcdSfQB/WJgmBVQ0EF1EJNGJFGusx7B6eHWAMA+66upts /8YOfHxZHJrkiw4F/7IWsJMqiYVYzTsmxEJUtQZNq9RvgaoF57MbAqhJQ90NjUkol4Ii 5+vA== 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=dBYI2pw9sfGjCi0bzv0yJEEWCyqkyjizmfbFD6llCpw=; b=IPnOWMYOJGd0qdf92v/0W4bKiwxDTeCpPagTmlpM20h3AARacpZdczbEBww6kHyoOx WoAWVToZuuIqgWQ5xxByRbXzQFIOnjNvY99taejEW/QUi5qCwo3kto2m0AZRQ51AYfuS zBz1hDu4+Aprwi7cVoM/T6/QdOxAxQzM/rYYlxXKYbPcXY/yURYMIo4zYWDUVd90ijQp a5cGL5mXtgm1kRU3ZRvv+Yx7b31dN3QaBUyiX01ItwhROKtGMRz6DzmMCD6VG9sG4OZP HrDHcoPt/aNe5r4h0rj9b5R0CiF0g/I8SCTKBGEDkBnHy5pj0U2nengoSwgYbKDZRfYJ FsZQ== X-Gm-Message-State: ANhLgQ1h37XYZaBKHzM0j4OaFE82rAaNm5PtKEQBgIhWq5kw6VdyPved RBojKrEZMHXs2BzlhHvFXAb/LOIslt0t85Y0AMxppA== X-Google-Smtp-Source: ADFU+vuAu4NKjgOw04+YhFG4R26tuG7+/x5c+7Ylo0beaM6wZX++zLVCej8OOV3pch4cA7VonOGw2KOeqtn4XOjj9jY= X-Received: by 2002:a05:651c:445:: with SMTP id g5mr4725550ljg.125.1585220547769; Thu, 26 Mar 2020 04:02:27 -0700 (PDT) MIME-Version: 1.0 References: <20200325113407.26996-1-ulf.hansson@linaro.org> <20200325113407.26996-3-ulf.hansson@linaro.org> In-Reply-To: <20200325113407.26996-3-ulf.hansson@linaro.org> From: Linus Walleij Date: Thu, 26 Mar 2020 12:02:16 +0100 Message-ID: Subject: Re: [PATCH 2/2] amba: Initialize dma_parms for amba devices To: Ulf Hansson X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200326_040230_387643_2F3EE8D0 X-CRM114-Status: GOOD ( 13.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , "Rafael J . Wysocki" , Greg Kroah-Hartman , Russell King , Haibo Chen , "linux-kernel@vger.kernel.org" , Vinod Koul , Linux ARM , dmaengine , stable , Christoph Hellwig , Ludovic Barre Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Mar 25, 2020 at 12:34 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: Linus Walleij Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel