Received: by 10.192.165.148 with SMTP id m20csp4349178imm; Tue, 24 Apr 2018 00:53:55 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqzdSqBNv+idlZE2HvYfYSkePqsi93Djtl1QAX5Ud3z59sWDlGO/xnhBqPNmB172FYEtGIl X-Received: by 10.101.99.152 with SMTP id h24mr218412pgv.170.1524556435697; Tue, 24 Apr 2018 00:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524556435; cv=none; d=google.com; s=arc-20160816; b=qsJLr4BLQjuvNfnfv5L6CyMa/kfTr0QrYWmec+LRlF6mYio8uVBu3Eu1Y13jiZQGbm kZD3JK/ChPi7HUjTtDcQlU7rYqCNEnV/PlhVL18R59aXXs1rtHUk03ufd1q/gFaWoYLA DKAnjL5LeKMLPCqv64U/J+06dNRKb8ViM17h9cLkOWJ8vdocIcxqNy6T3UgV+79lc6dF 12tMOHWA4GgDOJOk/nn85wXhcCCJOdir3ART6Db02BSkaGCAnJrUmA7rrrrjZvcWgLmQ NlNQszdd/HReKhA9STJmen3wz0Va/DVh59oDoIiMFYcXli36jmO6lSRszpipB0ZCEals HajQ== 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=Rwb9rYzIgPFIfpEvwShCls+KYc+SYWr2VtLy7yl295Y=; b=vB5Q30WW94Yn3EvpRIjkgV88v3DFvT6ewcehvF1cTO09TtkcI2aTxyUlP3vds0d4vg NTYaFyFe88T+4uzXaqYY/WR16gTNg5E80KNhK4GipfJE3tAnVCOUqQA8v//PYcLJgNSg 0uEHjtDE3EI0ekgiAH8vOY5j45udMachvgkTaPc2TWc8QmrifNAx8keCu1sMio15ylc2 ccjvcqllco87oHFA0yDrKNpWg0TBQHvnXCQL2KaBmrmIPq6eAbiowJh1WKJk3m3XEHuY lWF0Yv+TAalnemWsD36vrwzBA2DKuq+IyKppwvupiJBR4PKcdkjX+rF1FffjLrWfaHqJ Y8Zg== 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 f4-v6si10422314plm.448.2018.04.24.00.53.40; Tue, 24 Apr 2018 00:53:55 -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 S1756488AbeDXHeA (ORCPT + 99 others); Tue, 24 Apr 2018 03:34:00 -0400 Received: from verein.lst.de ([213.95.11.211]:57575 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756326AbeDXHd6 (ORCPT ); Tue, 24 Apr 2018 03:33:58 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 9764568DB3; Tue, 24 Apr 2018 09:35:24 +0200 (CEST) Date: Tue, 24 Apr 2018 09:35:24 +0200 From: Christoph Hellwig To: Robin Murphy Cc: Christoph Hellwig , linux-arch@vger.kernel.org, linux-xtensa@linux-xtensa.org, Michal Simek , Vincent Chen , linux-c6x-dev@linux-c6x.org, linux-parisc@vger.kernel.org, linux-sh@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, openrisc@lists.librecores.org, Greentime Hu , linux-alpha@vger.kernel.org, sparclinux@vger.kernel.org, nios2-dev@lists.rocketboards.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 01/22] dma-debug: move initialization to common code Message-ID: <20180424073524.GB18945@lst.de> References: <20180420080313.18796-1-hch@lst.de> <20180420080313.18796-2-hch@lst.de> <294a1469-01d6-10fb-5de1-b1d4513a066c@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <294a1469-01d6-10fb-5de1-b1d4513a066c@arm.com> 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 Fri, Apr 20, 2018 at 11:23:43AM +0100, Robin Murphy wrote: >> -void dma_debug_init(u32 num_entries) >> +static int dma_debug_init(void) >> { >> + u32 num_entries; > > Maybe initialise it to PREALLOC_DMA_DEBUG_ENTRIES? We initialize it down in an if/else clause which seems a little more clear to me, at the cost of two extra lines of code. But I suspect I should just go a little further and merge the global req_entries and the local num_entries into a single variable with a better name. >> +core_initcall(dma_debug_init); > > I think it's worth noting that for most users this now happens much earlier > than before. In general that's probably good (e.g. on arm64 it should > prevent false-positives from the Arm SMMU drivers under ACPI), and I can't > imagine it's high-risk, but it is a behaviour change. I'll mention this in the changelog, thanks!