linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: zhangfei <zhangfei.gao@linaro.org>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	Guoxiong Yan <yanguoxiong@huawei.com>
Subject: Re: [PATCH 01/18] [media] ir-hix5hd2: fix address space casting
Date: Thu, 25 Sep 2014 07:42:12 +0800	[thread overview]
Message-ID: <542356D4.1000602@linaro.org> (raw)
In-Reply-To: <c8634fac0c56cfaa9bdad29d541e95b17c049c0a.1411597610.git.mchehab@osg.samsung.com>



On 09/25/2014 06:27 AM, Mauro Carvalho Chehab wrote:
> drivers/media/rc/ir-hix5hd2.c:99:41: warning: incorrect type in argument 2 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:99:41:    expected void volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:99:41:    got void *
> drivers/media/rc/ir-hix5hd2.c:100:16: warning: incorrect type in argument 1 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:100:16:    expected void const volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:100:16:    got void *
> drivers/media/rc/ir-hix5hd2.c:117:40: warning: incorrect type in argument 2 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:117:40:    expected void volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:117:40:    got void *
> drivers/media/rc/ir-hix5hd2.c:119:41: warning: incorrect type in argument 2 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:119:41:    expected void volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:119:41:    got void *
> drivers/media/rc/ir-hix5hd2.c:121:41: warning: incorrect type in argument 2 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:121:41:    expected void volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:121:41:    got void *
> drivers/media/rc/ir-hix5hd2.c:147:18: warning: incorrect type in argument 1 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:147:18:    expected void const volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:147:18:    got void *
> drivers/media/rc/ir-hix5hd2.c:155:28: warning: incorrect type in argument 1 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:155:28:    expected void const volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:155:28:    got void *
> drivers/media/rc/ir-hix5hd2.c:157:25: warning: incorrect type in argument 1 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:157:25:    expected void const volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:157:25:    got void *
> drivers/media/rc/ir-hix5hd2.c:159:61: warning: incorrect type in argument 2 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:159:61:    expected void volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:159:61:    got void *
> drivers/media/rc/ir-hix5hd2.c:167:28: warning: incorrect type in argument 1 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:167:28:    expected void const volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:167:28:    got void *
> drivers/media/rc/ir-hix5hd2.c:169:36: warning: incorrect type in argument 1 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:169:36:    expected void const volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:169:36:    got void *
> drivers/media/rc/ir-hix5hd2.c:188:64: warning: incorrect type in argument 2 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:188:64:    expected void volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:188:64:    got void *
> drivers/media/rc/ir-hix5hd2.c:190:68: warning: incorrect type in argument 2 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:190:68:    expected void volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:190:68:    got void *
> drivers/media/rc/ir-hix5hd2.c:220:20: warning: incorrect type in assignment (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:220:20:    expected void *base
> drivers/media/rc/ir-hix5hd2.c:220:20:    got void [noderef] <asn:2>*
> drivers/media/rc/ir-hix5hd2.c:315:41: warning: incorrect type in argument 2 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:315:41:    expected void volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:315:41:    got void *
> drivers/media/rc/ir-hix5hd2.c:316:41: warning: incorrect type in argument 2 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:316:41:    expected void volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:316:41:    got void *
> drivers/media/rc/ir-hix5hd2.c:317:41: warning: incorrect type in argument 2 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:317:41:    expected void volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:317:41:    got void *
> drivers/media/rc/ir-hix5hd2.c:318:41: warning: incorrect type in argument 2 (different address spaces)
> drivers/media/rc/ir-hix5hd2.c:318:41:    expected void volatile [noderef] <asn:2>*addr
> drivers/media/rc/ir-hix5hd2.c:318:41:    got void *
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

Yes, the warning is reported with make C=1, but can not reported with 
make C=1 CHECK="smatch -p=kernel" which I used before.

Thanks Mauro for the fix.

>
> diff --git a/drivers/media/rc/ir-hix5hd2.c b/drivers/media/rc/ir-hix5hd2.c
> index 94967d0e0478..c555ca2aed0e 100644
> --- a/drivers/media/rc/ir-hix5hd2.c
> +++ b/drivers/media/rc/ir-hix5hd2.c
> @@ -68,7 +68,7 @@
>
>   struct hix5hd2_ir_priv {
>   	int			irq;
> -	void			*base;
> +	void volatile __iomem	*base;
>   	struct device		*dev;
>   	struct rc_dev		*rdev;
>   	struct regmap		*regmap;
> @@ -218,8 +218,8 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
>
>   	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>   	priv->base = devm_ioremap_resource(dev, res);
> -	if (IS_ERR(priv->base))
> -		return PTR_ERR(priv->base);
> +	if (IS_ERR((__force void *)priv->base))
> +		return PTR_ERR((__force void *)priv->base);
>
>   	priv->irq = platform_get_irq(pdev, 0);
>   	if (priv->irq < 0) {
>





      parent reply	other threads:[~2014-09-24 23:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24 22:27 [PATCH 01/18] [media] ir-hix5hd2: fix address space casting Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 02/18] [media] st_rc: " Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 03/18] [media] sta2x11_vip: " Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 04/18] [media] saa7164-core: declare symbols as static Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 05/18] [media] pms: Fix a bad usage of the stack Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 06/18] [media] radio-sf16fmi: declare pnp_attached as static Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 07/18] [media] radio-sf16fmr2: declare some structs " Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 08/18] [media] cx88: fix cards table CodingStyle Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 09/18] [media] cx88: remove return after BUG() Mauro Carvalho Chehab
2014-09-24 22:32   ` Antti Palosaari
2014-09-24 23:14     ` Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 10/18] [media] saa7146: " Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 11/18] [media] drxd: remove a dead code Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 12/18] [media] em28xx: Fix identation Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 13/18] [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64 Mauro Carvalho Chehab
2014-09-24 23:05   ` Fabio Estevam
2014-09-24 22:27 ` [PATCH 14/18] [media] s5p_mfc_opr_v6: get rid of warnings when compiled with 64 bits Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 15/18] [media] s5p_mfc_opr: Fix warnings Mauro Carvalho Chehab
2014-09-24 23:02   ` Fabio Estevam
2014-09-24 23:25     ` Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 16/18] s5p-mfc: Fix several printk warnings Mauro Carvalho Chehab
2014-09-24 22:27 ` [PATCH 17/18] [media] s3c-camif: fix dma_addr_t printks Mauro Carvalho Chehab
2014-09-25 10:40   ` Sylwester Nawrocki
2014-09-24 22:27 ` [PATCH 18/18] [media] ti-vpe: Fix typecast Mauro Carvalho Chehab
2014-09-24 23:42 ` zhangfei [this message]

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=542356D4.1000602@linaro.org \
    --to=zhangfei.gao@linaro.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@osg.samsung.com \
    --cc=yanguoxiong@huawei.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).