All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@snapgear.com>
To: uClinux development list <uclinux-dev@uclinux.org>,
	<linux-mtd@lists.infradead.org>, <dedekind1@gmail.com>
Cc: Greg Ungerer <gerg@uclinux.org>
Subject: Re: [uClinux-dev] [PATCH] mtd: clean up uclinux.c map driver
Date: Tue, 15 May 2012 14:17:27 +1000	[thread overview]
Message-ID: <4FB1D8D7.9010203@snapgear.com> (raw)
In-Reply-To: <1337054928-16228-1-git-send-email-gerg@snapgear.com>

On 15/05/12 14:08, gerg@snapgear.com wrote:
[snip]
>   /****************************************************************************/
> @@ -65,22 +62,22 @@ static int __init uclinux_mtd_init(void)
>   		mapp->size = PAGE_ALIGN(ntohl(*((unsigned long *)(mapp->phys + 8))));
>   	mapp->bankwidth = 4;
>
> -	printk("uclinux[mtd]: RAM probe address=0x%x size=0x%x\n",
> +	printk(KERN_NOTICE "uclinux[mtd]: RAM probe address=0x%x size=0x%x\n",
>   	       	(int) mapp->phys, (int) mapp->size);
>
> -	mapp->virt = phys_to_virt(mapp->phys);
> +	mapp->virt = (void __iomem *) (unsigned long) phys_to_virt(mapp->phys);

I am a little un-easy with this casting. It would seem to indicate
some type of abuse of the virt field...

But this same thing has been done in other mtd mapping drivers, for
example drivers/mtd/maps/amd76xrom.c.

Regards
Greg


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

  reply	other threads:[~2012-05-15  4:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-15  4:08 [PATCH] mtd: clean up uclinux.c map driver gerg
2012-05-15  4:17 ` Greg Ungerer [this message]
2012-05-15 13:12 ` Artem Bityutskiy
2012-05-16  0:43   ` Greg Ungerer
2012-05-15 15:57 ` [uClinux-dev] " Mike Frysinger
2012-05-16  0:45   ` Greg Ungerer
2012-05-16  2:42     ` Mike Frysinger
2012-05-16  2:55       ` Greg Ungerer
2012-05-16  5:02         ` Mike Frysinger
2012-05-16 11:49           ` Greg Ungerer
2012-05-16 16:23             ` Mike Frysinger
2012-05-16  9:28   ` Artem Bityutskiy

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=4FB1D8D7.9010203@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.