Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1411685ybj; Fri, 8 May 2020 00:18:23 -0700 (PDT) X-Google-Smtp-Source: APiQypKIsUqlGu0kWvrGHPriQlPkaY4XAeVSQrSNZxqvOiEDLrtvLzbtE96AAOT/rPbVSjzHVxzl X-Received: by 2002:a17:906:1fd6:: with SMTP id e22mr778032ejt.150.1588922302939; Fri, 08 May 2020 00:18:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588922302; cv=none; d=google.com; s=arc-20160816; b=OENM6IkAsZLeS/Oocirw5Wel4T6Dug9YP/93Y10HrOZ6vH9lMihtC6izyRa9DjhhHZ OqXKsWT8YrlZ1M25yOWL77h7Jy0YC5NYrowSfbUnSdnbos2do5pM5WgnqirHe+3V1rvf 2dHmqnVKSPLN4nGWL+6c4D9RqIZ+6XYlSEpZvOL5IFnNlgspITB0r2gIbZXTFpqn/7Qf QZstLxjmIgqpyg5ulmdtnmLCrnR7pcb0z9qYAMg2ow7mdrub0RyjmMhbSMDCJ2j88QUh nPI1mnPxwUBSfz6P07Yr0O98o8H0kFbk9ZHtbb6z09AbAfpnlTb+LSEr2se4nBlnIEVG 89Qg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=3VXiDQVqAlbRpv5kgwqGyHW115XzsnUdyvpF9BLr2DU=; b=cn6lSkrTy8OlAjLB/YLamYPT76/RhNsyeOYrqGeR0rDpb86q3X9/PpbcW1ByzEIyKP VFqejhqfNh3bsT/D+ppZDiajpLcXCMKs3Po4Qgrs87hqMu2NV/kk4q0yIJHglZPEj15F ueD089NE3gPZAL4hjmV4de7jCX2S2RZuEO5QN40iYrh7e5TL49t37QC+aRRENPUieCaP NjQiObPO115y4/SafaoXadeSVeOYoyv3E3jH+JFeqQcZ4dhwuyioAcU1XGY+CPNDkC8M MTvqH6f+RfvYFEbECYqerRjnlqmecdnBgWsi30ieB1oUh2fE4oe9cJRWxHQvYpwjlATa ZObA== 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 v21si410447eja.226.2020.05.08.00.18.00; Fri, 08 May 2020 00:18:22 -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 S1726811AbgEHHQO (ORCPT + 99 others); Fri, 8 May 2020 03:16:14 -0400 Received: from verein.lst.de ([213.95.11.211]:50872 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726009AbgEHHQN (ORCPT ); Fri, 8 May 2020 03:16:13 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id AFF1B68B05; Fri, 8 May 2020 09:16:09 +0200 (CEST) Date: Fri, 8 May 2020 09:16:09 +0200 From: Christoph Hellwig To: Marek Szyprowski Cc: Christoph Hellwig , dri-devel@lists.freedesktop.org, iommu@lists.linux-foundation.org, linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org, Robin Murphy , Bartlomiej Zolnierkiewicz , linux-arm-kernel@lists.infradead.org, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann Subject: Re: [PATCH v3 02/25] drm: core: fix common struct sg_table related issues Message-ID: <20200508071609.GA31690@lst.de> References: <20200505083926.28503-1-m.szyprowski@samsung.com> <20200505084614.30424-1-m.szyprowski@samsung.com> <20200505084614.30424-2-m.szyprowski@samsung.com> <20200505101508.GA14860@lst.de> <5dd1cb55-accb-0dc6-4ca5-90c57cd19527@samsung.com> <20200505110950.GA19067@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 Fri, May 08, 2020 at 09:12:13AM +0200, Marek Szyprowski wrote: > Then we would just need one more helper to construct scatterlist, as the > above two are read-only don't allow to modify scatterlist: > > #define for_each_sgtable_sg(sgt, sg, i)??????????????? \ > ?????? for_each_sg(sgt->sgl, sg, sgt->orig_nents, i) > > With the above 3 helpers we can probably get rid of all instances of > sg_table->{nents,orig_nents} from the DRM code. I will prepare patches soon. Sounds great, thanks!