From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Mikko Perttunen <mikko.perttunen-/1wQRMveznE@public.gmane.org>
Cc: Eduardo Valentin
<edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Mikko Perttunen
<mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org,
linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
juha-matti.tilli-X3B1VOXEql0@public.gmane.org
Subject: Re: [PATCH v5 4/4] thermal: Add Tegra SOCTHERM thermal management driver
Date: Thu, 25 Sep 2014 07:59:55 +0200 [thread overview]
Message-ID: <20140925055953.GA12423@ulmo> (raw)
In-Reply-To: <54231C3D.6040900-/1wQRMveznE@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 3577 bytes --]
On Wed, Sep 24, 2014 at 10:32:13PM +0300, Mikko Perttunen wrote:
> On 09/24/2014 10:18 PM, Eduardo Valentin wrote:
> >
> >Mikko,
> >
> >On Thu, Aug 21, 2014 at 01:17:22PM +0300, Mikko Perttunen wrote:
> >>...
> >>+
> >>+static int enable_tsensor(struct tegra_soctherm *tegra,
> >>+ const struct tegra_tsensor *sensor,
> >>+ struct tsensor_shared_calibration shared)
> >>+{
> >>+ void * __iomem base = tegra->regs + sensor->base;
> >
> >I get sparse complaining about this declaration. For the sake of keeping
> >a clean static checks, can you please:
> >- void * __iomem base = tegra->regs + sensor->base;
> >+ void __iomem * base = tegra->regs + sensor->base;
> >
>
> Sure.
>
> >Can you also please check the remaining sparse errors?
> > CHECK drivers/thermal/tegra_soctherm.c
> > drivers/thermal/tegra_soctherm.c:260:43: warning: incorrect type in
> > initializer (different address spaces)
> > drivers/thermal/tegra_soctherm.c:260:43: expected void *[noderef]
> > <asn:2>base
> > drivers/thermal/tegra_soctherm.c:260:43: got void [noderef]
> > <asn:2>*
> > drivers/thermal/tegra_soctherm.c:271:9: warning: incorrect type in
> > argument 2 (different address spaces)
> > drivers/thermal/tegra_soctherm.c:271:9: expected void volatile
> > [noderef] <asn:2>*addr
> > drivers/thermal/tegra_soctherm.c:271:9: got void *
> > drivers/thermal/tegra_soctherm.c:279:9: warning: incorrect type in
> > argument 2 (different address spaces)
> > drivers/thermal/tegra_soctherm.c:279:9: expected void volatile
> > [noderef] <asn:2>*addr
> > drivers/thermal/tegra_soctherm.c:279:9: got void *
> > drivers/thermal/tegra_soctherm.c:281:9: warning: incorrect type in
> > argument 2 (different address spaces)
> > drivers/thermal/tegra_soctherm.c:281:9: expected void volatile
> > [noderef] <asn:2>*addr
> > drivers/thermal/tegra_soctherm.c:281:9: got void *
> > drivers/thermal/tegra_soctherm.c:347:25: warning: incorrect type in
> > argument 1 (different address spaces)
> > drivers/thermal/tegra_soctherm.c:347:25: expected void const *ptr
> > drivers/thermal/tegra_soctherm.c:347:25: got void [noderef]
> > <asn:2>*regs
> > drivers/thermal/tegra_soctherm.c:349:37: warning: incorrect type in
> > argument 1 (different address spaces)
> > drivers/thermal/tegra_soctherm.c:349:37: expected void const *ptr
> > drivers/thermal/tegra_soctherm.c:349:37: got void [noderef]
> > <asn:2>*regs
> > drivers/thermal/tegra_soctherm.c:271:9: warning: dereference of
> > noderef expression
> > drivers/thermal/tegra_soctherm.c:279:9: warning: dereference of
> > noderef expression
> > drivers/thermal/tegra_soctherm.c:281:9: warning: dereference of
> > noderef expression
> >
>
> Most of these seem to be caused by the above-mentioned swapping of __iomem
> and *. The ones on lines 347 and 349 are more peculiar, though. Apparently
> sparse doesn't like using IS_ERR and PTR_ERR on the void __iomem * pointer
> returned by devm_ioremap_resource. Looks like this has been discussed before
> (https://lkml.org/lkml/2013/6/17/216) and sparse should have been patched to
> ignore this situation, so I'm not sure why it's complaining about it.
> Anyway, there shouldn't be any issue here.
If I apply the change suggested by Eduardo above then all of the above
warnings go away for me. That's with sparse 0.5.0. According to the
email thread above a patch for this was applied in 0.4.5.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: thierry.reding@gmail.com (Thierry Reding)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 4/4] thermal: Add Tegra SOCTHERM thermal management driver
Date: Thu, 25 Sep 2014 07:59:55 +0200 [thread overview]
Message-ID: <20140925055953.GA12423@ulmo> (raw)
In-Reply-To: <54231C3D.6040900@kapsi.fi>
On Wed, Sep 24, 2014 at 10:32:13PM +0300, Mikko Perttunen wrote:
> On 09/24/2014 10:18 PM, Eduardo Valentin wrote:
> >
> >Mikko,
> >
> >On Thu, Aug 21, 2014 at 01:17:22PM +0300, Mikko Perttunen wrote:
> >>...
> >>+
> >>+static int enable_tsensor(struct tegra_soctherm *tegra,
> >>+ const struct tegra_tsensor *sensor,
> >>+ struct tsensor_shared_calibration shared)
> >>+{
> >>+ void * __iomem base = tegra->regs + sensor->base;
> >
> >I get sparse complaining about this declaration. For the sake of keeping
> >a clean static checks, can you please:
> >- void * __iomem base = tegra->regs + sensor->base;
> >+ void __iomem * base = tegra->regs + sensor->base;
> >
>
> Sure.
>
> >Can you also please check the remaining sparse errors?
> > CHECK drivers/thermal/tegra_soctherm.c
> > drivers/thermal/tegra_soctherm.c:260:43: warning: incorrect type in
> > initializer (different address spaces)
> > drivers/thermal/tegra_soctherm.c:260:43: expected void *[noderef]
> > <asn:2>base
> > drivers/thermal/tegra_soctherm.c:260:43: got void [noderef]
> > <asn:2>*
> > drivers/thermal/tegra_soctherm.c:271:9: warning: incorrect type in
> > argument 2 (different address spaces)
> > drivers/thermal/tegra_soctherm.c:271:9: expected void volatile
> > [noderef] <asn:2>*addr
> > drivers/thermal/tegra_soctherm.c:271:9: got void *
> > drivers/thermal/tegra_soctherm.c:279:9: warning: incorrect type in
> > argument 2 (different address spaces)
> > drivers/thermal/tegra_soctherm.c:279:9: expected void volatile
> > [noderef] <asn:2>*addr
> > drivers/thermal/tegra_soctherm.c:279:9: got void *
> > drivers/thermal/tegra_soctherm.c:281:9: warning: incorrect type in
> > argument 2 (different address spaces)
> > drivers/thermal/tegra_soctherm.c:281:9: expected void volatile
> > [noderef] <asn:2>*addr
> > drivers/thermal/tegra_soctherm.c:281:9: got void *
> > drivers/thermal/tegra_soctherm.c:347:25: warning: incorrect type in
> > argument 1 (different address spaces)
> > drivers/thermal/tegra_soctherm.c:347:25: expected void const *ptr
> > drivers/thermal/tegra_soctherm.c:347:25: got void [noderef]
> > <asn:2>*regs
> > drivers/thermal/tegra_soctherm.c:349:37: warning: incorrect type in
> > argument 1 (different address spaces)
> > drivers/thermal/tegra_soctherm.c:349:37: expected void const *ptr
> > drivers/thermal/tegra_soctherm.c:349:37: got void [noderef]
> > <asn:2>*regs
> > drivers/thermal/tegra_soctherm.c:271:9: warning: dereference of
> > noderef expression
> > drivers/thermal/tegra_soctherm.c:279:9: warning: dereference of
> > noderef expression
> > drivers/thermal/tegra_soctherm.c:281:9: warning: dereference of
> > noderef expression
> >
>
> Most of these seem to be caused by the above-mentioned swapping of __iomem
> and *. The ones on lines 347 and 349 are more peculiar, though. Apparently
> sparse doesn't like using IS_ERR and PTR_ERR on the void __iomem * pointer
> returned by devm_ioremap_resource. Looks like this has been discussed before
> (https://lkml.org/lkml/2013/6/17/216) and sparse should have been patched to
> ignore this situation, so I'm not sure why it's complaining about it.
> Anyway, there shouldn't be any issue here.
If I apply the change suggested by Eduardo above then all of the above
warnings go away for me. That's with sparse 0.5.0. According to the
email thread above a patch for this was applied in 0.4.5.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140925/fd150641/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding@gmail.com>
To: Mikko Perttunen <mikko.perttunen@kapsi.fi>
Cc: Eduardo Valentin <edubezval@gmail.com>,
Mikko Perttunen <mperttunen@nvidia.com>,
rui.zhang@intel.com, swarren@wwwdotorg.org,
linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, juha-matti.tilli@iki.fi
Subject: Re: [PATCH v5 4/4] thermal: Add Tegra SOCTHERM thermal management driver
Date: Thu, 25 Sep 2014 07:59:55 +0200 [thread overview]
Message-ID: <20140925055953.GA12423@ulmo> (raw)
In-Reply-To: <54231C3D.6040900@kapsi.fi>
[-- Attachment #1: Type: text/plain, Size: 3577 bytes --]
On Wed, Sep 24, 2014 at 10:32:13PM +0300, Mikko Perttunen wrote:
> On 09/24/2014 10:18 PM, Eduardo Valentin wrote:
> >
> >Mikko,
> >
> >On Thu, Aug 21, 2014 at 01:17:22PM +0300, Mikko Perttunen wrote:
> >>...
> >>+
> >>+static int enable_tsensor(struct tegra_soctherm *tegra,
> >>+ const struct tegra_tsensor *sensor,
> >>+ struct tsensor_shared_calibration shared)
> >>+{
> >>+ void * __iomem base = tegra->regs + sensor->base;
> >
> >I get sparse complaining about this declaration. For the sake of keeping
> >a clean static checks, can you please:
> >- void * __iomem base = tegra->regs + sensor->base;
> >+ void __iomem * base = tegra->regs + sensor->base;
> >
>
> Sure.
>
> >Can you also please check the remaining sparse errors?
> > CHECK drivers/thermal/tegra_soctherm.c
> > drivers/thermal/tegra_soctherm.c:260:43: warning: incorrect type in
> > initializer (different address spaces)
> > drivers/thermal/tegra_soctherm.c:260:43: expected void *[noderef]
> > <asn:2>base
> > drivers/thermal/tegra_soctherm.c:260:43: got void [noderef]
> > <asn:2>*
> > drivers/thermal/tegra_soctherm.c:271:9: warning: incorrect type in
> > argument 2 (different address spaces)
> > drivers/thermal/tegra_soctherm.c:271:9: expected void volatile
> > [noderef] <asn:2>*addr
> > drivers/thermal/tegra_soctherm.c:271:9: got void *
> > drivers/thermal/tegra_soctherm.c:279:9: warning: incorrect type in
> > argument 2 (different address spaces)
> > drivers/thermal/tegra_soctherm.c:279:9: expected void volatile
> > [noderef] <asn:2>*addr
> > drivers/thermal/tegra_soctherm.c:279:9: got void *
> > drivers/thermal/tegra_soctherm.c:281:9: warning: incorrect type in
> > argument 2 (different address spaces)
> > drivers/thermal/tegra_soctherm.c:281:9: expected void volatile
> > [noderef] <asn:2>*addr
> > drivers/thermal/tegra_soctherm.c:281:9: got void *
> > drivers/thermal/tegra_soctherm.c:347:25: warning: incorrect type in
> > argument 1 (different address spaces)
> > drivers/thermal/tegra_soctherm.c:347:25: expected void const *ptr
> > drivers/thermal/tegra_soctherm.c:347:25: got void [noderef]
> > <asn:2>*regs
> > drivers/thermal/tegra_soctherm.c:349:37: warning: incorrect type in
> > argument 1 (different address spaces)
> > drivers/thermal/tegra_soctherm.c:349:37: expected void const *ptr
> > drivers/thermal/tegra_soctherm.c:349:37: got void [noderef]
> > <asn:2>*regs
> > drivers/thermal/tegra_soctherm.c:271:9: warning: dereference of
> > noderef expression
> > drivers/thermal/tegra_soctherm.c:279:9: warning: dereference of
> > noderef expression
> > drivers/thermal/tegra_soctherm.c:281:9: warning: dereference of
> > noderef expression
> >
>
> Most of these seem to be caused by the above-mentioned swapping of __iomem
> and *. The ones on lines 347 and 349 are more peculiar, though. Apparently
> sparse doesn't like using IS_ERR and PTR_ERR on the void __iomem * pointer
> returned by devm_ioremap_resource. Looks like this has been discussed before
> (https://lkml.org/lkml/2013/6/17/216) and sparse should have been patched to
> ignore this situation, so I'm not sure why it's complaining about it.
> Anyway, there shouldn't be any issue here.
If I apply the change suggested by Eduardo above then all of the above
warnings go away for me. That's with sparse 0.5.0. According to the
email thread above a patch for this was applied in 0.4.5.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-09-25 5:59 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-21 10:17 [PATCH v5 0/4] Tegra124 soctherm driver Mikko Perttunen
2014-08-21 10:17 ` Mikko Perttunen
2014-08-21 10:17 ` Mikko Perttunen
2014-08-21 10:17 ` [PATCH v5 1/4] of: Add bindings for nvidia,tegra124-soctherm Mikko Perttunen
2014-08-21 10:17 ` Mikko Perttunen
2014-08-21 10:17 ` Mikko Perttunen
[not found] ` <1408616242-21009-2-git-send-email-mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-09-24 18:40 ` Eduardo Valentin
2014-09-24 18:40 ` Eduardo Valentin
2014-09-24 18:40 ` Eduardo Valentin
2014-09-24 19:43 ` Stephen Warren
2014-09-24 19:43 ` Stephen Warren
2014-08-21 10:17 ` [PATCH v5 2/4] ARM: tegra: Add soctherm and thermal zones to Tegra124 device tree Mikko Perttunen
2014-08-21 10:17 ` Mikko Perttunen
2014-08-21 10:17 ` Mikko Perttunen
2014-08-21 10:17 ` [PATCH v5 3/4] ARM: tegra: Add thermal trip points for Jetson TK1 Mikko Perttunen
2014-08-21 10:17 ` Mikko Perttunen
2014-08-21 10:17 ` Mikko Perttunen
[not found] ` <1408616242-21009-4-git-send-email-mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-09-24 18:32 ` Eduardo Valentin
2014-09-24 18:32 ` Eduardo Valentin
2014-09-24 18:32 ` Eduardo Valentin
2014-09-24 18:34 ` Mikko Perttunen
2014-09-24 18:34 ` Mikko Perttunen
2014-09-24 18:34 ` Mikko Perttunen
2014-09-24 18:41 ` Eduardo Valentin
2014-09-24 18:41 ` Eduardo Valentin
2014-09-24 18:43 ` Mikko Perttunen
2014-09-24 18:43 ` Mikko Perttunen
2014-09-24 18:48 ` Eduardo Valentin
2014-09-24 18:48 ` Eduardo Valentin
2014-09-24 19:01 ` Mikko Perttunen
2014-09-24 19:01 ` Mikko Perttunen
2014-10-03 19:57 ` Pavel Machek
2014-10-03 19:57 ` Pavel Machek
2014-10-06 7:24 ` Peter De Schrijver
2014-10-06 7:24 ` Peter De Schrijver
2014-10-06 7:24 ` Peter De Schrijver
2014-08-21 10:17 ` [PATCH v5 4/4] thermal: Add Tegra SOCTHERM thermal management driver Mikko Perttunen
2014-08-21 10:17 ` Mikko Perttunen
2014-08-21 10:17 ` Mikko Perttunen
[not found] ` <1408616242-21009-5-git-send-email-mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-09-24 19:18 ` Eduardo Valentin
2014-09-24 19:18 ` Eduardo Valentin
2014-09-24 19:18 ` Eduardo Valentin
2014-09-24 19:32 ` Mikko Perttunen
2014-09-24 19:32 ` Mikko Perttunen
2014-09-24 23:24 ` Eduardo Valentin
2014-09-24 23:24 ` Eduardo Valentin
[not found] ` <54231C3D.6040900-/1wQRMveznE@public.gmane.org>
2014-09-25 5:59 ` Thierry Reding [this message]
2014-09-25 5:59 ` Thierry Reding
2014-09-25 5:59 ` Thierry Reding
2014-09-25 7:55 ` Mikko Perttunen
2014-09-25 7:55 ` Mikko Perttunen
2014-08-21 12:20 ` [PATCH v5 0/4] Tegra124 soctherm driver Juha-Matti Tilli
2014-08-21 12:20 ` Juha-Matti Tilli
2014-08-21 16:01 ` Eduardo Valentin
2014-08-21 16:01 ` Eduardo Valentin
2014-08-21 18:03 ` Juha-Matti Tilli
2014-08-21 18:03 ` Juha-Matti Tilli
2014-08-27 15:36 ` Mikko Perttunen
2014-08-27 15:36 ` Mikko Perttunen
2014-08-27 15:36 ` Mikko Perttunen
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=20140925055953.GA12423@ulmo \
--to=thierry.reding-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=juha-matti.tilli-X3B1VOXEql0@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mikko.perttunen-/1wQRMveznE@public.gmane.org \
--cc=mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.