From: Tushar Behera <tushar.behera@linaro.org>
To: linux-kernel@vger.kernel.org
Cc: thierry.reding@gmail.com, patches@linaro.org,
netdev@vger.kernel.org, linux-can@vger.kernel.org,
Marc Kleine-Budde <mkl@pengutronix.de>,
Wolfgang Grandegger <wg@grandegger.com>,
"David S. Miller" <davem@davemloft.net>,
'Greg Kroah-Hartman' <gregkh@linuxfoundation.org>
Subject: Re: [PATCH 09/15] net: can: Convert to use devm_ioremap_resource
Date: Thu, 13 Jun 2013 11:00:00 +0530 [thread overview]
Message-ID: <51B958D8.2070804@linaro.org> (raw)
In-Reply-To: <1370864113-17895-10-git-send-email-tushar.behera@linaro.org>
On 06/10/2013 05:05 PM, Tushar Behera wrote:
> Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
> introduced devm_ioremap_resource() and deprecated the use of
> devm_request_and_ioremap().
>
> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> CC: netdev@vger.kernel.org
> CC: linux-can@vger.kernel.org
> CC: Marc Kleine-Budde <mkl@pengutronix.de>
> CC: Wolfgang Grandegger <wg@grandegger.com>
> ---
> drivers/net/can/c_can/c_can_platform.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
> index 6b6130b..b918c73 100644
> --- a/drivers/net/can/c_can/c_can_platform.c
> +++ b/drivers/net/can/c_can/c_can_platform.c
> @@ -201,8 +201,8 @@ static int c_can_plat_probe(struct platform_device *pdev)
> priv->instance = pdev->id;
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> - priv->raminit_ctrlreg = devm_request_and_ioremap(&pdev->dev, res);
> - if (!priv->raminit_ctrlreg || priv->instance < 0)
> + priv->raminit_ctrlreg = devm_ioremap_resource(&pdev->dev, res);
> + if (IS_ERR(priv->raminit_ctrlreg) || priv->instance < 0)
> dev_info(&pdev->dev, "control memory is not used for raminit\n");
> else
> priv->raminit = c_can_hw_raminit;
>
IS_ERR() check on the return value of devm_ioremap_resource produces
following sparse warning. This is because of the __iomem address space
attribute. How should we fix this?
drivers/net/can/c_can/c_can_platform.c:205:32: warning: incorrect type
in argument 1 (different address spaces)
drivers/net/can/c_can/c_can_platform.c:205:32: expected void const *ptr
drivers/net/can/c_can/c_can_platform.c:205:32: got unsigned int
[noderef] [usertype] <asn:2>*raminit_ctrlreg
--
Tushar Behera
next prev parent reply other threads:[~2013-06-13 5:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-10 11:34 [PATCH 00/15] Convert to use devm_ioremap_resource Tushar Behera
2013-06-10 11:35 ` [PATCH 06/15] net: bcm63xx_enet: " Tushar Behera
2013-06-12 9:23 ` David Miller
2013-06-10 11:35 ` [PATCH 07/15] net: fec: " Tushar Behera
2013-06-12 9:23 ` David Miller
2013-06-10 11:35 ` [PATCH 08/15] net: emaclite: " Tushar Behera
2013-06-12 9:23 ` David Miller
2013-06-10 11:35 ` [PATCH 09/15] net: can: " Tushar Behera
2013-06-10 13:09 ` Marc Kleine-Budde
2013-06-11 3:15 ` Tushar Behera
2013-06-12 3:09 ` 'Greg Kroah-Hartman'
2013-06-12 9:23 ` David Miller
2013-06-13 5:30 ` Tushar Behera [this message]
2013-06-13 5:41 ` Sachin Kamat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51B958D8.2070804@linaro.org \
--to=tushar.behera@linaro.org \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=patches@linaro.org \
--cc=thierry.reding@gmail.com \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).