From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 C7E1330CEF 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 smtp4.osuosl.org (Postfix) with ESMTP id 4C11841B77 for ; Wed, 8 Nov 2023 16:11:43 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 4C11841B77 X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -1.151 X-Spam-Level: Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 87tcQ2Hvnuaz for ; Wed, 8 Nov 2023 16:11:42 +0000 (UTC) Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) by smtp4.osuosl.org (Postfix) with ESMTPS id 91E5A418F9 for ; Wed, 8 Nov 2023 16:11:42 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 91E5A418F9 Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-3b58d96a3bbso2942019b6e.1 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=UUvzvjdRMdVkNxPOxuzOcfsenMy0jfKUVACEDVB7ADwlIhWlKI7RAQaKLmYvI0SuGj aIKNB6bE4ytNIiuZls4pes3vVeSYxPh8IKFyt844BXZHRGwTZpplum8s6qxbLVxWUxUs xgGGq4nIKKw8rUeRgq+lxTRlqnWMs9aB/J4PmY+9XWJYRim8XYDJA3RLEODqaajONkqG n3CFXx6O9w4idH4wY1iUarV7abP4Q0mTNtQ3gOLUM7dw3Rt5OjdTCNCT0WRGBvrfaY/w mHljHb6G0vXdN34CcjjM8/IhlmODa1XKxeOZnpGfYhG0sJ0CJMUpK/oyhdE2sfV0HBud ZVwQ== X-Gm-Message-State: AOJu0YxljRr+WQsl3/e60JaUxKDE6fTO5ZhFBsD9h9/y/J4iXQm+zm4W Ib2cMt7blYVzh3R7pAbZpw== 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: acpica-devel@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(-) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD7A9C4167B for ; Wed, 8 Nov 2023 16:12:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CaezCnv/JNjIfnboRwntX+6eqN4KiBNgvNxdvBpo/AY=; b=3v0MFWwDfgDHJn 9mW8555E04+Hte/pyy7EKNjRtTdK94+VGZ0BppmHnFVm0myOY+12oWOD3wpezMxm2wIA15KKbIqZk Hf5ymlQuJ7XvksJGktJTXw+7l1njcEwOaFAqKNjPRm1YyMqVTrWT82FIWtRCbNyQ1f1X1bMgi53Ix RIHXcxSMMP0yHeUX2M+ovPop1N3jX0L9LNZAEUHfWS5b3OBwZ3bBRX6WDVSjym7ZPQG/P8GgKMOY3 1USJ4toUIWF0wbRZ+HCXcr80uQN2sMKb7Br6B4kG36gb/r6skjWDv0HQMU/ZYfgOFra4Z0wZxjaJy 3ITGy8KnnPuLm/nFQV8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0l9m-004Gep-24; Wed, 08 Nov 2023 16:11:54 +0000 Received: from mail-oi1-f181.google.com ([209.85.167.181]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0l9i-004Gd1-27; Wed, 08 Nov 2023 16:11:51 +0000 Received: by mail-oi1-f181.google.com with SMTP id 5614622812f47-3b6a837a2e1so1343992b6e.0; 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=k+JUR8WdFhjyZyBP3Tck8NXvEFgdFnKh+2IIJc1ILLU/qsPw43efpcszyIAuflKBCX jnDBg2omts9FRzlg9ruJY/qN6G2NUwsCQ9ypzxQR6+JZKyN3YxftznhBMo+tuQZ6af45 ujyorfOlh8fnKjEC4L5WH/ZIWcFIivwQwxLITrTT1GVWkd9CDRyjk0TpE3eR8xXkQTdF oyrbO0EIOg+hSzydpdKUbaypcyHKX/xrhgA4PcwnINVnHDQCqNwzYk6EBY1qHX6SqSEo /uCqya9Kmfzv7j6/Zl6SFksBOuzyO5eeEW3WQEyAJjdp9+7Y/E+kmJrRIiMMWlf7ONhC d3jQ== X-Gm-Message-State: AOJu0YxtNECux6mJGfVsOakuhCZ5tWleIymEkl6ShOvurF91uFZHylSq bj6dXSHyG4E6QOdUmaOdSA== 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <3-v1-5f734af130a3+34f-iommu_fwspec_jgg@nvidia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231108_081150_690353_4A862402 X-CRM114-Status: GOOD ( 13.69 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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(-) _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7FCF8C4167B for ; Wed, 8 Nov 2023 16:11:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yQhKv8C/T1DN9uv515f3wXoA0j8aQ8p8PXzeVoFN/Ic=; b=2etVY1Tn6W18OR IPdkoIBmzJ1kUw9ruvaabKKEcjlME1S5eULJJjqh5tqZo7/9+zLKNI4zFfBECaBku8n42WWohbsPF ONqhtZj8b3cpBmEjr85u55RO60jJ39yk6T/IzvSZRHDzAzOtMSlO6ijHJ5Cz5rzp1yF9jIZ3HnsFQ +Nqhe393rK2gbakzIWRfX8Mji0BNXIOI2/82HQet0krPuoIdY/jq+bKxPTvGXJpBm0xD0PR8psvKv /3JCaUDaaouTHRiSWl/YfqmeZWs2/1qqS3D7/l9wpG0EdvltPIAHesSHUzOjkhvWLXoKBr6v8m08B S7feUE2gRivme7G5//bw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0l9n-004Geu-0Z; Wed, 08 Nov 2023 16:11:55 +0000 Received: from mail-oi1-f181.google.com ([209.85.167.181]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0l9i-004Gd1-27; Wed, 08 Nov 2023 16:11:51 +0000 Received: by mail-oi1-f181.google.com with SMTP id 5614622812f47-3b6a837a2e1so1343992b6e.0; 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=k+JUR8WdFhjyZyBP3Tck8NXvEFgdFnKh+2IIJc1ILLU/qsPw43efpcszyIAuflKBCX jnDBg2omts9FRzlg9ruJY/qN6G2NUwsCQ9ypzxQR6+JZKyN3YxftznhBMo+tuQZ6af45 ujyorfOlh8fnKjEC4L5WH/ZIWcFIivwQwxLITrTT1GVWkd9CDRyjk0TpE3eR8xXkQTdF oyrbO0EIOg+hSzydpdKUbaypcyHKX/xrhgA4PcwnINVnHDQCqNwzYk6EBY1qHX6SqSEo /uCqya9Kmfzv7j6/Zl6SFksBOuzyO5eeEW3WQEyAJjdp9+7Y/E+kmJrRIiMMWlf7ONhC d3jQ== X-Gm-Message-State: AOJu0YxtNECux6mJGfVsOakuhCZ5tWleIymEkl6ShOvurF91uFZHylSq bj6dXSHyG4E6QOdUmaOdSA== 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <3-v1-5f734af130a3+34f-iommu_fwspec_jgg@nvidia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231108_081150_690353_4A862402 X-CRM114-Status: GOOD ( 13.69 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org 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(-) _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2F28C4332F for ; Wed, 8 Nov 2023 16:12:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3y98ixFxo3O593nM19qAyYoIG/FuoNaTu2eXjSKXsDw=; b=efHF4pMGHZ2C02 +IZEYPl+CcpSH9FlS795Y5l6KMFx6Y5M/mr1ccZMgYky6QXymXA9b4nYFMm4i6XOq7BiAjl9zG9da NFQTrdqsUnCHovq/+6y3s+LQtkCB3Y7ejA18GGC+W9wlKxfMhDjh9ktk9F6zWVTssbV0CxnTkkxgT DzAzlPWx3WytYlXSbv67cK9J5XF/7NCkgWoZP7oHESCU8oC3GFq5VBkvTrgkzyzSzn94YNSv7ITKJ lROhaXHYaHVNBBoDx0+gtGjN/3rv1EHsAAcXHMa6VMt4FZwdmrF1QNM1sUtCQEvLpBAAa3I/Ofo6C J6s00o5EzXoVxPR4RO2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0l9m-004Gek-0R; Wed, 08 Nov 2023 16:11:54 +0000 Received: from mail-oi1-f181.google.com ([209.85.167.181]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0l9i-004Gd1-27; Wed, 08 Nov 2023 16:11:51 +0000 Received: by mail-oi1-f181.google.com with SMTP id 5614622812f47-3b6a837a2e1so1343992b6e.0; 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=k+JUR8WdFhjyZyBP3Tck8NXvEFgdFnKh+2IIJc1ILLU/qsPw43efpcszyIAuflKBCX jnDBg2omts9FRzlg9ruJY/qN6G2NUwsCQ9ypzxQR6+JZKyN3YxftznhBMo+tuQZ6af45 ujyorfOlh8fnKjEC4L5WH/ZIWcFIivwQwxLITrTT1GVWkd9CDRyjk0TpE3eR8xXkQTdF oyrbO0EIOg+hSzydpdKUbaypcyHKX/xrhgA4PcwnINVnHDQCqNwzYk6EBY1qHX6SqSEo /uCqya9Kmfzv7j6/Zl6SFksBOuzyO5eeEW3WQEyAJjdp9+7Y/E+kmJrRIiMMWlf7ONhC d3jQ== X-Gm-Message-State: AOJu0YxtNECux6mJGfVsOakuhCZ5tWleIymEkl6ShOvurF91uFZHylSq bj6dXSHyG4E6QOdUmaOdSA== 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <3-v1-5f734af130a3+34f-iommu_fwspec_jgg@nvidia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231108_081150_690353_4A862402 X-CRM114-Status: GOOD ( 13.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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(-) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel