Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp1838342rdb; Sun, 19 Nov 2023 12:33:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHeiCYXrstQvsglPcgR9uVsCn64sTI5pxNvwR7fq4f+Bi9igv0jg2xQW6ufQBwU6bYRkR2e X-Received: by 2002:a05:6a20:734f:b0:187:958b:993b with SMTP id v15-20020a056a20734f00b00187958b993bmr14932308pzc.10.1700425995517; Sun, 19 Nov 2023 12:33:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700425995; cv=none; d=google.com; s=arc-20160816; b=LzYIua1VWpPA7NON2iXF7GEbmxeYxLloiL7hRjHrn1bmouNMa1jz58mnBgEzOWcvzV Hc+eB0Y4EwDVUm2cIGr0iWdooc/26bednlg6CSoY5tLWsWMqVi5fRJ+35MOcpo/1UUR/ XrGwlcZcKEfiPfwZxvZQugrWzMfV6UwfKSHeq96KROWQ+0sZIljdrZpRqNfKZoOOZ5Cc ocDeoh5WjdTjHr6hUZEQSxuE24IbaoGCif9UXoy5w6zG6E1iVlAl3CT7TkR8vi/Qq4UT o/4ARCFiUhQ/o/zeAjZcYhMqgwSUUyeZcmUlQHxNcn3NZjNt6sxQ1WujLlCuV16KPQJc 6e4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=C0N/GsvLXLMerrVETS1BggW0xNZN/t+Poplrik2aPbM=; fh=Fz83apCrKEjyMj5O6UeX0Rbv8LA9NzDgcZi7b1ijI+I=; b=ByP1ch/Ui1bjlHfk9ToiGYke5kmV/U9Q9LxA5/SYm3qV8Ndkh+NHlOxH9mA8sxfyhC /RlAZ6MiPgpAm0goBg0xnbwubOZZpSGOq3zyA9j4SVaUfcma0fBVJkhFTgob4bc5phTN VP6dTBHITFCmxClOdAIPbem3x3RS6vjr/R8gdYdO/LPmthUz/nQ3JLEy+C/iuFuDdm8E AuTl8tqx21eXWifW042R3u5U7VJDHq9yE/85W3ABlpwisjKATzExdeHt9fs20z4NU6h8 K5fzg1bObTyvjpmcZd6x9f28qH0X8vnRA/lk6CK9eHA90rHjqW+By2R047/l4tBtJdKj NmNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rf4uOkW2; spf=pass (google.com: domain of linux-crypto+bounces-191-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-191-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e13-20020a65678d000000b005b96c4292basi6676346pgr.29.2023.11.19.12.33.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 12:33:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-191-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rf4uOkW2; spf=pass (google.com: domain of linux-crypto+bounces-191-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-191-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 074D7280D00 for ; Sun, 19 Nov 2023 20:33:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B51AE12B8A for ; Sun, 19 Nov 2023 20:33:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rf4uOkW2" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4639919478; Sun, 19 Nov 2023 19:54:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92907C433C8; Sun, 19 Nov 2023 19:54:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700423646; bh=mIjg7Dvc14iz7aZ54DdQxZApJrIggM1d3bC3JWviOSU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rf4uOkW2UolgtvuKGha0WXZlnxs1NCi0TVUWidHoV7pAvCgZUx8cg1EEwbtD1lpcT noPKzKeXpeahLIHbDBsAaivFnSPYqN/2ixgBITq3A39b+kDLVjJ2/FPJb41LJ5lN/j 7dISAHzCKqH2DJengZFR6M+R5FNTY3GrImi97FAYbDuUfWREJlGsNdsJ/KNb9vSFHD UuLpdpc75pUKg67BQm7QPv0aQwBj0yB7k9a8p2fZMOi8zTBvV/7sPTk2CSPXrwDnt4 lDuDnDEbDt3TwBZpPgb4eJi3N8L/+AoP6YJ0C+DaJfHDRNh0IwFm82OGaho43xYmge uKXv6zKgKCdOA== Date: Sun, 19 Nov 2023 19:54:01 +0000 From: Simon Horman To: Srujana Challa Cc: herbert@gondor.apana.org.au, davem@davemloft.net, linux-crypto@vger.kernel.org, netdev@vger.kernel.org, linux-doc@vger.kernel.org, bbrezillon@kernel.org, arno@natisbad.org, kuba@kernel.org, ndabilpuram@marvell.com, sgoutham@marvell.com Subject: Re: [PATCH v1 09/10] crypto/octeontx2: register error interrupts for inline cptlf Message-ID: <20231119195401.GH186930@vergenet.net> References: <20231103053306.2259753-1-schalla@marvell.com> <20231103053306.2259753-10-schalla@marvell.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231103053306.2259753-10-schalla@marvell.com> On Fri, Nov 03, 2023 at 11:03:05AM +0530, Srujana Challa wrote: > From: Nithin Dabilpuram > > Register errors interrupts for inline cptlf attached to PF driver > so that SMMU faults and other errors can be reported. > > Signed-off-by: Nithin Dabilpuram ... > diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c ... > @@ -760,8 +760,11 @@ static int otx2_cptpf_probe(struct pci_dev *pdev, > if (err) > goto clear_drvdata; > > - err = pci_alloc_irq_vectors(pdev, RVU_PF_INT_VEC_CNT, > - RVU_PF_INT_VEC_CNT, PCI_IRQ_MSIX); > + num_vec = pci_msix_vec_count(cptpf->pdev); > + if (num_vec <= 0) > + goto clear_drvdata; Hi Srujana and Nithin, This branch will result in the function returning err. However, err is set to 0 here. Perhaps it should be set to a negative error value instead. As flagged by Smatch. > + > + err = pci_alloc_irq_vectors(pdev, num_vec, num_vec, PCI_IRQ_MSIX); > if (err < 0) { > dev_err(dev, "Request for %d msix vectors failed\n", > RVU_PF_INT_VEC_CNT); ...