[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230809-cbl-1903-v1-2-df9d66a3ba3e@google.com>
Date: Wed, 09 Aug 2023 21:25:36 +0000
From: Justin Stitt <justinstitt@...gle.com>
To: Andi Shyti <andi.shyti@...nel.org>, Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@...adcom.com>
Cc: linux-i2c@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
Nathan Chancellor <nathan@...nel.org>,
Justin Stitt <justinstitt@...gle.com>
Subject: [PATCH 2/2] i2c: i2c-rcar: fix -Wvoid-pointer-to-enum-cast warning
Fix the following warning:
| drivers/i2c/busses/i2c-rcar.c:1066:18: error: cast to smaller integer type \
| 'enum rcar_i2c_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
| 1066 | priv->devtype = (enum rcar_i2c_type)of_device_get_match_data(dev);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Link: https://github.com/ClangBuiltLinux/linux/issues/1904
Signed-off-by: Justin Stitt <justinstitt@...gle.com>
---
drivers/i2c/busses/i2c-rcar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 2d9c37410ebd..ae4072bc96dc 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -1063,7 +1063,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
if (IS_ERR(priv->io))
return PTR_ERR(priv->io);
- priv->devtype = (enum rcar_i2c_type)of_device_get_match_data(dev);
+ priv->devtype = (unsigned long) of_device_get_match_data(dev);
init_waitqueue_head(&priv->wait);
adap = &priv->adap;
--
2.41.0.640.ga95def55d0-goog
Powered by blists - more mailing lists