Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9043620pxu; Mon, 28 Dec 2020 05:15:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwyo3Df1qjmARYGAPCehYchTLGBp98leYveR4RXgIeUdpZWGZlcdtHdGHaJ63ALjwL6JF/+ X-Received: by 2002:a17:906:971a:: with SMTP id k26mr42281673ejx.279.1609161323749; Mon, 28 Dec 2020 05:15:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609161323; cv=none; d=google.com; s=arc-20160816; b=eEGHjBQGJI2VR5oBM2RhLyHGYfmEl25OYd+KjsvlV7K35x6b5zF4gzHzAOBIkHNFu1 8c8R6u4dE2Oc1+ur3TFeridnycLHT4aHrCSOw0/p3Jsq/LSAWvgI2aSmmC1kLDBjAJLv VerMo8SXsfwltoiFmskRDU+sCbGI0VBU4aSTmzUgvn69CyB901wYEW08QLAMcwaPWU3z ZzRxnivw2bFhiNE5tk0MMwPtcTg5kw8JiqWis3kUXE2UjpiaGWFw8ncHII/omgdxCvSm TKVQEvfGN39XyMSRsMrWNDSNEZLfQXGfQbe/ard7lD0ktfX7ayPrRd7JiVUYm1xGo9LL XP/g== 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=Gr7Fv4U3zd7IMo56/3I7HZPYUoiC2AkiehuUUV1o34Y=; b=wJeKMK5T1ZpKlXDSRgqR0xFTcGgnVAiorYRkbQyNO9vugv6D5/zMW2w/r+FBcR+198 CF3ifDO6hucxo230cJIs3FtHQO1co0Mx8oqRbL68nIBGMm8NJCP7Yj2nOCBtSfd1Mh42 Fdh8/2FigcFBB4E5EpuizoeGj/mvTp8JVwbuzzfGkVoMnu73oWA5scp4Ew7c7sZSWbfG JDTsFG2jgZBBL/7akoC+jtyZAqoA2+x1SaISe9D5MxivTqUFqo7EZd4RCuoJOYztngXu pnWRGGk2Z5zOelAjTAOIQOpZSHN9k440RDWgkqHNznM5+eETYKaiDVu+dnLF3lbJZKlY XpFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=A9ZG1PIT; 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 y11si3065309ejd.56.2020.12.28.05.15.00; Mon, 28 Dec 2020 05:15:23 -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=A9ZG1PIT; 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 S1732119AbgL1NMi (ORCPT + 99 others); Mon, 28 Dec 2020 08:12:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:40288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732058AbgL1NM1 (ORCPT ); Mon, 28 Dec 2020 08:12:27 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D8FCD21D94; Mon, 28 Dec 2020 13:11:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161106; bh=v8xGXZpQ0TfXnuv4B/zhEACipqrrttL22vMUL/cuUI8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A9ZG1PITiHVmZy04pBs3qGHh3a4XBJHwkZtFieGCkAItTM65fi7eBj9442zxZbW0J kT/aUn3ec0E9vqhW8P67LkhzXZ3zZdennPe795kOwSWpeQU9CCCr9EV92zu2IEbkTY zg4l65SMLgnZXDYK8x2FmyH1gVyvYhtfqetoI1KY= 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 4.14 075/242] crypto: talitos - Fix return type of current_desc_hdr() Date: Mon, 28 Dec 2020 13:48:00 +0100 Message-Id: <20201228124908.379018203@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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 6c8a03a1132f6..8028fbd5cda47 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -447,7 +447,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; @@ -478,13 +478,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