i2c: aspeed: Add an explicit type casting for *get_clk_reg_val
PATCH v2 1/1 i2c: aspeed: Add an explicit type casting for *get_clk_reg_val
This commit fixes this sparse warning:drivers/i2c/busses/i2c-aspeed.c:875:38: warning: incorrect type in assignment (different modifiers)drivers/i2c/busses/i2c-aspeed.c:875:38: expected unsigned int ( *get_clk_reg_val )( ... )drivers/i2c/busses/i2c-aspeed.c:875:38: got void const *const data
---
Changes since v1:
- Fixed title and added Reported-by tag.
drivers/i2c/busses/i2c-aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-aspeed.c +1 -1
@@ -872,7 +872,7 @@ static int aspeed_i2c_probe_bus(struct platform_device *pdev)if (!match) bus->get_clk_reg_val = aspeed_i2c_24xx_get_clk_reg_val;else - bus->get_clk_reg_val = match->data; + bus->get_clk_reg_val = (u32 (*)(u32 ))match->data;/* Initialize the I2C adapter */ spin_lock_init (&bus->lock);
Signature · 1 line
2.18.0
Quoted 28 lines · Jae Hyun Yoo
This commit fixes this sparse warning:
drivers/i2c/busses/i2c-aspeed.c:875:38: warning: incorrect type in assignment (different modifiers)drivers/i2c/busses/i2c-aspeed.c:875:38: expected unsigned int (*get_clk_reg_val)( ... )drivers/i2c/busses/i2c-aspeed.c:875:38: got void const *const dataSigned-off-by Jae Hyun Yoo <[email protected]>---
Changes since v1:
- Fixed title and added Reported-by tag.drivers/i2c/busses/i2c-aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/busses/i2c-aspeed.c +1
-2@@ -872,7 +872,7 @@ static int aspeed_i2c_probe_bus(struct platform_device *pdev)if (!match) bus->get_clk_reg_val = aspeed_i2c_24xx_get_clk_reg_val;else - bus->get_clk_reg_val = match->data; + bus->get_clk_reg_val = (u32 (*)(u32 ))match->data;/* Initialize the I2C adapter */ spin_lock_init (&bus->lock); --
Quoted 2 lines
2.18.0
Quoted 27 lines · Brendan Higgins
Quoted 25 lines · Jae Hyun Yoo
This commit fixes this sparse warning:
drivers/i2c/busses/i2c-aspeed.c:875:38: warning: incorrect type in assignment (different modifiers)drivers/i2c/busses/i2c-aspeed.c:875:38: expected unsigned int (*get_clk_reg_val)( ... )drivers/i2c/busses/i2c-aspeed.c:875:38: got void const *const dataSigned-off-by Jae Hyun Yoo <[email protected]>---
Changes since v1:
- Fixed title and added Reported-by tag.drivers/i2c/busses/i2c-aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/busses/i2c-aspeed.c +1
-1@@ -872,7 +872,7 @@ static int aspeed_i2c_probe_bus(struct platform_device *pdev)if (!match) bus->get_clk_reg_val = aspeed_i2c_24xx_get_clk_reg_val;else - bus->get_clk_reg_val = match->data; + bus->get_clk_reg_val = (u32 (*)(u32 ))match->data;
Quoted 8 lines
Quoted 5 lines
drivers/i2c/busses/i2c-aspeed.c +0
-1/* Initialize the I2C adapter */ spin_lock_init (&bus->lock); --2.18.0
Reviewed-by Brendan Higgins <[email protected]>
Thanks a lot Brendan for your review!
Hi Wolfram,
I forgot adding 'Reported-by: Wolfram Sang <[email protected]>'. Please add this tag when you apply this patch, or let me know if I need to submit v3 for adding the tag.
Thanks,
Jae
Quoted 6 lines · Jae Hyun Yoo
This commit fixes this sparse warning:
drivers/i2c/busses/i2c-aspeed.c:875:38: warning: incorrect type in assignment (different modifiers)drivers/i2c/busses/i2c-aspeed.c:875:38: expected unsigned int (*get_clk_reg_val)( ... )drivers/i2c/busses/i2c-aspeed.c:875:38: got void const *const dataSigned-off-by Jae Hyun Yoo <[email protected]>
Added the 'Reported-tag' and applied to for-next, thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180804/01f720dc/attachment.sig>