diff mbox

i2c: davinci: Fix bad dev_get_platdata() conversion

Message ID 1378409024-13432-1-git-send-email-olof@lixom.net
State Accepted
Headers show

Commit Message

Olof Johansson Sept. 5, 2013, 7:23 p.m. UTC
commit 6d4028c644e (i2c: use dev_get_platdata()) did a bad conversion
of this one case:

drivers/i2c/busses/i2c-davinci.c: In function 'davinci_i2c_probe':
drivers/i2c/busses/i2c-davinci.c:665:2: warning: passing argument 1 of
	'dev_get_platdata' from incompatible pointer type [enabled by default]

Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
---
 drivers/i2c/busses/i2c-davinci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jingoo Han Sept. 6, 2013, 12:08 a.m. UTC | #1
On Friday, September 06, 2013 4:24 AM, Olof Johansson wrote:
> 
> commit 6d4028c644e (i2c: use dev_get_platdata()) did a bad conversion
> of this one case:
> 
> drivers/i2c/busses/i2c-davinci.c: In function 'davinci_i2c_probe':
> drivers/i2c/busses/i2c-davinci.c:665:2: warning: passing argument 1 of
> 	'dev_get_platdata' from incompatible pointer type [enabled by default]
> 
> Cc: Jingoo Han <jg1.han@samsung.com>
> Signed-off-by: Olof Johansson <olof@lixom.net>

Reviewed-by: Jingoo Han <jg1.han@samsung.com>

Oh, it's my bad. :-(
Thank you for fixing it.

Best regards,
Jingoo Han

