Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3434513imu; Sun, 11 Nov 2018 15:02:16 -0800 (PST) X-Google-Smtp-Source: AJdET5cqTPQafmKlOukLsHsq628/i8fKyjsfGAFmCwhcuzo4kkmgfT+7XQlwW5+fx73PDqDMOsxf X-Received: by 2002:a63:ed15:: with SMTP id d21mr11313911pgi.305.1541977336498; Sun, 11 Nov 2018 15:02:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977336; cv=none; d=google.com; s=arc-20160816; b=vtY7EYZLoIVJLjcAel+Fg6BpJ0XaArffM/fu0xncoJXLABV+9OxDQ+I2UzHHNCBKkU I5MXv0m3HgrWNuQNjr/mdgLlhxK64fAZete1eF0vqY+rsfQkoqPJ0rRK8Gem5QesNVoI sJEIMJaLf19ErfB2dcPUNYIsqkSadZZSuYDfmJAp+cSjEPZPMvV7aioAwOKlG/136ctj uIF9WCOZqw1NH6E0jiCY/oSLxGutzwImO2jRoP1+Z6EyikXQGqPyEHPTgZKH9/85u6Jj mw9mO8QaHBbTDf72jRSvfk9gsrOv1yMGV2QkBayQagLdi7i0Q7H047DU4J1M9i4ZhjSw 7QCQ== 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=/b4ktRI/ESBUOTqx3wzkshTPqhL+GLrxcpzO+ZBcT5I=; b=Zp5CaYgD8YbBniVHrM6J7i/FOquYA8R3W8aXTFfc/4Ik2jWfVqPPdi7+9NHaY3YoSg Y1TIKaJYx+EjPj6o91Z4yd3GI/t9yzPsUxlg4F3lig4+TDPVcmVmbV7zvkYxirGSuW8T AMkPAwsuhGXLoD6AgFYI1iRQfq2m5Mj/xf+CUYKZsxkAEyUyFLtsDOuIh+F0HKJ/P0cD SujjBDdDRmCFM9DU3el7TDn+4Z95KZ29WBRZaqtQl3mMEceT6GfES4YGK9FcbnBQUhUe 6Duhfv0AYDJT7Hq7CGtCtDtj55QVOz1x4Xk2kKNXouFBSnnANG3AG6ScrzQXH6OIt3Xc MG1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cgrraRUD; 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 s8-v6si5396022plq.73.2018.11.11.15.02.01; Sun, 11 Nov 2018 15:02:16 -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=cgrraRUD; 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 S2390655AbeKLIvs (ORCPT + 99 others); Mon, 12 Nov 2018 03:51:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:52394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390649AbeKLIWa (ORCPT ); Mon, 12 Nov 2018 03:22:30 -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 E776B22419; Sun, 11 Nov 2018 22:32:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975553; bh=0qkO7WdzKK0+8y5kkIHBZTLeGOazYUwK+NfXWX3d9W4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cgrraRUDZ/CqdVYUc0HJLOEKILTB0Oj9qnT1pZiGDm2WR7rUzV5waRxHD8ZJHwOzP oGJT57xV6mmYr5cNOIr4S7EBcstrlHmLAgeBg+bkdiD75ATH0DGSy2kPM31/IADkII yu4XhZ6NTnaiM1eD5Ajq3Vpm03xmLNAhYkhkVTV0= 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.14 097/222] crypto: caam - fix implicit casts in endianness helpers Date: Sun, 11 Nov 2018 14:23:14 -0800 Message-Id: <20181111221656.608256620@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@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.14-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)