Re: [PATCH 2/2] sata_mv: remove iounmap in mv_platform_remove

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



saeed bishara wrote:
 Mmm.. sounds like a bug to me.  Possibly two bugs:

 1. the ioremap() should fail if the range is already mapped, and
 2. we should free the resources on module unload.

 I suppose this would be mostly automatic if the code simply
 were to use devm_ioremap() instead of ioremap().
my understanding for the /proc/iomem was totaly wrong..
the ioremap() actually allocated different address each time,
..

Good.  That makes a lot more sense.

I don't know if should fail if the range is already mapped,
but maybe the name (remap) hints that it is shouldn't.
anyway, I replaced ioremap with devm_ioremap and it looks fine. I'll
send the new patch in different email.
..

I think that the code should first call devm_request_region()
to reserve the ioports -- this will then fail if the ports are in-use.
After success there, it should then call devm_ioremap(),
which gives a virtual address back (the "remap" part) for use within the kernel.

Cheers
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux