From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 2/2] video: clps711x: Fix sparse warnings
Date: Fri, 04 Jul 2014 08:06:31 +0000 [thread overview]
Message-ID: <53B66087.1040500@ti.com> (raw)
In-Reply-To: <1403937246-14506-2-git-send-email-shc_work@mail.ru>
[-- Attachment #1: Type: text/plain, Size: 1771 bytes --]
Hi,
On 01/07/14 13:31, Alexander Shiyan wrote:
> Tue, 1 Jul 2014 13:22:51 +0300 от Tomi Valkeinen <tomi.valkeinen@ti.com>:
>> On 01/07/14 09:23, Alexander Shiyan wrote:
>>> Tue, 1 Jul 2014 09:14:02 +0300 от Tomi Valkeinen <tomi.valkeinen@ti.com>:
>>>> On 28/06/14 09:34, Alexander Shiyan wrote:
>>>>> This patch fixes below warnings:
>>>>> CHECK drivers/video/fbdev/clps711x-fb.c
>>>>> drivers/video/fbdev/clps711x-fb.c:247:24: warning: incorrect type in argument 1 (different address spaces)
>>>>> drivers/video/fbdev/clps711x-fb.c:247:24: expected void const *ptr
>>>>> drivers/video/fbdev/clps711x-fb.c:247:24: got char [noderef] <asn:2>*screen_base
>>>>> drivers/video/fbdev/clps711x-fb.c:248:35: warning: incorrect type in argument 1 (different address spaces)
>>>>> drivers/video/fbdev/clps711x-fb.c:248:35: expected void const *ptr
>>>>> drivers/video/fbdev/clps711x-fb.c:248:35: got char [noderef] <asn:2>*screen_base
>>> ...
>>>>> info->screen_base = devm_ioremap_resource(dev, res);
>>>>> - if (IS_ERR(info->screen_base)) {
>>>>> - ret = PTR_ERR(info->screen_base);
>>>>> + if (IS_ERR((__force void *)info->screen_base)) {
>>>>> + ret = PTR_ERR((__force void *)info->screen_base);
>>>>
>>>> I don't see any other user of devm_ioremap_resource() having that kind
>>>> of casts. Why are they needed here?
>>>
>>> Not needed, type cast was done only to remove sparse warnings.
>>
>> Right, but I think either sparse is wrong here, or the PTR_ERR/IS_ERR
>> are wrong. You shouldn't do typecasts like that to hide those warnings.
>
> Well, I'll remove these changes and send a second version of the patch.
I applied these two patches, and removed the type casts from the second one.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-07-04 8:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-28 6:34 [PATCH 2/2] video: clps711x: Fix sparse warnings Alexander Shiyan
2014-07-01 6:14 ` Tomi Valkeinen
2014-07-01 10:22 ` Tomi Valkeinen
2014-07-04 8:06 ` Tomi Valkeinen [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-07-26 7:59 [PATCH 2/2] video: imxfb: Add feature to =?UTF-8?B?c2V0dXAgUFdNIENvb Alexander Shiyan
2014-07-01 6:23 ` [PATCH 2/2] video: clps711x: Fix sparse warnings Alexander Shiyan
2014-07-01 10:31 ` Alexander Shiyan
2014-07-04 8:35 ` Alexander Shiyan
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=53B66087.1040500@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=linux-fbdev@vger.kernel.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 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).