linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] i2c: xiic: Remove casting the return value which is a void pointer
@ 2013-09-09  5:31 Jingoo Han
       [not found] ` <005001cead1d$d68d3bc0$83a7b340$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Jingoo Han @ 2013-09-09  5:31 UTC (permalink / raw)
  To: 'Wolfram Sang'
  Cc: 'Wolfram Sang', linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	'Jingoo Han'

Casting the return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language.

Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 drivers/i2c/busses/i2c-xiic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
index 4c8b368..6e7b09c 100644
--- a/drivers/i2c/busses/i2c-xiic.c
+++ b/drivers/i2c/busses/i2c-xiic.c
@@ -702,7 +702,7 @@ static int xiic_i2c_probe(struct platform_device *pdev)
 	if (irq < 0)
 		goto resource_missing;
 
-	pdata = (struct xiic_i2c_platform_data *)dev_get_platdata(&pdev->dev);
+	pdata = dev_get_platdata(&pdev->dev);
 
 	i2c = kzalloc(sizeof(*i2c), GFP_KERNEL);
 	if (!i2c)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] i2c: bfin-twi: Remove casting the return value which is a void pointer
       [not found] ` <005001cead1d$d68d3bc0$83a7b340$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2013-09-09  5:32   ` Jingoo Han
       [not found]     ` <005101cead1d$f7411ee0$e5c35ca0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2013-09-27 16:56   ` [PATCH 1/2] i2c: xiic: " Wolfram Sang
  1 sibling, 1 reply; 4+ messages in thread
From: Jingoo Han @ 2013-09-09  5:32 UTC (permalink / raw)
  To: 'Wolfram Sang'
  Cc: 'Wolfram Sang', linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	'Jingoo Han'

Casting the return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language.

Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 drivers/i2c/busses/i2c-bfin-twi.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c
index 35a473b..3b9bd9a 100644
--- a/drivers/i2c/busses/i2c-bfin-twi.c
+++ b/drivers/i2c/busses/i2c-bfin-twi.c
@@ -675,7 +675,7 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev)
 	p_adap->retries = 3;
 
 	rc = peripheral_request_list(
-			(unsigned short *)dev_get_platdata(&pdev->dev),
+			dev_get_platdata(&pdev->dev),
 			"i2c-bfin-twi");
 	if (rc) {
 		dev_err(&pdev->dev, "Can't setup pin mux!\n");
@@ -723,7 +723,7 @@ out_error_add_adapter:
 	free_irq(iface->irq, iface);
 out_error_req_irq:
 out_error_no_irq:
-	peripheral_free_list((unsigned short *)dev_get_platdata(&pdev->dev));
+	peripheral_free_list(dev_get_platdata(&pdev->dev));
 out_error_pin_mux:
 	iounmap(iface->regs_base);
 out_error_ioremap:
@@ -739,7 +739,7 @@ static int i2c_bfin_twi_remove(struct platform_device *pdev)
 
 	i2c_del_adapter(&(iface->adap));
 	free_irq(iface->irq, iface);
-	peripheral_free_list((unsigned short *)dev_get_platdata(&pdev->dev));
+	peripheral_free_list(dev_get_platdata(&pdev->dev));
 	iounmap(iface->regs_base);
 	kfree(iface);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] i2c: xiic: Remove casting the return value which is a void pointer
       [not found] ` <005001cead1d$d68d3bc0$83a7b340$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2013-09-09  5:32   ` [PATCH 2/2] i2c: bfin-twi: " Jingoo Han
@ 2013-09-27 16:56   ` Wolfram Sang
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2013-09-27 16:56 UTC (permalink / raw)
  To: Jingoo Han; +Cc: 'Wolfram Sang', linux-i2c-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

On Mon, Sep 09, 2013 at 02:31:29PM +0900, Jingoo Han wrote:
> Casting the return value which is a void pointer is redundant.
> The conversion from void pointer to any other pointer type is
> guaranteed by the C programming language.
> 
> Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

Applied to for-next, thanks!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] i2c: bfin-twi: Remove casting the return value which is a void pointer
       [not found]     ` <005101cead1d$f7411ee0$e5c35ca0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2013-09-27 16:56       ` Wolfram Sang
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2013-09-27 16:56 UTC (permalink / raw)
  To: Jingoo Han; +Cc: 'Wolfram Sang', linux-i2c-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

On Mon, Sep 09, 2013 at 02:32:25PM +0900, Jingoo Han wrote:
> Casting the return value which is a void pointer is redundant.
> The conversion from void pointer to any other pointer type is
> guaranteed by the C programming language.
> 
> Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

Applied to for-next, thanks!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-27 16:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-09  5:31 [PATCH 1/2] i2c: xiic: Remove casting the return value which is a void pointer Jingoo Han
     [not found] ` <005001cead1d$d68d3bc0$83a7b340$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-09-09  5:32   ` [PATCH 2/2] i2c: bfin-twi: " Jingoo Han
     [not found]     ` <005101cead1d$f7411ee0$e5c35ca0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-09-27 16:56       ` Wolfram Sang
2013-09-27 16:56   ` [PATCH 1/2] i2c: xiic: " Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).