Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp200666iog; Fri, 24 Jun 2022 02:15:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uEm8FOPH8NOy2/PiWOjnYu6cRXgR2lG/Pd/UKFWiyptkL2QlCnQV6TesF+8GllOcmPOqM1 X-Received: by 2002:a05:6402:42cb:b0:435:8c3b:faf8 with SMTP id i11-20020a05640242cb00b004358c3bfaf8mr16309845edc.300.1656062140816; Fri, 24 Jun 2022 02:15:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656062140; cv=none; d=google.com; s=arc-20160816; b=zFJNhbIbcF64nwd9t8R9Ul829sfo9QLwnUwJ68vT52LQzYwj7AzU9kOqu2q7FVFr+k +XRSlSSHVJ8L2iQugRylWPekPTlEeestdirtjObOa9EJYBnjHCL+82xH9Kpu01DlDk2G 8zw73gN8WGrhjg8894OOmJ0y2b4NcIC8xnPRWRSU4UXha3HRFTnVn6Q+lhIpQ2YSeQeJ G2t29hTmO/ci9asAExuIqeJwriBwq8sKLP2cHpulpNPREecM+746LuX4TVwhBfp1gPMf fZMH+XgEFf7GCD+Ghv9jNdQlv2gtqXxro4Y2RZ/qW1t6x5vg8HznB6kUqNhODqbMlDKe pg4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=RxI6ikXbg+m54ghJ6vKRKhGlOb4XzHJHsjOoPvqrk0E=; b=bmrO5dNcss0LPxFHymFpTFddGXV8sC2y79olaEkhtHbWnibF2UpGzD5TnrrzaA+Rnl ba9qCVntbdn/M9K9YQ966/D6HlI9L4gu55/OMrASTJ4a0PgyLJUB+Txy+0aegIape16c 9RxlBI2HbOUC1VYXYlRyNnNoH9554/hDAU2luHLZojiHhtM0WqPCJyXl20VC8oPHBxpp iyIHNuncsrc0oDV/zaomewyVVZMk13eM+wV4pqQNBZG+S8TZNFgy+zHcrx0memz+LBCT NlddBFUUxDNi57ToA7oF30DdaLxpiAwvqLhMgxZy5UJdnkE1y6jq5mD2tZM4j/k+qh0L 8l1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 9-20020a170906308900b0070d08e9f4fbsi501151ejv.615.2022.06.24.02.15.05; Fri, 24 Jun 2022 02:15:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229828AbiFXJOl (ORCPT + 99 others); Fri, 24 Jun 2022 05:14:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229768AbiFXJOk (ORCPT ); Fri, 24 Jun 2022 05:14:40 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE2B54F1DA; Fri, 24 Jun 2022 02:14:39 -0700 (PDT) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1o4fOc-00Ai3g-DM; Fri, 24 Jun 2022 19:14:35 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 24 Jun 2022 17:14:34 +0800 Date: Fri, 24 Jun 2022 17:14:34 +0800 From: Herbert Xu To: Tom Lendacky Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , John Allen , Rob Herring , Marc Zyngier , Lad Prabhakar Subject: Re: [PATCH] crypto: ccp - Fix device IRQ counting by using platform_irq_count() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Jun 13, 2022 at 02:16:27PM -0500, Tom Lendacky wrote: > The ccp driver loops through the platform device resources array to get > the IRQ count for the device. With commit a1a2b7125e10 ("of/platform: Drop > static setup of IRQ resource from DT core"), the IRQ resources are no > longer stored in the platform device resource array. As a result, the IRQ > count is now always zero. This causes the driver to issue a second call to > platform_get_irq(), which fails if the IRQ count is really 1, causing the > loading of the driver to fail. > > Replace looping through the resources array to count the number of IRQs > with a call to platform_irq_count(). > > Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core") > Signed-off-by: Tom Lendacky > --- > drivers/crypto/ccp/sp-platform.c | 12 ++---------- > 1 file changed, 2 insertions(+), 10 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt