Message ID | 20241008055644.4900-2-hardevsinh.palaniya@siliconsignals.io (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7CBE4CED26B for <linux-arm-kernel@archiver.kernel.org>; Tue, 8 Oct 2024 06:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kHWe78rzSD6866GSL3KwDIyM6RpSgfXpWu8ZOMo9KfI=; b=vKxU4nGmlFOLbdTiZkUZTnff8V Nca2/yelbOLyPKkqCgc9NZIQDKSnXA66KPVdatNiJ5tgI9mZuVnhqfACyL/6oPRJxANY/WfEUzE7g qpAexjX/f4z3pERQHOfy2zlidyqBpyiTRBpNP+8NJat0tBQ5RSg5/baXFJqMHpvhr03hbIryf4HTH ujVIWEOncQPkorfYQ4WLe9DlF7XID1sEtQcLty8/9JsM9KYOHKVJ/BrTvPS3rTh5fEPt7z4TyWJas T2uEPya3Y5ji+UUItx+SG2NcgGAmdVFtcHHbqL3A3Qa+xjcNV8wJ/g79Q0GNFl5y/H+nF3vk96Qa+ sF1Af6JQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sy3GU-00000004bUY-2IMH; Tue, 08 Oct 2024 06:00:10 +0000 Received: from mail-maxind01on20712.outbound.protection.outlook.com ([2a01:111:f403:2020::712] helo=IND01-MAX-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sy3Dy-00000004bE9-400U for linux-arm-kernel@lists.infradead.org; Tue, 08 Oct 2024 05:57:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=X0SPfis08AiouOucDpk98Sz9XZ1n+CaXtuQ9JeHPgQiiTh2Ns0VWaOuq/h3l8+n2lJ3a9XUPFQn4TiaWi908zXPBBg/qzcbeVjOfMPSyeNebuqGMjsiRK5nL0e7Vw2OEF1Ce/wLjnRKEqCxEHnJYhIX6rApnoQ8vk6PD2nkLVAg1CZSVBvptgI2PKx/iEbj6o89cOEjllBXTYnPEgbg54ZbLyVxEyyc5Uopacbd8KACBjWou67QP9AQWMwZsiTZVvyrXNDY1ClJiUXtpYd0HS/eaWdJPiQirao1ahEyMl83nfVRWLP3j7ikJWGZZAFtDR7buLkxH9TglR8KMVhIXKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kHWe78rzSD6866GSL3KwDIyM6RpSgfXpWu8ZOMo9KfI=; b=OwO8a15c6NjYNBIH0x+Qab2IiC3gAt1WuHVRWYJ3bhPCFfK2t7dfCsbALDFVGi/pa9UL1tGT/hGiavQZJHrnRcuav8+q4Wend8GL2S9YjAKNwzsX5bkoN+SzkkWWUhNx8VtctZuAn1W4TNSqp04W3LMoxoVQrJNfKxKB7p4igHwISvCdKyzaCmA/rH1KwfW3TzUmo83D7KvLLTFkUiWYof2uK6F2gPmeF58JUKF6AxuXFFxhZ/lveti6B0Q0judHJdDFicoA95nOl9+N/2wHDSKwqmC/skSIfRnOQswoNp1m2sivlViIdgqeUXeL6Oh7swFSGx713y50v8c2G1leVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siliconsignals.io; dmarc=pass action=none header.from=siliconsignals.io; dkim=pass header.d=siliconsignals.io; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siliconsignals.io; Received: from PN0P287MB2843.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:204::8) by PN2P287MB2160.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:1c5::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.23; Tue, 8 Oct 2024 05:57:19 +0000 Received: from PN0P287MB2843.INDP287.PROD.OUTLOOK.COM ([fe80::1134:92d7:1f68:2fac]) by PN0P287MB2843.INDP287.PROD.OUTLOOK.COM ([fe80::1134:92d7:1f68:2fac%3]) with mapi id 15.20.8026.020; Tue, 8 Oct 2024 05:57:19 +0000 From: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io> To: olteanv@gmail.com, broonie@kernel.org, frank.li@nxp.com, shawnguo@kernel.org Cc: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, linux-spi@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/2] spi: spi-fsl-dspi: Fix casting warnings Date: Tue, 8 Oct 2024 11:25:45 +0530 Message-ID: <20241008055644.4900-2-hardevsinh.palaniya@siliconsignals.io> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241008055644.4900-1-hardevsinh.palaniya@siliconsignals.io> References: <20241008055644.4900-1-hardevsinh.palaniya@siliconsignals.io> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: PN3PR01CA0173.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:de::17) To PN0P287MB2843.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:204::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PN0P287MB2843:EE_|PN2P287MB2160:EE_ X-MS-Office365-Filtering-Correlation-Id: 451b03f5-ca67-42de-6068-08dce75e120c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: 8LC7g6yx1OMeF/ZzkFTgsqdoi4+2epRpra/lLuRnffNkrCmfyWWt8KHuWnlCHNdz43zAV1y3xz+fMA6BAoT60tGISd+zbW3lYcv+RbdMDIgal2YGOfHqL6vkNCmGXddv/pCau429jgc0JDQekfbQRutHbO8uYSU07N1FZLvRWAwPhwz3n7A+VPMUMcc5cU9WqPEYRvr4a/mvK9OQ/HvGSTFPXlPQfaRIv6+XSE91rxc42rEB5F1LgffDigPtRnhN6oZTeufWnP2T1KGLT4HB4Afc4kS4OwG0Gd85xU+NcWYeFMcpMR3Hkz3m74Z0QppZB8KXqFRGq2KgjCOQxrDDc1zaTblKdozi8m7vDbYMvrAHjdRFHIDjOjjoGmURbu5PS0FNBQKDsnxCCtisylmxCgyEGZxFjfY2+WYCTOWHD9HYdrxJmVqwNV/zbPyOsXoEb+tdDFVIucedWcy7YirkTGIA5Hvh9XjdCCwjXh9DUeV+f36EdnOpncnF8/kY/br/0PseWs8pmrJDVtqxZGB290Hi1169jB9lGcHFT3on9YuX/xlrMuKnGeZSFeXKakilkuDq3fO/udONspZVBTNM3bNuDDVbWeYcy3f/ZeNHfW1puk/K8QcaqZM45jtVY1NCB5QonxYTBKyqqHurFb7+A3XgC1eXUbw3V1R6YAvc10uih7uzaidKyuFoS6dbwkwwBYs9Yt+zfZ6IHr7E2kq9nMr8MYxQT8YKC8vkGVt2bayx1jZJ+tnJXJLvWR6Oe1oQ55AE3e41mRy1NniddI34hfyZWzZainMHqmZYf1wOZzNxSfwKrLB9HsUBjC7GjZis6rMSXe1uGBdOBhUhmXWEmZqoVL1X9LOCXIEujlPnXJdrYyfZQiSEpgj29xZ3DpiYPC1WMeAHjkk5yF9mcN/ulJqS2tGW++tSpZ1wg68hPWFJl6w4XARUWESYdOm9HMJkJSFFIovIdO/w7CafbyW8iNK+E8zsDS4F4AFSaDmbb7ULwlK1Ygb9fuHKgppOZzFCSVCst8YJsor2iiMS6g1wEu6Rt3KyhHqWLO5z0S6l1YUe3pjcEnooz7Ob80QftW0DNUwicEMNRCXlxCSEotVdQkcV1qnHefShNVprnZ1+4YNkXl8EVStPf/1aU9TttdeZdEqRy8NAqWhlEAtHY2peckO5nwEajt8dgDCS9KeSxngjJAaExiqkBMYId8V/chE+Z123an8q1nDrkAFwsuNUSN+/+XVbcp17BBQ2dsktEQc2tAjRTAOJmXOmgOQuxG1ULZnl3cdc+MrfNa8MYQ6aG2OxqAPv1swaUQwQfFXghIRMdTvu+EvX680PB78WwDGOM7dkmpxN0Xym/G9LTQT9rw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PN0P287MB2843.INDP287.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VQNFJ5WJS1Q01UteSEsBOrJwHJOAYtUCmgysqHUWVz9n7CSkuBP7EIaCzGPgMpbbvRh9u/A8CmPAxkFMgvvDbyt4W8F5l9aIA9w3cRT+1IuY5NFKGcs2AoSAhCdbdpRisjngbtTXtg028p1/hz3y7/vV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+CIMUD8zPp7sSGARVRrFrfHDWmg9hv7Kb57AzSXJwbJIGqTeGIAkXDykOjgK85zLG7vE23MpBkWwGSlb/GqhkFKbmIAY648wYcCjvOQsTOqk1BSbU1Ciwt0f02digUI+gAf/1jK/h4UhDgyLgBRzfA6/YrFgsCw0Z4cOQRnMSzXMUoN2OdxkFfEE8acgMFit1ntXs8X43wSkyQjQuL2YyGOrwoWcviUC9f8ZHHOVASwLeWsItjzeagg0446SjOT5Sa8CMON5XBjbkO9yDjc9RLe5H2VVSshyF4SPT378zJJILr/0qjd+VgzGWuDfBr9rD4L3boNj7IhGJk+eaoHCIVYoKCN0gqerhPCrpUY3nWhsDgdW9RRscStyQhNoIimP0R0lse2dqRa2BUoIRLnjmN4OdsYdbbObJ5tV6VR6MQDv5mbFmA2eCmLWfEzxye15t X-OriginatorOrg: siliconsignals.io X-MS-Exchange-CrossTenant-Network-Message-Id: 451b03f5-ca67-42de-6068-08dce75e120c X-MS-Exchange-CrossTenant-AuthSource: PN0P287MB2843.INDP287.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2024 05:57:19.6251 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 7ec5089e-a433-4bd1-a638-82ee62e21d37 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Jqa31avvNkGa6cv6FBeYZY41nJQG7qEF/wPf7QfsC67eufMbk6KH2BWA9NBEjaKXQ+Vx7TU8GcCapQsF+xEGxJIz5MzeH61BooZSNEGbYTU4zy9jma+/PUlnBOYjnR5j X-MS-Exchange-Transport-CrossTenantHeadersStamped: PN2P287MB2160 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241007_225735_019351_56BA7C78 X-CRM114-Status: UNSURE ( 9.35 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
[v2,1/2] spi: spi-fsl-dspi: Fix casting warnings
|
expand
|
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index 191de1917f83..e34588679514 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -280,25 +280,25 @@ static void dspi_native_dev_to_host(struct fsl_dspi *dspi, u32 rxdata) static void dspi_8on32_host_to_dev(struct fsl_dspi *dspi, u32 *txdata) { - *txdata = cpu_to_be32(*(u32 *)dspi->tx); + *txdata = (__force u32)cpu_to_be32(*(u32 *)dspi->tx); dspi->tx += sizeof(u32); } static void dspi_8on32_dev_to_host(struct fsl_dspi *dspi, u32 rxdata) { - *(u32 *)dspi->rx = be32_to_cpu(rxdata); + *(u32 *)dspi->rx = be32_to_cpu((__force __be32)rxdata); dspi->rx += sizeof(u32); } static void dspi_8on16_host_to_dev(struct fsl_dspi *dspi, u32 *txdata) { - *txdata = cpu_to_be16(*(u16 *)dspi->tx); + *txdata = (__force u32)cpu_to_be16(*(u16 *)dspi->tx); dspi->tx += sizeof(u16); } static void dspi_8on16_dev_to_host(struct fsl_dspi *dspi, u32 rxdata) { - *(u16 *)dspi->rx = be16_to_cpu(rxdata); + *(u16 *)dspi->rx = be16_to_cpu((__force __be16)rxdata); dspi->rx += sizeof(u16); }
Sparse warnings: drivers/spi/spi-fsl-dspi.c:283:17: warning: incorrect type in assignment (different base types) drivers/spi/spi-fsl-dspi.c:283:17: expected unsigned int [usertype] drivers/spi/spi-fsl-dspi.c:283:17: got restricted __be32 [usertype] drivers/spi/spi-fsl-dspi.c:289:28: warning: cast to restricted __be32 drivers/spi/spi-fsl-dspi.c:289:28: warning: cast to restricted __be32 drivers/spi/spi-fsl-dspi.c:289:28: warning: cast to restricted __be32 drivers/spi/spi-fsl-dspi.c:289:28: warning: cast to restricted __be32 drivers/spi/spi-fsl-dspi.c:289:28: warning: cast to restricted __be32 drivers/spi/spi-fsl-dspi.c:289:28: warning: cast to restricted __be32 drivers/spi/spi-fsl-dspi.c:295:17: warning: incorrect type in assignment (different base types) drivers/spi/spi-fsl-dspi.c:295:17: expected unsigned int [usertype] drivers/spi/spi-fsl-dspi.c:295:17: got restricted __be16 [usertype] drivers/spi/spi-fsl-dspi.c:301:28: warning: cast to restricted __be16 drivers/spi/spi-fsl-dspi.c:301:28: warning: cast to restricted __be16 drivers/spi/spi-fsl-dspi.c:301:28: warning: cast to restricted __be16 drivers/spi/spi-fsl-dspi.c:301:28: warning: cast to restricted __be16 Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io> --- drivers/spi/spi-fsl-dspi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)