Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9130765pxu; Mon, 28 Dec 2020 07:22:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIHfn1g2J47xTS32eoTmxBaqjFONIq1TYp4SJc6Phfrgi5oris0yeNcV/sujqCJmr3+cFr X-Received: by 2002:a50:e8c4:: with SMTP id l4mr42222090edn.337.1609168950299; Mon, 28 Dec 2020 07:22:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609168950; cv=none; d=google.com; s=arc-20160816; b=qn1ug4Hpj2Z7OpIIXb8fJnH3bPVwn7RR2VyMV3MPqqLQ2eXWwofAwK5xssv5ug8g9b VI0Vv0p3ajrG8MnBe6JGHSnANnaKoZ/Z7Lie5bYilvyIWLJHnZZ2COkBpAFz9PSHRz1P lJA2Trjy6nSpWWHIqdjAMb9R24RtnMTMGrtgIzr5KtcK5SFShLgsfC1Bb06GiaHuFpQ0 JdG9DYGNsJYg2RA2OsLf9yQqbeu+ILOPXqlwPUbxdxNjWg6jIrISvO20hILWr9Q2WL68 mKlq8NT3uG9SsQlvcjMSgSKqKyPbp0RWisMfc4B0Tl9+clXQpwbOqhF1t/+0kHO7UIyX chrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7eOUjqrXqSJBZ9JmNb3DsGev7VVK7G0DPWO8IVqStb0=; b=De/pyAaP+adPugK/Kv/0UW6GQMTAgNLEC/guAS7jPziO3x9s8WYEsjPPp/s8Twd8lw cKOpozafopz2rZ/7BRlhFUuPHTTk1Lrg8yKrhzhUHArVBslASU5gDsTMnG3qN7SBqExX Y7QkQhXa2qCb542lkjiwMo3hGd2tvqmfbUjuIl0bo83SEqLSQ3JtpcD33YPslOgdGhdT eZiPySHWtKEA1lKRb1/Cx/GD9rRapNAv9p0MBDcdNOF6srLMUeQryaS+HDaQ5D0e1Fde HZDndC5Sh9jeVIImUAFeHWCuuiQQqKXUflnmVNm9mtHoJ3qioylcGhAYbncZjZAjG3ym Xp9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tUjT+OpB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u22si20037327edx.500.2020.12.28.07.22.06; Mon, 28 Dec 2020 07:22:30 -0800 (PST) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tUjT+OpB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437094AbgL1ODM (ORCPT + 99 others); Mon, 28 Dec 2020 09:03:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:35112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408227AbgL1OBK (ORCPT ); Mon, 28 Dec 2020 09:01:10 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6640B2063A; Mon, 28 Dec 2020 14:00:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164030; bh=xXmUcyNx60P9UdWq+qAIX9MVbO02kG2WpvxFUgk9teo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tUjT+OpBW22llVe1B9hepJNXZsquWMCTlKjm4qMy8iYovX71CyDLzGtpEFafBrKzx IOvXOF2pJj/urbPzNRPuttl6Cq36CgimddwuzVB4Rc1CRhSNTbbHatsoNZxUl3pwsL whgy6TMY0Vew6pCBuIKaoKgujefn7ldAAjZKAvUI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe Leroy , Herbert Xu , Sasha Levin Subject: [PATCH 5.10 035/717] crypto: talitos - Fix return type of current_desc_hdr() Date: Mon, 28 Dec 2020 13:40:33 +0100 Message-Id: <20201228125022.674149674@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe Leroy [ Upstream commit 0237616173fd363a54bd272aa3bd376faa1d7caa ] current_desc_hdr() returns a u32 but in fact this is a __be32, leading to a lot of sparse warnings. Change the return type to __be32 and ensure it is handled as sure by the caller. Fixes: 3e721aeb3df3 ("crypto: talitos - handle descriptor not found in error path") Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/talitos.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 1de6b01381268..a713a35dc5022 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -460,7 +460,7 @@ DEF_TALITOS2_DONE(ch1_3, TALITOS2_ISR_CH_1_3_DONE) /* * locate current (offending) descriptor */ -static u32 current_desc_hdr(struct device *dev, int ch) +static __be32 current_desc_hdr(struct device *dev, int ch) { struct talitos_private *priv = dev_get_drvdata(dev); int tail, iter; @@ -501,13 +501,13 @@ static u32 current_desc_hdr(struct device *dev, int ch) /* * user diagnostics; report root cause of error based on execution unit status */ -static void report_eu_error(struct device *dev, int ch, u32 desc_hdr) +static void report_eu_error(struct device *dev, int ch, __be32 desc_hdr) { struct talitos_private *priv = dev_get_drvdata(dev); int i; if (!desc_hdr) - desc_hdr = in_be32(priv->chan[ch].reg + TALITOS_DESCBUF); + desc_hdr = cpu_to_be32(in_be32(priv->chan[ch].reg + TALITOS_DESCBUF)); switch (desc_hdr & DESC_HDR_SEL0_MASK) { case DESC_HDR_SEL0_AFEU: -- 2.27.0