From patchwork Fri Sep 27 13:28:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hardevsinh Palaniya X-Patchwork-Id: 831153 Received: from IND01-BMX-obe.outbound.protection.outlook.com (mail-bmxind01on2108.outbound.protection.outlook.com [40.107.239.108]) (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 B228E282FA; Fri, 27 Sep 2024 13:30:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.239.108 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727443822; cv=fail; b=FiM7cXJKgeoIKFfnhWtZfxJam0TmCO95uJXLpDPK+AJj43rP5Zx+2vDg766SMAnvxKmXuP6NCFV26Qutp7taW0zMGtl6vzGNkFmHP8ccCNUfMq+SNKoztpUKNcIfoyo0OyzNxjDE+93QurvOuQDpDcVg5KLrFMo/f9DhbEI9Ves= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727443822; c=relaxed/simple; bh=4chnCKyzv2sEXSKHSTb4BCQorGpo5sKPLmYZg3Fy43g=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=ZmhIRq81Bv4vzUkNB7pCrf3PQ9T4wq3V8Kw0g3uWcqpYTnOJAsTQq/0unPxpQgFcsaKmxrR/jsD2AAnaouffS3VUjZuG2HV3SIMrzoh24Ds6rV+cLVkcLL2ZfwCfvhSockZYol+ZVvLTe2XSoU2dGpl0vqJUlZbmHoSoHMCkVww= 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.108 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=mgosJhtkBttDe05nDEVz3wt+T07t5qp3VAyROcV2ZEXSBoVvsfUy5Ggj1L1pS8mgX2SwDhchmBYJ5K3NNq/GYj2EELLPUBcR4lGHXFvxWpLnMc+cFwct35Ymba8tAsMpTnTiUlu69wLeBfuLPoKVhL7V3oJGF+L82aydaIe5QZaZcyFNclv4GbuF8FzahN+SwNnvH5xhg5ckM4+5iyt11iRRQFmJ/dA9tgXa8kvGKVqzUbHKGVMYOZcm38lrbZ56jpUp7D3/y4H29P0V59G/5/0su+bJV2Xnil76iSkfrwIMmUGcFOAsjTWYzBr3+efnL3TfXbdsMpoX7WOZFpTv0w== 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=GMlhHl6FfUAuwur8RAuaD9m81wBYagT4TMxEtdhiyaWPpOR2Hthr9QPsvOqg0lVab1z3q/h4f0exJxDApS4THC+hrR+YAYEemoUKpOMiSphklnqSOeLVbBGla0VY4jz00mpRfRqyF+lCu8ZGg5495Ru6cwZ6r7Gc3jipsm+KfcLx89PWd0q1JUAe2MvMLL2kidaV9dDrHCxOZgnEAPfcqvEokGGtbBuwVM07RIQeiV1JfsqomdyUf59mVrJzmylZCGXd1BTyo1oTSLqTzcCmrCP09vB738xZas29jQ6aWU84anjhc9k9sNxrwgSffSJWBpDCymXf9ikXQgvSSQ8hIw== 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 PN2P287MB0416.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:116::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.22; Fri, 27 Sep 2024 13:30:17 +0000 Received: from PN0P287MB2843.INDP287.PROD.OUTLOOK.COM ([fe80::1134:92d7:1f68:2fac]) by PN0P287MB2843.INDP287.PROD.OUTLOOK.COM ([fe80::1134:92d7:1f68:2fac%5]) with mapi id 15.20.8005.021; Fri, 27 Sep 2024 13:30:17 +0000 From: Hardevsinh Palaniya To: linux-spi@vger.kernel.org, olteanv@gmail.com, broonie@kernel.org Cc: Hardevsinh Palaniya , Han Xu , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Haibo Chen , Yogesh Gaur , imx@lists.linux.dev, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/4] spi: spi-fsl-dspi: Fix casting warnings Date: Fri, 27 Sep 2024 18:58:32 +0530 Message-ID: <20240927132944.19285-1-hardevsinh.palaniya@siliconsignals.io> X-Mailer: git-send-email 2.43.0 X-ClientProxiedBy: PN3PR01CA0021.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:97::19) 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_|PN2P287MB0416:EE_ X-MS-Office365-Filtering-Correlation-Id: e2fbfce6-f327-4b9d-20f7-08dcdef88674 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|7416014|52116014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: IJE5/o2SIl8/70tAtfI8R5FJTvemps7lsgHb7Ihr5V7TvQVjzPIQJ+96GQGhNoFERoKyHrgmQzLx9aN3lLyxRGmbogX9svcyyMz7ISs9wYdJqbxI+i7wvUzpnxAN7RgpspvFfttcKoG+4NFogntf9iQLYkZZAKa5KOAs4gltOEnKcdRzpRTEJBuD6koFwDD/JYV4/W3reejTss35ZXMYxCuWSFc4gs/bVV7FFumc9EFLigpEtV+M6Hv60j9oHQsqMtfhbmdKwum+XgExw5VBHUMKLQGG+avjCOQgWwjxz/8OJx4uc5Ny2mXZyaGOpI9wKXHjdFkrWMuyVJbkk/JpurtJNHgFCnzRr36BntK7EIT4/kayGtTnng0tfcCPIjvzkthDTz6pQBg+LIxAyQo+cIHsDKcHl9tofFTZdmTLArartlbc08uFfgrBALcK6NBr/+I4fSfLIJDKaX0hP3bFYw0ADc6zfx6Kbv0kk9ttWYE+bNU/rWAVdp8hI6i4dz6iYciTn8bCehGtj3+mtr07zISGXDUSfL8wBMqe0xdR4OK2kD/cTGsfZLj9OACUjpmeC3zEWf/tRSb46YhnId3k7VXBY0YINEdf8aoZMUsslb8nUyv08RqHxdp+tRbhb6n6+KcZBcpQWtTgS7F5AvDe2Gbww15jwmcEzEmSWNih6Liffrp2CoafYLYgOy1Phak8FjVrM2PLxu+FmhsI6zNNI6zOWpWkUuUjGKFNKaU9KH7U2rKy6D9S0Pe9MmtmWTwssdVibTII5zwCxomMWB0Zz0bNWZdzgkwbhElpV53fvtaFOqCvFPz8oo3S/BcH+aJJU/69G7lD/0FJ2kVcSbAUs2dkcxHAYIXfNGozOcz1A4M3WYUHSi6rC0xYbw7U51lvaNhbM9uihPKZRL4svoRP2WD8LCmoCkd4kxzR4ccrirKEEEhzB+yFaXHmoFRyaQOTxcu8hbsSTLqS6/lU/AhrMSltNsamINY6HLYcC8koiM2eZouq+o5WZFHeN2yojUxVI5QCFEgRHXbrRvDICoLVzyw817S8m/3sIfZNzXsqFpBIcVOm5P/X2Tj/Syba9lfVgpxUMrGkAiTqoXVwPX7qoMTewAPJNJlqRLO+A/FgLuVjgIbJD6S/18cM+JwBEcKq27Ent4yQUFQe/i3I+o8EnwX19cS/YGo+v9TI3WVKTecL+10zVeYQJkcqkvYELsMlFWObaMCtqYiUn3JaWyIsHCVPmR6/M3eUDrLwCfXbLmHF4INZXTGIbSwSIRJWhWvFosdBV7Pf/DpRCDc4Azn6TNWlhYxQt8k1nY8DnaKKlBfQh67LxlxQ9r/h8SU47Y598Eo2zgqkn4zPitYgkSBbTWVyHZk3XIProCSL4cj1TEnmPJG58sfsShF15rqM0u6wDmdXoSSK+4vjzy+NBUHsBQ== 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)(376014)(7416014)(52116014)(366016)(1800799024)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tGg3JI9YJ+x8ch9laoLs6J0gdxCv/GoI14Q4PhrI1sLRW6eaZG4hssorrrA3r51hBXOVjZ+18qyPZeBMTBb6tBQ2aAKGG3DOXytXBJ+bJQcSAZjYParWP8SVDUCPpYof3R9IsnuDqkQUN7nzhK7KWYEWEnqHcLJfhymvib6sHHYJbspKsk7l2uIwDd7cRzLdKpUE0Ur77vib7bAerDtByAN3lgQ2YuR1YphXPnJEsClT38lWTT+tlJT2rQXfymg42BBGHthVzd6Qruxsj3Gx/A47N+6Po02kZNNYfxynNlHuEJ1XolT2CZ+334QefPkjTU++NCVoVS9oPdL2hr7j5a1HIm7fLYDx3+F3xOnaviSBLeSyaNrXvpsbKXxsaZxMpl3pKqsL7CvFx6ZcSVs4m6xQxHo4WsKSUIhguD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npA/DyBAEf2fr+z8Il+QAG7guj8uOwBqj+qETja8xlM1MkxPkO483kASiMLbukL5oOPNzzcz9Yadg7HRwFrevw5jEJG5Apdr7hlZz86/SZaaJ2Arh6AcR3fb7MyFjBtKc0zvhBkzUbx/d/c7DIy1Z8BhL X-OriginatorOrg: siliconsignals.io X-MS-Exchange-CrossTenant-Network-Message-Id: e2fbfce6-f327-4b9d-20f7-08dcdef88674 X-MS-Exchange-CrossTenant-AuthSource: PN0P287MB2843.INDP287.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2024 13:30:17.0014 (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: Qmwdm+ytDueCqnoMm4Z67HR5xszrqqOpMuHV3WehjVQw6dfJaijnKBr7X2Y2YGpnoFX5fbbL2b1mYj15j6FUnoq21eZANWjhZEkG+n78SUalDZmgD5DAzLOZata02ekN X-MS-Exchange-Transport-CrossTenantHeadersStamped: PN2P287MB0416 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); }