> ---
>  drivers/i2c/busses/i2c-davinci.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
> index 5747341..132369f 100644
> --- a/drivers/i2c/busses/i2c-davinci.c
> +++ b/drivers/i2c/busses/i2c-davinci.c
> @@ -662,7 +662,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
>  #endif
>  	dev->dev = &pdev->dev;
>  	dev->irq = irq->start;
> -	dev->pdata = dev_get_platdata(&dev->dev);
> +	dev->pdata = dev_get_platdata(&pdev->dev);
>  	platform_set_drvdata(pdev, dev);
> 
>  	if (!dev->pdata && pdev->dev.of_node) {
> --
> 1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang Sept. 10, 2013, 9:20 a.m. UTC | #2
On Thu, Sep 05, 2013 at 12:23:44PM -0700, Olof Johansson wrote:
> commit 6d4028c644e (i2c: use dev_get_platdata()) did a bad conversion
> of this one case:
> 
> drivers/i2c/busses/i2c-davinci.c: In function 'davinci_i2c_probe':
> drivers/i2c/busses/i2c-davinci.c:665:2: warning: passing argument 1 of
> 	'dev_get_platdata' from incompatible pointer type [enabled by default]
> 
> Cc: Jingoo Han <jg1.han@samsung.com>
> Signed-off-by: Olof Johansson <olof@lixom.net>

Gosh, need to find out why my build-tests failed on that. Thanks!

Acked-by: Wolfram Sang <wsa@the-dreams.de>

Jingoo Han: Did you buildtest?

> ---
>  drivers/i2c/busses/i2c-davinci.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
> index 5747341..132369f 100644
> --- a/drivers/i2c/busses/i2c-davinci.c
> +++ b/drivers/i2c/busses/i2c-davinci.c
> @@ -662,7 +662,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
>  #endif
>  	dev->dev = &pdev->dev;
>  	dev->irq = irq->start;
> -	dev->pdata = dev_get_platdata(&dev->dev);
> +	dev->pdata = dev_get_platdata(&pdev->dev);
>  	platform_set_drvdata(pdev, dev);
>  
>  	if (!dev->pdata && pdev->dev.of_node) {
> -- 
> 1.7.10.4
>
Jingoo Han Sept. 10, 2013, 9:25 a.m. UTC | #3
On Tuesday, September 10, 2013 6:20 PM, Wolfram Sang wrote:
> On Thu, Sep 05, 2013 at 12:23:44PM -0700, Olof Johansson wrote:
> > commit 6d4028c644e (i2c: use dev_get_platdata()) did a bad conversion
> > of this one case:
> >
> > drivers/i2c/busses/i2c-davinci.c: In function 'davinci_i2c_probe':
> > drivers/i2c/busses/i2c-davinci.c:665:2: warning: passing argument 1 of
> > 	'dev_get_platdata' from incompatible pointer type [enabled by default]
> >
> > Cc: Jingoo Han <jg1.han@samsung.com>
> > Signed-off-by: Olof Johansson <olof@lixom.net>
> 
> Gosh, need to find out why my build-tests failed on that. Thanks!
> 
> Acked-by: Wolfram Sang <wsa@the-dreams.de>
> 
> Jingoo Han: Did you buildtest?

I always did builtest for the patch.
However, I cannot know why it makes build error.
Anyway, sorry for making this build error.

Best regards,
Jingoo Han

> 
> > ---
> >  drivers/i2c/busses/i2c-davinci.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
> > index 5747341..132369f 100644
> > --- a/drivers/i2c/busses/i2c-davinci.c
> > +++ b/drivers/i2c/busses/i2c-davinci.c
> > @@ -662,7 +662,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
> >  #endif
> >  	dev->dev = &pdev->dev;
> >  	dev->irq = irq->start;
> > -	dev->pdata = dev_get_platdata(&dev->dev);
> > +	dev->pdata = dev_get_platdata(&pdev->dev);
> >  	platform_set_drvdata(pdev, dev);
> >
> >  	if (!dev->pdata && pdev->dev.of_node) {
> > --
> > 1.7.10.4
> >

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Olof Johansson Sept. 10, 2013, 9:26 p.m. UTC | #4
On Tue, Sep 10, 2013 at 2:25 AM, Jingoo Han <jg1.han@samsung.com> wrote:
> On Tuesday, September 10, 2013 6:20 PM, Wolfram Sang wrote:
>> On Thu, Sep 05, 2013 at 12:23:44PM -0700, Olof Johansson wrote:
>> > commit 6d4028c644e (i2c: use dev_get_platdata()) did a bad conversion
>> > of this one case:
>> >
>> > drivers/i2c/busses/i2c-davinci.c: In function 'davinci_i2c_probe':
>> > drivers/i2c/busses/i2c-davinci.c:665:2: warning: passing argument 1 of
>> >     'dev_get_platdata' from incompatible pointer type [enabled by default]
>> >
>> > Cc: Jingoo Han <jg1.han@samsung.com>
>> > Signed-off-by: Olof Johansson <olof@lixom.net>
>>
>> Gosh, need to find out why my build-tests failed on that. Thanks!
>>
>> Acked-by: Wolfram Sang <wsa@the-dreams.de>

Thanks, applied to arm-soc fixes branch.

>>
>> Jingoo Han: Did you buildtest?
>
> I always did builtest for the patch.
> However, I cannot know why it makes build error.
> Anyway, sorry for making this build error.

No worries, it happens. There was plenty of time to find it in
linux-next, the warning started showing up there on 08/22. I should
have been faster at noticing.


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jingoo Han Sept. 11, 2013, 12:27 a.m. UTC | #5
On Wednesday, September 11, 2013 6:27 AM, Olof Johansson wrote:
> On Tue, Sep 10, 2013 at 2:25 AM, Jingoo Han <jg1.han@samsung.com> wrote:
> > On Tuesday, September 10, 2013 6:20 PM, Wolfram Sang wrote:
> >> On Thu, Sep 05, 2013 at 12:23:44PM -0700, Olof Johansson wrote:
> >> > commit 6d4028c644e (i2c: use dev_get_platdata()) did a bad conversion
> >> > of this one case:
> >> >
> >> > drivers/i2c/busses/i2c-davinci.c: In function 'davinci_i2c_probe':
> >> > drivers/i2c/busses/i2c-davinci.c:665:2: warning: passing argument 1 of
> >> >     'dev_get_platdata' from incompatible pointer type [enabled by default]
> >> >
> >> > Cc: Jingoo Han <jg1.han@samsung.com>
> >> > Signed-off-by: Olof Johansson <olof@lixom.net>
> >>
> >> Gosh, need to find out why my build-tests failed on that. Thanks!
> >>
> >> Acked-by: Wolfram Sang <wsa@the-dreams.de>
> 
> Thanks, applied to arm-soc fixes branch.

Thank you very much! :-)

> 
> >>
> >> Jingoo Han: Did you buildtest?
> >
> > I always did builtest for the patch.
> > However, I cannot know why it makes build error.
> > Anyway, sorry for making this build error.
> 
> No worries, it happens. There was plenty of time to find it in
> linux-next, the warning started showing up there on 08/22. I should
> have been faster at noticing.
> 

Hi Olof,

I really appreciate your caring.
I will be more careful next time.
Thank you. :)

Best regards,
Jingoo Han


--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
index 5747341..132369f 100644
--- a/drivers/i2c/busses/i2c-davinci.c
+++ b/drivers/i2c/busses/i2c-davinci.c
@@ -662,7 +662,7 @@  static int davinci_i2c_probe(struct platform_device *pdev)
 #endif
 	dev->dev = &pdev->dev;
 	dev->irq = irq->start;
-	dev->pdata = dev_get_platdata(&dev->dev);
+	dev->pdata = dev_get_platdata(&pdev->dev);
 	platform_set_drvdata(pdev, dev);
 
 	if (!dev->pdata && pdev->dev.of_node) {