Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp170722imd; Wed, 31 Oct 2018 16:44:49 -0700 (PDT) X-Google-Smtp-Source: AJdET5dhZRlRq5LltbZZbalXlEt8L1aMJXL4CzrS9dpoa0/Jpi4Monx9Twe7FKIGccSsPLciAm2u X-Received: by 2002:a63:5102:: with SMTP id f2-v6mr4951333pgb.31.1541029489275; Wed, 31 Oct 2018 16:44:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541029489; cv=none; d=google.com; s=arc-20160816; b=QLw2e2vNF4jdhrvCCWjHcHsTV6A5sUo8AkkgDO6SHbbeU8bfL2WpIa0O4fH9RMvHJq JWB6G9G98SUSGF0axT2klCAJvYmrGmRP72DZcAn+qkFnWUI28zH46cndQ1KRBAoFc6JN /aT7jjHj3NS/mOpzPtR6fJcdlRDjEsIbs/VbbcjPjxzqrm3QePpg1MDiI4hWphCEUkmR YPNsYSPjLgoQAhEYr/3rkDMHIm2bFNGPUgwMyXcYuCg3XSvflH1cCNhcUgPP3jdynLWm 6cXP+mVnm4z0QE4j38F+0vEFvujZ79sLY3gIvrOimb0La+agj50AfE2dx6k2SMTIjSpI OOlw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hJXyyuKWIlqh4T3lfMHpQ3ta/BLd5L07gOF/31H5ZMI=; b=vlaLLYtgXTIpQ/JZOBCO8HPf2d+XM9wGYP4zb5MCek6GWcTsuuzQokXtJhx8YWCRIr ryvHw+eH/S4djoL7VIa5o+reFg7r6ixmLq8syZcINor+IIIoFLgknlmoyYNfx6B2U2oB DfWeu2Sdav7GCOlXeuJ773+hhOyvdJfHQGp54dIi/PY4+0EmM3VuFVdtQSxUVozIb82c bItxg/spZFaiQR0SfqF0Co7acumhDBNDbOAEjtHih2PwL2Y8LbHpv2JpJMRORvaBZde3 WNzrJ8G8OaziytBZgNVokzfj6JVuhFfKsXaVsQCFO+EjmUa5H/IvyTIeoFEjJHBxTLnz 4p0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vWZ+bJi8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b16-v6si22864163pfb.89.2018.10.31.16.44.34; Wed, 31 Oct 2018 16:44:49 -0700 (PDT) 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=vWZ+bJi8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729198AbeKAIHs (ORCPT + 99 others); Thu, 1 Nov 2018 04:07:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:55964 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729065AbeKAIHs (ORCPT ); Thu, 1 Nov 2018 04:07:48 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E634E2081B; Wed, 31 Oct 2018 23:07:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541027257; bh=pC3wMmp2/pTskeHuGJa/bBSw0Liu/94Ewotp1gtTZIQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vWZ+bJi8Q4fdCLqE9ZO58H+vDR4nI/Rwvb81IEER/8E6b96SvtDb/5zMI+vUG6bOI QLhpf76sM4BiBuxy97tOJFS8T23BhZkHc4BKgCk5v9TQxsZdpWBOeICXCqShyVDkVH zL5nixp6V27AalfFMjTzm4lPlZIQcNkk6DQCMGgE= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Horia=20Geant=C4=83?= , Herbert Xu , Sasha Levin Subject: [PATCH AUTOSEL 4.19 128/146] crypto: caam - fix implicit casts in endianness helpers Date: Wed, 31 Oct 2018 19:05:23 -0400 Message-Id: <20181031230541.28822-128-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031230541.28822-1-sashal@kernel.org> References: <20181031230541.28822-1-sashal@kernel.org> 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 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 --- drivers/crypto/caam/regs.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/crypto/caam/regs.h b/drivers/crypto/caam/regs.h index 4fb91ba39c36..ce3f9ad7120f 100644 --- 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) -- 2.17.1