Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9191749pxu; Mon, 28 Dec 2020 08:53:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQtKLf6xY9NhqSSrWS+DFZZEj2vxDuKhMOpP3rz5zG/8Ji0aS8QHXksaXcS7vFGlx6KN2M X-Received: by 2002:aa7:cd44:: with SMTP id v4mr42848092edw.156.1609174429090; Mon, 28 Dec 2020 08:53:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609174429; cv=none; d=google.com; s=arc-20160816; b=U/ETsDBd6C/V1PBTIwHcIWfA7FP5sbJbAS5K9CvcYUr8g7+PTeYaxNzYqhQS8P1NW+ 1X7r3sKLDdrs8KVFbto2WlNe7pIVYAEyvsS4v2LvsgvlPEDrqc0OqdJbUSEE2/FOihsg kUwkALuVmWP84XcFgsWZ9O3yrCgtTgLwPnhr3lwg5xKAT+NHOxR3O3wOwV0hjx7qwYM+ yeFjARSOAz8f6vyPFdTxAjO73F8V9KIAI0EDbDmijn0hpOkUypj+lQgBe5Wa2Sg0u/Gy 24CoYkfK6vzJ0/o6LUZsLxLRhG6Vb8Qd9nU7UQE3YukViu90s+GWw5GbjqFgQDffEzmX 4gZA== 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=ref3yjyO8pXqWJkNErMCaVm90jR9cycLTHZlZ9sj88U=; b=UrP16EFYi4s9SXR8KBhZ+GthErSc+/C4+mPn/4M8qbykUqSKiV87H9W6VBLBLO+fqt K3rhIC5fODnv4G0dXqpBpMKNMd5LJ8TTP355j7taJUFFQMTclmmaBrWS1hG6lCc/PSGF qEksQZ1+s0VF+ouDn1aZ/66aDtGmFpLy2G56AO+WEp4GHCfWushQVH1PfylH+/e4lW9G ll+m68OpLOHGlHFmtXMWZHeLYOgvNAKT95FPCpJvwDwKJLCNQM+zg351qLXzRWxaMTLC L6XC140Glyo5FxRAPSDAvSVtbUmi54CRWVi3TCVCq4R5v3px4InolLq63EKQGiO5NUqi xuRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VrRWPFNJ; 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 o26si20548181edw.74.2020.12.28.08.53.24; Mon, 28 Dec 2020 08:53:49 -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=VrRWPFNJ; 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 S2441788AbgL1QsZ (ORCPT + 99 others); Mon, 28 Dec 2020 11:48:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:50460 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728187AbgL1Mxe (ORCPT ); Mon, 28 Dec 2020 07:53:34 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3525022B48; Mon, 28 Dec 2020 12:52:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609159955; bh=XPrLHvjy1D0U7+uWTrMugontJHopxbq1B2WUlSbEi+0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VrRWPFNJj+cifINEKYx3qgM4gFnkIW8n8pcVLikdwPeKkXklEUfzmFdWedF9wLKCB F9IUHBZhZ5tC54ie3AR8Y9nL6oidabs8GT/gml8/cwgxgAwAAYQgL+mmw5TLyh18Y4 cPwppgCN3vogH/eal/f8HN0f3cuC6+efkSmszUAU= 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.4 034/132] crypto: talitos - Fix return type of current_desc_hdr() Date: Mon, 28 Dec 2020 13:48:38 +0100 Message-Id: <20201228124848.055276573@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124846.409999325@linuxfoundation.org> References: <20201228124846.409999325@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 1c8857e7db894..cfefa18bca28b 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -440,7 +440,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; @@ -471,13 +471,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