Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9038240pxu; Mon, 28 Dec 2020 05:07:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCdGhqAElQejJFUMz4wkh2rujictbQ90upQowZ32dmnGWdN1/1zg/phLHk9P0oLcJrVhSz X-Received: by 2002:a17:906:b252:: with SMTP id ce18mr41890621ejb.5.1609160842737; Mon, 28 Dec 2020 05:07:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609160842; cv=none; d=google.com; s=arc-20160816; b=k8Bcf9qEM2RKCASq+GtaTopEZE35rTjxoFBMsLJNHCrfbtG862s90J0MGa7krVOMXz 80I/HQYP/qKu1QHOvuhdQ0RY0LESPlw2p31t8/BplJw+g1EPFeZ695b4QsyIyXlJnfpq 0ZDWZhWw7uxeepLtfNFrpWY/unNQwLa7tUvAmC6oOANpHSouwqPmhWaF9EIWFmAFSrhw 3SyLgCnQGQ30JfPgk3t4dgmebc0ljv3MiyXwBP8WbkFtu5q8Qk7YMCWNifVWW/yfDfNY MwAbCo56SSI7LjGRZb+UWoUDg1YD7Re1vQQ4jiKOQUH5mo0Em4NzcQTr0y5CrXpr2tz8 R7PQ== 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=/Lr4Z6ItkWjkjS131l3pmn5EjQL42MzDebaSTuQanb0=; b=cAvKWPDJKl7M5XF2VH7rlYYrvacRe05LQPc65ib3ZoK0E9XTRmRjiszR1rzlI9rRqC keECwNTWHcOmjAdUxLCxsXYJTn/Vg9H1n8wj8YTffonwGZLcM7uHZvMqBqXUdnoKVZOB /k/VmMOGfELI1EO6poRnq0YWi/geQskRfPhPaBa1O+pxCGE6TFEm+5B4NfZOwp22Ye55 /xMKSOETdZFcXOcHW1vgB8zFv623QDez/A4SRaeVFxfI7sc6J7bil1OjbC6fP1QTuhrA //NSS3ScrKRVzpkzoJfmjpyjvsYo5tfF1Flbhi4XWl1zuIzBCZvATQaHKn3T2UZfzytx FMHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Nk7DCqy/"; 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 gq18si18292595ejb.693.2020.12.28.05.07.00; Mon, 28 Dec 2020 05:07:22 -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="Nk7DCqy/"; 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 S1730287AbgL1NDs (ORCPT + 99 others); Mon, 28 Dec 2020 08:03:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:59410 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730212AbgL1NDW (ORCPT ); Mon, 28 Dec 2020 08:03:22 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DFF14208D5; Mon, 28 Dec 2020 13:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160561; bh=SPLp9f0aNYouVDYwphkyzjOzpzihlP3PNM3XX/4RLcE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nk7DCqy/fq/ywQqnPGHb2HrUJ92fXjb2NF2Ja0vxwSutm7F72N0mTZt/NB/0yvPll yzZnbuzGkELfs+vvQGsyuRV6OZmx+auJBFYobhvjsa7hMp9v9XRYgTjk/TnK1K+1T4 ioqsg+pg06zP/xjzYFPwUfRnCS/FJqb4Rx7UGHWU= 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.9 053/175] crypto: talitos - Fix return type of current_desc_hdr() Date: Mon, 28 Dec 2020 13:48:26 +0100 Message-Id: <20201228124855.822829518@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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 059c2d4ad18fb..f4a6be76468d5 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