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: 13825655 Received: from IND01-BMX-obe.outbound.protection.outlook.com (mail-bmxind01on2095.outbound.protection.outlook.com [40.107.239.95]) (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 D96A614A4C9 for ; Tue, 8 Oct 2024 05:57:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.239.95 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728367049; cv=fail; b=gWMaTG9klaVtId47scZ2syNZDUg9kBF+kk6OkjQAwCMzyaV/tq+3Y60zepYdseyG/mf/YKa0J82SiWuWCoj761HpMS/uXrV2bCnxtamMhuDtX6wXQlJP6EA1ykabEdUVQsCN8ELjXu1V5st+eAKVvwh7WEWFacBLOAUhl8zvgjI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728367049; c=relaxed/simple; bh=X51J45QabFI71Uov091eIshZEfaN1dlg6Q54QCilZD0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=OgstyEnWMq6LrvkPO3KLyujwiqDHNG0D+wph0OluW5w/0hItsi1WqQo2+8C5xRtD9cd4C9MBUjFH3DSgsFW8K3qMEPjC+J99Lcni0gtCHabitiZEAraJhqYCSrGX+RIpCMsjxzeEWTgDZC9mcgqiioMhyY3iUsLAFOBbmm8nypw= 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.239.95 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: imx@lists.linux.dev 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/v61qlvwpPMoRZMibFQKIxLDnJuTwPKg9GL269vwYcg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vA7ZqESZp64yuWgTqmL+/XKpvdcO7E/6e6ueEtmnt4eYvydkqdzgxllEVdXIKpktabqscJRIxpF0zoiwEly4sMP4oixqNCHATNp2Tb9EB24Hz1rimJSh30PbfgGhjd2/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 */