Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3478304imu; Sun, 11 Nov 2018 16:02:05 -0800 (PST) X-Google-Smtp-Source: AJdET5enYKmvjtZmcfMxDYYTfiioxUrgHbznhBoAGzfWtVVMpB34QWLds+3j1TsrnnslmYbFImMh X-Received: by 2002:a63:62c3:: with SMTP id w186mr15803483pgb.345.1541980925143; Sun, 11 Nov 2018 16:02:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541980925; cv=none; d=google.com; s=arc-20160816; b=VcUO7widQYosNhNyHqyLAdLRUA5m2UDhNZE7mkWIjZ9nL4ND4ar5kCwGmi6eRYe0N7 Q/dxYLM+TMtjVQvNj6wbke+cJa9rbLgH2SIBhnkcBZz+5kv1c4spTr4lkg5Uj23q4a49 auzj0k18zbvP29FTdDD7c5UetXhQQG5ngkNPVo22wv5Kq9L+tyQuwg5+wk5vcHDzaqxk GvrfglxWRl1mulj7CChDKP5Mj0PbCuxAIBJRaSMiIPytLto6d21PBlh4zLYdO+0nRkfO 2sfdrhHyC/9bsk8NW0DTNEaxR648F6Qa2+RIzvGMQQ0FB9uuAU9QznXfVYxRUpIugdzQ v+pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nZvfVcfh5e3ERMOfyTlDE5w2k6s1F8LfubzB1rvD5NM=; b=iwEIqotir6z+o2/UnYhVNF+JBJ+GPSVwdOzWnAylCIvgOKltrxwThUGeBEh2GNdhL3 ReB7/iVQsFS9ZEwFUtruRQ3XqveDjslXr7L7BhPQtXcIzVUgwhGvROpCbc3Bpja2tVE5 IVX8Q+hJ2z3KgoxzzgCPM0VBy6K9Rkk9gUJQSfKLXzk7z7exCnTxOdmJuAYCZ29RjHxr lpLrmtV/Dxwyx0WDgEZ0FOOCjsLt4gk2A80oQy99uUsk5UwFomo9UCeBC2Qn0yDiwdyk MIw7dPi4PxmS3wo2vC2salMzZqLtGds5Jk4oHMY0NXpGNEmneaFzDLddgHUizG61rPPC noGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FrFJKjyh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g137-v6si18065537pfb.34.2018.11.11.16.01.50; Sun, 11 Nov 2018 16:02:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FrFJKjyh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732582AbeKLJul (ORCPT + 99 others); Mon, 12 Nov 2018 04:50:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:35400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732315AbeKLISB (ORCPT ); Mon, 12 Nov 2018 03:18:01 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9CF71208A3; Sun, 11 Nov 2018 22:28:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975285; bh=lN8xakzGI/oMQ5zpPfchV8COeM65dkVRE4NcNt47e24=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FrFJKjyhmqmWMPfLHWa1atNLMbX+CYmWTYr9Xcg0tYYwXiAfJ0G1oe3McRZDByWgy vtwo2fHgrPHszvtaaUS1TVLQY12P9byvDoQXMa/biGt8vBGy9++DXOwhKBTDJ+evRA AO7FtxSnGxCQvg7aEekQYiIee5yVrGT2Gf8X/QZE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kbuild test robot , =?UTF-8?q?Horia=20Geant=C4=83?= , Herbert Xu , Sasha Levin Subject: [PATCH 4.19 172/361] crypto: caam - fix implicit casts in endianness helpers Date: Sun, 11 Nov 2018 14:18:39 -0800 Message-Id: <20181111221644.428946301@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: "Horia Geantă" [ Upstream commit aae733a3f46f5ef338fbdde26e14cbb205a23de0 ] Fix the following sparse endianness warnings: drivers/crypto/caam/regs.h:95:1: sparse: incorrect type in return expression (different base types) @@ expected unsigned int @@ got restricted __le32unsigned int @@ drivers/crypto/caam/regs.h:95:1: expected unsigned int drivers/crypto/caam/regs.h:95:1: got restricted __le32 [usertype] drivers/crypto/caam/regs.h:95:1: sparse: incorrect type in return expression (different base types) @@ expected unsigned int @@ got restricted __be32unsigned int @@ drivers/crypto/caam/regs.h:95:1: expected unsigned int drivers/crypto/caam/regs.h:95:1: got restricted __be32 [usertype] drivers/crypto/caam/regs.h:92:1: sparse: cast to restricted __le32 drivers/crypto/caam/regs.h:92:1: sparse: cast to restricted __be32 Fixes: 261ea058f016 ("crypto: caam - handle core endianness != caam endianness") Reported-by: kbuild test robot Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/caam/regs.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) --- a/drivers/crypto/caam/regs.h +++ b/drivers/crypto/caam/regs.h @@ -70,22 +70,22 @@ extern bool caam_little_end; extern bool caam_imx; -#define caam_to_cpu(len) \ -static inline u##len caam##len ## _to_cpu(u##len val) \ -{ \ - if (caam_little_end) \ - return le##len ## _to_cpu(val); \ - else \ - return be##len ## _to_cpu(val); \ +#define caam_to_cpu(len) \ +static inline u##len caam##len ## _to_cpu(u##len val) \ +{ \ + if (caam_little_end) \ + return le##len ## _to_cpu((__force __le##len)val); \ + else \ + return be##len ## _to_cpu((__force __be##len)val); \ } -#define cpu_to_caam(len) \ -static inline u##len cpu_to_caam##len(u##len val) \ -{ \ - if (caam_little_end) \ - return cpu_to_le##len(val); \ - else \ - return cpu_to_be##len(val); \ +#define cpu_to_caam(len) \ +static inline u##len cpu_to_caam##len(u##len val) \ +{ \ + if (caam_little_end) \ + return (__force u##len)cpu_to_le##len(val); \ + else \ + return (__force u##len)cpu_to_be##len(val); \ } caam_to_cpu(16)