Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3973473pxf; Tue, 16 Mar 2021 02:29:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyL0ynFgoN6nXNldz7tJUiZkUWwMqiG5SJI4vQg96XxE9Kbreoz7tEmV4Pev3QVPBjyBZLX X-Received: by 2002:a17:906:77c5:: with SMTP id m5mr27288693ejn.201.1615886946262; Tue, 16 Mar 2021 02:29:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615886946; cv=none; d=google.com; s=arc-20160816; b=Da8TVLTxP5MvvnMa3a4kGGW4NbdjiiHSHi2r2SS0foY9iFEEv5jAmb2/cUEcib8LWG 0R/zWEWhLMQO1L9C0CUzfDUOtlpvmRNOGCYLQsTZ12R0bKp5Xc/Oh6Qg0V0ZeZf+HGbZ pBPtlj5F8tDEZAgpadJVbXJnOPu3Q61Nd2zeumq1p9s2N+vscYMvyUc2jKUTgryjKUUb 4ST670kHGJ0Rb11e2k2Ksuo1UrtMZ6oaa7PWUUhlYv3IP8JCo3TF372hLNqkQXElvdQ/ exxVzmt/E6wuJFD7dGKf+J2U9bsmADBzJbCvjZKZzws0CE4G6yK9fdAiM20KCdKG0NMj XUKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=XPujULQ7ro6WYBlfTm5tGgq8ZNlDlK+O+z3MdJHEFRw=; b=kaXeccsKJvjFDikEIZCXCyGpOOnItGxOR3mzH+Hamm78WuZsefArJoScnpxGatG6D2 2UlNAyB54zXx7IF3NO16DxOiM8lZv2ICoPGzYiSR2/pOpBHDwe1Slod0NFD/wahVC47R 9xD/FRnYsumFEWWHREu9OkPWGh6K+9hpHDflkJoIcGN4eyVyrx3Tmh0uwYPYXsNyIjHT lefutXeazYkaAi7acFOUV7wp25gw8fXZaqinUkqCUJsTrIZXSxvgSomwlyvclL2dC8pk vco/6Ca0xsIq0NaKFlolZF4gWWd+hrqdzYojeYyo8wxo9y+T+iDfrq8fHdDcy54IYGgl n18A== 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 h26si12948947edw.139.2021.03.16.02.28.44; Tue, 16 Mar 2021 02:29:06 -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 S233632AbhCPH6d (ORCPT + 99 others); Tue, 16 Mar 2021 03:58:33 -0400 Received: from verein.lst.de ([213.95.11.211]:58866 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234079AbhCPH6Z (ORCPT ); Tue, 16 Mar 2021 03:58:25 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 677A768C65; Tue, 16 Mar 2021 08:58:22 +0100 (CET) Date: Tue, 16 Mar 2021 08:58:21 +0100 From: Christoph Hellwig To: Logan Gunthorpe Cc: Robin Murphy , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Minturn Dave B , John Hubbard , Dave Hansen , Matthew Wilcox , Christian =?iso-8859-1?Q?K=F6nig?= , Jason Gunthorpe , Jason Ekstrand , Daniel Vetter , Dan Williams , Stephen Bates , Jakowski Andrzej , Christoph Hellwig , Xiong Jianxin Subject: Re: [RFC PATCH v2 06/11] dma-direct: Support PCI P2PDMA pages in dma-direct map_sg Message-ID: <20210316075821.GB15949@lst.de> References: <20210311233142.7900-1-logang@deltatee.com> <20210311233142.7900-7-logang@deltatee.com> <215e1472-5294-d20a-a43a-ff6dfe8cd66e@arm.com> <367fa81e-588d-5734-c69c-8cdc800dcb7e@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <367fa81e-588d-5734-c69c-8cdc800dcb7e@deltatee.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 12, 2021 at 11:27:46AM -0700, Logan Gunthorpe wrote: > So then we reject the patches that make that change. Seems like an odd > argument to say that we can't do something that won't cause problems > because someone might use it as an example and do something that will > cause problems. Reject the change that causes the problem. No, the problem is a mess of calling conventions. A calling convention returning 0 for error, positive values for success is fine. One returning a negative errno for error and positive values for success is fine a well. One returning 0 for the usual errors and negativ errnos for an unusual corner case is just a complete mess.