From patchwork Tue Oct 8 05:55:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hardevsinh Palaniya X-Patchwork-Id: 13825656 Received: from IND01-MAX-obe.outbound.protection.outlook.com (mail-maxind01on2093.outbound.protection.outlook.com [40.107.222.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D098F13E41D; Tue, 8 Oct 2024 05:57:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.222.93 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728367044; cv=fail; b=d8EZgTuYFJUj2IxIWb10+JkeuV14VYa7sqUnw7XVT56RbUxEFsRn+pbEpviSsOUXq9N7q6f/cgHNlxYqd9JOzDAxHiN5jNjxsssDpj7z/xtYLe4CFqwMJF2vswRqDj0pQitzINajZFEr62XLaCPJ/oPBoiSp+UzmnUObPmNgzG4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728367044; c=relaxed/simple; bh=4chnCKyzv2sEXSKHSTb4BCQorGpo5sKPLmYZg3Fy43g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=RzVZXmFJNUTpllvbQgp+BmNOS/QsNTS2Rj2+Irh4HuDGs4g3QDhvqTYjZqofSe3NRDIE+MGNR2+bP1opfKuFs4h3AR8u8oTSZQn4jeBNhkYbMHvOGrlGY7RE2oy3oC98PVLeqUKlCdWtlnVu51UPPmb1fuxbVKOZzwEFS+FrEOo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=siliconsignals.io; spf=pass smtp.mailfrom=siliconsignals.io; arc=fail smtp.client-ip=40.107.222.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=siliconsignals.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=siliconsignals.io 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 To: olteanv@gmail.com, broonie@kernel.org, frank.li@nxp.com, shawnguo@kernel.org Cc: Hardevsinh Palaniya , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , 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> X-ClientProxiedBy: PN3PR01CA0173.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:de::17) To PN0P287MB2843.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:204::8) Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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/vVWswufcxy5g8Xs2ahTZJJL2wBKnEyNtGkt2qvZXJOxiTDLdoqe28eATT7eFb5DEuZ5Z/B+iWlgPJEhk5A4pbUj3gk5HRjjATVLzYXT+G6E7f3CULilhH1Wrytt2B+xNNixkxk0u3w7N99bivppC9vWkNyZ4/mNBN8O84qvA3PHCbPueQQ3FVfGttdBJyyBidz9iC18mkN2YQCmmDy1f5HAFRzAO9Q+Qxh/M8exYRR+13yfx5Zd/q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g0446SjOT5Sa8CMON5XBjbkO9yDjc9RLe5H2VVSshyF4SPT378zJJILr/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 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 --- drivers/spi/spi-fsl-dspi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); } From patchwork Tue Oct 8 05:55:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hardevsinh Palaniya X-Patchwork-Id: 13825657 Received: from IND01-MAX-obe.outbound.protection.outlook.com (mail-maxind01on2093.outbound.protection.outlook.com [40.107.222.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E5901419A9; Tue, 8 Oct 2024 05:57:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.222.93 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728367046; cv=fail; b=RFz3sWvhWxBg8iztuMGbfns4TCwkwRvN/9MPfnL3CNjFR2oJ8bDbmH9r4NODxwjoSyz+UAFI6I/aLZGwtpXE3vL8l6eeeIRU1YMQxX/BMGDtomC5hEUwm3F3eoag2WEABs8L+dPcoOa2p3dulDpv6O18Fe5wANcZ8PFasFE1ppU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728367046; c=relaxed/simple; bh=X51J45QabFI71Uov091eIshZEfaN1dlg6Q54QCilZD0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=QWtn0CEBftZGtmtP4I4ut4mHQBQiN346TVHKmXM7D2itmL6dyz06TAHy4clsCWqSYSbI++v/pCuVXbVk5zcwsqm4PrVf9ZKmgTfEIlmazbVXKKV+ykw7eFpY5w0faxQOT2vcVuCYbozfzrtccE+NLPiNdDRmEoJf0qK1jsPT7tc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=siliconsignals.io; spf=pass smtp.mailfrom=siliconsignals.io; arc=fail smtp.client-ip=40.107.222.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=siliconsignals.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=siliconsignals.io ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gGiP9FcOBvQrzD6Oh6C1ZA3NXKEpktn5eLeUcntYpq5jctFJ6SzHrJ3RpXigDfr3UWTXqIa+B4rIS+DUms2n1wXUrD2z7F5i4LJGhJPD/tOPp452CFfx/WQ0v1VF7HpdSLSmYpPTegj32kuIFAMVohtdBIe7o65oUypFDobNMxjHiqrOTV34TK2p9BbMUR09N0sfHHpE/j52FNv82X5plvblq3OMP373P62i7leNQz1wrsKVXerVMkLTt2gCN0kIr4QD44qONqEbGaalpXwDOhWEm1cEe91dy72JzOGlgaw1GzMLls6HJcCwnPBR4IWdWjIq/Xot+bd7fk97pR6/4w== 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=CKuRi71SLF418fDZMOlqher3E5JqtU3BAIZCWmKv/z8=; b=fRtp9OHqpdkp/RhaIsH3puCDEHrLXlHD7aqyLDdufwxHPALigV+I1GcrNTa+7M23rtM7H0+GTXo0SqntD5Swz3pfrmRBD0XQmsmyFqrbUrgsBMKTGJEnqvyPg98VboQtLEg8WNR8cscdoNH2Y3FfvWemgYzOpkPi0WHyv44XMbrzmq1XiAgBfO2XHDRmYsH0NEyxHX4pFVnjM36bK9CrHHZMzbDVLNGYXWgci5YwZAaUhRdVXMBw6gvfk9wpaksBIrN5ORV4x/pW+crDrDlABebR3RTZETv9RrXY8iKDUlNfcZXT+1v0RNqXTcFZfVsN1HiE4VyBj5/sZBFCcrbc9g== 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:22 +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:22 +0000 From: Hardevsinh Palaniya To: olteanv@gmail.com, broonie@kernel.org, frank.li@nxp.com, shawnguo@kernel.org Cc: Hardevsinh Palaniya , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , linux-spi@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/2] spi: spi-imx: Fix casting warnings Date: Tue, 8 Oct 2024 11:25:46 +0530 Message-ID: <20241008055644.4900-3-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> X-ClientProxiedBy: PN3PR01CA0173.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:de::17) To PN0P287MB2843.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:204::8) Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PN0P287MB2843:EE_|PN2P287MB2160:EE_ X-MS-Office365-Filtering-Correlation-Id: b35ded7d-835b-485e-2893-08dce75e1382 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: LOJQ6cRZXn6Ku+td0pZYIdj7hyx5bzLeHLEKU8R2zGjS1NE4EzrsITiBjlNXZRBzQPogzO62Dt4clmKhDh1ONIyt2Gd+t4hCcq3OeVWpJTbsE+Gzpi1WciV18l72dShNL3gB1ZGC4S2rlSeFcopq4hcAgb5KMEfpX2nTnDMsJCRCXyfOQD3HSpnzJz60lDjVGtPbB5/pnzQnt3XmNCyoRdSrTQJZB+GcBcvRwA3+wjULcniHSimua5/itpIbCiui4d6mlvwk/vZlNHK464sDcNZmkD6s51Iskd4dMDYrcXMcykBk5DEbH3EnTL/PhSCWpyyq5sWqhxPImRfVEU7II2r4vIWkqxPVCPbxTUte6ajEZe6100Z3TZEmP1H8flyqUcthafBdYxeU/EJgL8CwrnXnkTmaixT8hM6eIh9lDGhDxsSaZzq3hxM6oH+bLAHy2XFSuRqjsvt+XKZHSTZtDNtDymaX1YprTG49u2/TZ7X38/hgqu+OeJtC68o+Y7eI8Q+Rre6CYvY0TmDLYXbU28+88zqPycGrOkPcOobzRIyHt4+p7G0gG3yIzzqBnhT28O4vQDdsXO9GWPNrnZ3N/I4ShRbT2Qp+zXPnyUZqRAioT1K9fTlc81B/k7C+1MX0eTYuyqDxfPxDaGvxecym4XrrewNnE2uL/GyzjVUM+H7Ge2mxg9f2CbhRXPKezeYl75xqOzRzqTROBh5Q7yAV0yZ0G87EAxeFmbpT8mZlJJo1QKMVaiXPNjIyZZGE1Yrb5tuuwD1JxcN+j452OOsP46apN+vhZeJHbyq4xot7IYSyKo2RV0l53eMjB8WoXkZvQHhrLJiENVh89WwtQJfwYPhAAQFFmtNlVJ0rcwXxWnOtGEmoIQS5yV0QUhufsOL+6CDQa3cCDu7mS0k/pifZ6LMvoYxyBE56p6zPuR+r1PR5cFqD9JcrumdOUczjpJzgZ+13ByWFP7lmu1QGX56QXjbvdctGW2fL8aWNQSvZqqRVw9RLEBt86jAlJvI7+9qhdHXLJQzU6KzuL8sVgrG/jufUdlRMXpnlc10O6XpMsOO0bzXyLEKxOK/z1bLdCcKBN4zHAqakoEcsUvgoW5EjFU1Vf10Y8yvL3zPLSqevfRPDkmbTZByHIpC6hkNs2kwXsmk0XihWxLnCWqLjGJkZciN9O01x+VbqaV87rt8GYu385ip7EsCyCGFipGEDRb1tyX/MuPN3O4DS9pbHr8HuQdTOdXiDJvVl4OGT8A8uxrNSiJvCKaX1hzRAN0tgmSeX9LnQaC5Y3HJz8pZQHeLYhyGTM7NeCP8lY9xNyfVskn/fyEr4GdSJyJ0iR56P3p1Pdzy31uQpf3Bo6OXc0AHnRQ== 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: bO1GtZM4pAwbnyv90wp0A0wTheEGMHOMkj6Db1fx/ZkpoCi34x4G/UIS8wdMa8QDMNhlv1aaShIyANHtW06R4D4qtZ7Hxc1U8jrMLNPWxad0gr9v8NGnZeqd33chaJve3QEeojJ6FtgBMsyppExLDAXUaWRRoYkDC5qCl00FYsTTHULMaWrg2dJLVjJIBvQNe4CkwxbFjWcuIzB/AbkyR6nnK3bqzHpkqPEaVDciRXjFtZg4CiKjWVTA8vj80tUggkd2HSLk1xQpXbetIIp8xH27R5hI51TPItrtFKiozBtezII8VoQx+/U2svJ4DRDpqdpZztRP0qn30TBGpJV5N/cqajU+aGaAXOkq+DCPjwXn/RUc8A9/S5geT/v61qlvwpPMoRZMibFQKIxLDnJuTwPKg9GL269vwYcg8WuxROnz3xlQGAzyOn+NrejDfab0bsNEA2+tR58eM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mnt4eYvydkqdzgxllEVdXIKpktabqscJRIxpF0zoiwEly4sMP4oixqNCHATNp2Tb9EB24Hz1rimJSh30PbfgGhjd2/COIJNu+FTNqc4JYwZ44450Dh9flnMm+s2e X-OriginatorOrg: siliconsignals.io X-MS-Exchange-CrossTenant-Network-Message-Id: b35ded7d-835b-485e-2893-08dce75e1382 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:22.0728 (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: 30sng/ykHUZXf7Xks8gHnQYUTdjBsOMXCaFDh9txlPZtsZJKcDH04j+R6/vcyU1VmFrFFfkKD38xVpnPT2KZvEdIVjBX0YCW8d0mvN7gnkeH6dWXa769SjZQufo1yEy4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PN2P287MB2160 Sparse warnings: drivers/spi/spi-imx.c:410:19: warning: cast to restricted __be32 drivers/spi/spi-imx.c:410:19: warning: cast to restricted __be32 drivers/spi/spi-imx.c:410:19: warning: cast to restricted __be32 drivers/spi/spi-imx.c:410:19: warning: cast to restricted __be32 drivers/spi/spi-imx.c:410:19: warning: cast to restricted __be32 drivers/spi/spi-imx.c:410:19: warning: cast to restricted __be32 drivers/spi/spi-imx.c:439:21: warning: incorrect type in assignment (different base types) drivers/spi/spi-imx.c:439:21: expected unsigned int [addressable] [usertype] val drivers/spi/spi-imx.c:439:21: got restricted __be32 [usertype] Signed-off-by: Hardevsinh Palaniya Reviewed-by: Frank Li --- drivers/spi/spi-imx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 4c31d36f3130..fefee771b042 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -407,7 +407,7 @@ static void spi_imx_buf_tx_swap(struct spi_imx_data *spi_imx) static void mx53_ecspi_rx_target(struct spi_imx_data *spi_imx) { - u32 val = be32_to_cpu(readl(spi_imx->base + MXC_CSPIRXDATA)); + u32 val = ioread32be(spi_imx->base + MXC_CSPIRXDATA); if (spi_imx->rx_buf) { int n_bytes = spi_imx->target_burst % sizeof(val); @@ -436,13 +436,12 @@ static void mx53_ecspi_tx_target(struct spi_imx_data *spi_imx) if (spi_imx->tx_buf) { memcpy(((u8 *)&val) + sizeof(val) - n_bytes, spi_imx->tx_buf, n_bytes); - val = cpu_to_be32(val); spi_imx->tx_buf += n_bytes; } spi_imx->count -= n_bytes; - writel(val, spi_imx->base + MXC_CSPITXDATA); + iowrite32be(val, spi_imx->base + MXC_CSPITXDATA); } /* MX51 eCSPI */