Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp782238ybm; Tue, 21 May 2019 03:31:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsmT22Ma6RJR6D3sxNDWaLb54sRE0l0nCe7jmZTpuBc+KYKnymwKAhjHrpLp95XHAip7tG X-Received: by 2002:a17:902:324:: with SMTP id 33mr82187704pld.284.1558434695932; Tue, 21 May 2019 03:31:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558434695; cv=none; d=google.com; s=arc-20160816; b=VnFLXqVuqemIFq4A3hykHSS9132lmKC2tD2r6JekHGjD5Lbv9duc8iMUWeSYFXfdiN UZD/g61pcXDfa6unQSfvN+69EP0I4HkSKIS2U2BK/U6pkNaVrPatHgF/FUOHPwLY57ne oEwC4ZGeCYHq8YZaOj5sNAn9esDmC7gvcsGcX24Z6ilkvz9yHFUmTFTNK0LyLnQIVY5w bxhCsvvLXn4JSe8uwAtxyZwp2F5zR8fQ5JOcfpNC2eKmTtAdqTCm4A3m6n+SAXisyC58 eV3Q37qBl4f2FD/y2eNugPye5YU/qCQT3V2Es+POT5cuBcyHYlI1kN7kOxZKOMrzdSIo JIpw== 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=QTohEnuRylp5oJqGvCQSL0/oYImNfk8aCug6Z4W8+aQ=; b=Iryz9pFzo8yhDJeYEVTr38bocEnKwCv8lSj5mR41VUmVX+baGplrh1qQWrlw6nG0QS PGpUpOh9vWdYeg59nJD5/jbP+Evp1M5C2T5yNTL4kcOmUm9uy+Iek8qYvqzPPxvH6qqX rndFfBTIOAona4fbpha4JEQLuz3FIyEuUbAA+gqW9/O5h1QzKkyEx2dfm/BphPuf7jRL yTTtixhlyS6LLhXPQ+9MHxiUJ9aDFOqkBpyPmkO4kWOfAThPXE5GfWnnyguhcFQswF9C SvExnYegjEmNx+2aMLBtN47PZEj0UjbmGLB+ZeqqsGyXrOhbHfWiGR5ytsopPjwhnaJz SALg== 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 q4si19834140pll.127.2019.05.21.03.31.21; Tue, 21 May 2019 03:31:35 -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 S1727758AbfEUK3B (ORCPT + 99 others); Tue, 21 May 2019 06:29:01 -0400 Received: from verein.lst.de ([213.95.11.211]:59141 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726466AbfEUK26 (ORCPT ); Tue, 21 May 2019 06:28:58 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 7C5EB68AFE; Tue, 21 May 2019 12:28:35 +0200 (CEST) Date: Tue, 21 May 2019 12:28:35 +0200 From: Christoph Hellwig To: Greg KH Cc: laurentiu.tudor@nxp.com, hch@lst.de, stern@rowland.harvard.edu, linux-usb@vger.kernel.org, marex@denx.de, leoyang.li@nxp.com, linux-kernel@vger.kernel.org, robin.murphy@arm.com, noring@nocrew.org, JuergenUrban@gmx.de Subject: Re: [PATCH v4 1/3] USB: use genalloc for USB HCs with local memory Message-ID: <20190521102835.GA1973@lst.de> References: <20190516114721.27694-1-laurentiu.tudor@nxp.com> <20190516114721.27694-2-laurentiu.tudor@nxp.com> <20190521081657.GA10639@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190521081657.GA10639@kroah.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 Tue, May 21, 2019 at 10:16:57AM +0200, Greg KH wrote: > > + if (hcd->driver->flags & HCD_LOCAL_MEM) > > + return gen_pool_dma_alloc(hcd->localmem_pool, size, dma); > > Does this patch now break things? hcd->localmem_pool at this point in > time is NULL, so this call will fail. There's no chance for any host > controller driver to actually set up this pool in this patch, so is > bisection broken? > > I think you fix this up in later patches, right? > > And if so, why do we even need HCD_LOCAL_MEM anymore? Can't we just > test for the presence of hcd->localmem_pool in order to determine which > allocation method to use? True. And that also sound like a good bisectability strategy: - first add hcd->localmem_pool and test for it - convert drivers over to it - remove HCD_LOCAL_MEM