On Monday, January 13, 2014 9:29 PM, Wolfram Sang wrote:
> 
> > Which thing do I have to remove additionally?
> 
> Just have a close look at your patches and what you removed. You'll
> figure. Hint: It is related to the resource.
> 
> > You mean the following?
> >
> > res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > if (!res) {
> >     dev_err(&pdev->dev, "Unable to get mem resource.\n");
> 
> That's one thing, there is more.
> 
> >
> > I think that this error message is not necessary. So, I will
> > remove it.
> 
> Yeah, just have a look at the actual implementation of
> devm_ioremap_resource and you will *know* that it is not necessary.

Aha, I see. Sorry, I forgot it.
The return value of platform_get_resource() is checked by
devm_ioremap_resource(); thus, the redundant return value check
of platform_get_resource() should be removed as below:

Also, 'alg_data->base' is not used anymore, so it should be
removed too.

        /* Register I/O resource */
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        alg_data->ioaddr = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(alg_data->ioaddr))
                return PTR_ERR(alg_data->ioaddr);

> 
> > Please let me know additional things to be remove.
> 
> I believe in teaching fishing rather than giving fish.

Thank you for your guidance. :-)
I will send the v3 patch, soon.

Best regards,
Jingoo Han

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

Reply via email to