All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@snapgear.com>
To: <dedekind1@gmail.com>
Cc: linux-mtd@lists.infradead.org, uclinux-dev@uclinux.org,
	Greg Ungerer <gerg@uclinux.org>
Subject: Re: [PATCH 1/2] mtd: fix wrong usage of ioremap_nocache() in uclinux.c map driver
Date: Mon, 14 May 2012 22:58:06 +1000	[thread overview]
Message-ID: <4FB1015E.5000008@snapgear.com> (raw)
In-Reply-To: <1336997124.2528.22.camel@sauron.fi.intel.com>

Hi Artem,

On 05/14/2012 10:05 PM, Artem Bityutskiy wrote:
> I have few requests
>
> On Thu, 2012-05-10 at 16:55 +1000, gerg@snapgear.com wrote:
>> @@ -80,7 +80,6 @@ static int __init uclinux_mtd_init(void)
>>   	mtd = do_map_probe("map_ram", mapp);
>>   	if (!mtd) {
>>   		printk("uclinux[mtd]: failed to find a mapping?\n");
>
> KERN_ERR prefixe is missing. Please, fix other printks in this file
> while on it.
>
>> -		iounmap(mapp->virt);
>>   		return(-ENXIO);
>>   	}
>>
>> @@ -103,10 +102,8 @@ static void __exit uclinux_mtd_cleanup(void)
>>   		map_destroy(uclinux_ram_mtdinfo);
>>   		uclinux_ram_mtdinfo = NULL;
>>   	}
>> -	if (uclinux_ram_map.virt) {
>> -		iounmap((void *) uclinux_ram_map.virt);
>> +	if (uclinux_ram_map.virt)
>>   		uclinux_ram_map.virt = 0;
>> -	}
>
> The "if" statements are redundant - could you please kill them?
>
> Would you please be kind to address these sparse warnings while you work
> on this rarely used file:
>
> drivers/mtd/maps/uclinux.c:27:17: warning: symbol 'uclinux_ram_map' was not declared. Should it be static? [sparse]
> drivers/mtd/maps/uclinux.c:49:15: warning: incorrect type in assignment (different address spaces) [sparse]
> drivers/mtd/maps/uclinux.c:49:15:    expected void *<noident>  [sparse]
> drivers/mtd/maps/uclinux.c:49:15:    got void [noderef]<asn:2>* [sparse]
> drivers/mtd/maps/uclinux.c:71:20: warning: incorrect type in assignment (different address spaces) [sparse]
> drivers/mtd/maps/uclinux.c:71:20:    expected void [noderef]<asn:2>*virt [sparse]
> drivers/mtd/maps/uclinux.c:71:20:    got void * [sparse]
> drivers/mtd/maps/uclinux.c:73:27: warning: Using plain integer as NULL pointer [sparse]
> drivers/mtd/maps/uclinux.c:106:40: warning: Using plain integer as NULL pointer [sparse]

Sure thing, I can clean all those up. Are you happy to take a single
cleanup patch on top of the ioremap_nocache fix patch?

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close,                            FAX:         +61 7 3891 3630
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

  reply	other threads:[~2012-05-14 12:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10  6:55 [PATCH 1/2] mtd: fix wrong usage of ioremap_nocache() in uclinux.c map driver gerg
2012-05-10  6:55 ` [PATCH 2/2] mtd: allow uclinux map driver to be used on any ColdFire CPU platform gerg
2012-05-11 16:05 ` [PATCH 1/2] mtd: fix wrong usage of ioremap_nocache() in uclinux.c map driver Artem Bityutskiy
2012-05-12 12:10   ` Greg Ungerer
2012-05-14  9:44     ` Artem Bityutskiy
2012-05-14 12:05 ` Artem Bityutskiy
2012-05-14 12:58   ` Greg Ungerer [this message]
2012-05-14 13:03     ` Artem Bityutskiy
2012-07-06 15:55 ` David Woodhouse
2012-07-09  6:08   ` Greg Ungerer
2012-07-12  7:49     ` David Woodhouse
2012-07-13  6:25       ` Greg Ungerer
2012-07-18 12:12 ` Artem Bityutskiy
2012-07-19  5:44   ` Greg Ungerer

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=4FB1015E.5000008@snapgear.com \
    --to=gerg@snapgear.com \
    --cc=dedekind1@gmail.com \
    --cc=gerg@uclinux.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=uclinux-dev@uclinux.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.