Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4012302yba; Mon, 29 Apr 2019 12:12:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVHALXl6nbFBwI/awKAmZF7mAfmjP57gta89GIvxcG+SGrCy0E1YO+IwSs1Ojye6hOuFKF X-Received: by 2002:a65:6202:: with SMTP id d2mr61127512pgv.176.1556565167143; Mon, 29 Apr 2019 12:12:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556565167; cv=none; d=google.com; s=arc-20160816; b=P1RAOOw5t3eCFINNiwttwCgjRyhAELk1IDgKcoCQmvPOu5ogzcIEn1jFw5SwdqWt0z CHlIin0AxdZJWmdjhS7AgPOpqxQgphKwLmeQbj8OLkqin5bkFB5cfyB1NNMVa14QGUC7 ZSbt1WhwtVRa5h2jKFJcsHDaj8ALilRq8TC+LlmzisPxXqReaMSeT3YcUAxOwUIwXjaU nAiSLLw/aKMNzqACiXmzKOhGM0RnSpb1DwxhNvaeQ3HHzF2+VhipxDk2QRlcsiIr68KU PBWaJcPLzUhZkN4I0/WI+dKsDUBc393/h1yrU2lqsJ9eTjfpzZ10TvLRchs8VLFXvT0U xOcQ== 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=xokuhZ111dEYx/x7aeEoqWJaK5+XjUcZfmZ0vRBNtPc=; b=oaz6HZzzBNT/Opqo9Iovn0xsiQ4rVzXrlnJGzFrINvtbt521aToV94rtA3VWbdJPmn 5hvAniGifn7WBOqNRgidrv7RNh9M2J3aXfSEMBr2pGwlgpz6rnaNprHA23+BonYYHQAv aPM7cvdJtnb6RFYlnyIEFV/WsN+AmMEYnNKvAnguljvzmnR6NI5JtjCAF3LlsGOLfpgq rrtl6IvtwJ725LhtEa/sOePf9Oul/n4eLLSpU1GWY5QyqCBpWl+HPAeYGdRc4iT0upYG uGedrKkAuAylqYM3HF7tiYpo2wSgbEUqya3aeZtcSC3PZoN7ZYHWmwAwpI3Sm0Tb6cu7 j8Lg== 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 m5si1853061pgt.73.2019.04.29.12.12.30; Mon, 29 Apr 2019 12:12:47 -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 S1729178AbfD2TK5 (ORCPT + 99 others); Mon, 29 Apr 2019 15:10:57 -0400 Received: from verein.lst.de ([213.95.11.211]:40628 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729044AbfD2TK5 (ORCPT ); Mon, 29 Apr 2019 15:10:57 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 9DC0668AFE; Mon, 29 Apr 2019 21:10:40 +0200 (CEST) Date: Mon, 29 Apr 2019 21:10:40 +0200 From: Christoph Hellwig To: Robin Murphy Cc: Christoph Hellwig , Joerg Roedel , Catalin Marinas , Will Deacon , Tom Lendacky , iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 11/26] iommu/dma: Factor out remapped pages lookup Message-ID: <20190429191040.GC5637@lst.de> References: <20190422175942.18788-1-hch@lst.de> <20190422175942.18788-12-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Mon, Apr 29, 2019 at 02:05:46PM +0100, Robin Murphy wrote: > On 22/04/2019 18:59, Christoph Hellwig wrote: >> From: Robin Murphy >> >> Since we duplicate the find_vm_area() logic a few times in places where >> we only care aboute the pages, factor out a helper to abstract it. >> >> Signed-off-by: Robin Murphy >> [hch: don't warn when not finding a region, as we'll rely on that later] > > Yeah, I did think about that and the things which it might make a little > easier, but preserved it as-is for the sake of keeping my modifications > quick and simple. TBH I'm now feeling more inclined to drop the WARNs > entirely at this point, since it's not like there's ever been any general > guarantee that freeing the wrong thing shouldn't just crash, but that's > something we can easily come back to later if need be. Ok, I've dropped the warnings.