From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BCF2530CEE for ; Wed, 8 Nov 2023 16:11:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3B38A6111B for ; Wed, 8 Nov 2023 16:11:43 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3B38A6111B X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -1.151 X-Spam-Level: Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fUtoOC-C4_ej for ; Wed, 8 Nov 2023 16:11:42 +0000 (UTC) Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) by smtp3.osuosl.org (Postfix) with ESMTPS id 9000561108 for ; Wed, 8 Nov 2023 16:11:42 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9000561108 Received: by mail-oi1-f177.google.com with SMTP id 5614622812f47-3b6a837a2e1so1343994b6e.0 for ; Wed, 08 Nov 2023 08:11:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699459901; x=1700064701; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=egO/3A8usR47pYsFMHy7at49a3WUUkqONQqbQuU8j7Y=; b=WuCYdrOQeX3oyFugb1Eo6zxbbZElDkV8KHVarLt5prvAXfFgYkSKJhim7nozGd4sdX fiD1qtCZQzM9avazBE/lLK18X5CAStbtuummn83+XS+PgItAAELg5Oy7nY9vKeSViDF+ AzvLar7HyPgYYJQz44Ssil49lwI6xsI78Z/I//Lis01b+UnPx8m+yqLl6RoKrHn6yTiH 76It/JgHfzdRvgxnmoarAyCssEW1U9FnxM+0c1CkQymH205+lwRfuuD1XpAxMnow1iVG faBeukynhUZC3UHMLa6O3WaldNEbdfb//OgITDsUwzhJfqwCAlKd8osha0GnUBYQesJ3 IeUg== X-Gm-Message-State: AOJu0YyM8Mat6JlZmv5FXLWsXubtJAXYbGkad4by1vxDF8CJxMKjqLiq EP32pgNwK7n2tpfcMx5KSg== X-Google-Smtp-Source: AGHT+IFG1ydbraxTf3qUlkUHE402Zq2u5RjAY4fdhcYCPQiBAZE+mNt+Ni+JkQlZMBRuNIEkL2d3Ow== X-Received: by 2002:a05:6808:15a8:b0:3a9:cfb5:4641 with SMTP id t40-20020a05680815a800b003a9cfb54641mr3241896oiw.48.1699459901513; Wed, 08 Nov 2023 08:11:41 -0800 (PST) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id bg42-20020a05680817aa00b003afc33bf048sm1959000oib.2.2023.11.08.08.11.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 08:11:40 -0800 (PST) Received: (nullmailer pid 2284755 invoked by uid 1000); Wed, 08 Nov 2023 16:11:38 -0000 Date: Wed, 8 Nov 2023 10:11:38 -0600 From: Rob Herring To: Jason Gunthorpe Cc: acpica-devel@lists.linuxfoundation.org, Alyssa Rosenzweig , Albert Ou , asahi@lists.linux.dev, Lu Baolu , Catalin Marinas , Dexuan Cui , devicetree@vger.kernel.org, David Woodhouse , Frank Rowand , Hanjun Guo , Haiyang Zhang , Christoph Hellwig , iommu@lists.linux.dev, Jean-Philippe Brucker , Jonathan Hunter , Joerg Roedel , "K. Y. Srinivasan" , Len Brown , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hyperv@vger.kernel.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, linux-snps-arc@lists.infradead.org, linux-tegra@vger.kernel.org, Russell King , Lorenzo Pieralisi , Marek Szyprowski , Hector Martin , Palmer Dabbelt , Paul Walmsley , "Rafael J. Wysocki" , Robert Moore , Robin Murphy , Sudeep Holla , Suravee Suthikulpanit , Sven Peter , Thierry Reding , Thomas Bogendoerfer , Krishna Reddy , Vineet Gupta , virtualization@lists.linux-foundation.org, Wei Liu , Will Deacon , Zhenhua Huang Subject: Re: [PATCH RFC 03/17] of: Use -ENODEV consistently in of_iommu_configure() Message-ID: <20231108161138.GA2254211-robh@kernel.org> References: <0-v1-5f734af130a3+34f-iommu_fwspec_jgg@nvidia.com> <3-v1-5f734af130a3+34f-iommu_fwspec_jgg@nvidia.com> Precedence: bulk X-Mailing-List: virtualization@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3-v1-5f734af130a3+34f-iommu_fwspec_jgg@nvidia.com> On Fri, Nov 03, 2023 at 01:44:48PM -0300, Jason Gunthorpe wrote: > Instead of returning 1 and trying to handle positive error codes just > stick to the convention of returning -ENODEV. Remove references to ops > from of_iommu_configure(), a NULL ops will already generate an error code. nit: "iommu: of: ..." or "iommu/of: " for the subject. "of: ..." is generally drivers/of/. > > There is no reason to check dev->bus, if err=0 at this point then the > called configure functions thought there was an iommu and we should try to > probe it. Remove it. > > Signed-off-by: Jason Gunthorpe > --- > drivers/iommu/of_iommu.c | 42 +++++++++++++--------------------------- > 1 file changed, 13 insertions(+), 29 deletions(-)