From: "Phil Endecott" <spam_from_linux_mtd@chezphil.org>
To: <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH] Fix kfree usage in various mtd map remove functions
Date: Mon, 21 May 2007 18:09:46 +0100 [thread overview]
Message-ID: <1179767386547@dmwebmail.belize.chezphil.org> (raw)
In-Reply-To: <loom.20070521T174147-996@post.gmane.org>
The other issue that I noticed was the use of release_resource()
instead of release_mem_region(). I'm not at all sure what should be
going on here, but as far as I can see from kernel/resource.c these
functions are not equivalent, and the "Linux Device Drivers" book shows
release_mem_region() used to reverse the effect of
request_mem_region(). I think that release_resource() should be called
when (for example) a hotpluggable device is unplugged and the resource
goes away, whereas release_mem_region() should be called when a driver
no longer needs use of that area of memory. It's complex to understand
the source because the same 'struct resource' is used to describe a
physical resource and also a reservation/allocation of a portion of a
physical resource to a driver.
I could submit a patch that replaces the release_resource() calls with
release_mem_region(), but I would not be happy doing so unless someone
with a bit more of a clue than me said it was the right thing to do.
Does anyone know of any documentation for any of these 'resource' functions?
See for example:
drivers/mtd/maps/ixp4xx.c function int ixp4xx_flash_remove
Phil.
next prev parent reply other threads:[~2007-05-21 17:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-17 18:18 [PATCH] Fix kfree usage in various mtd map remove functions Phil Endecott
2007-05-21 15:44 ` MikeW
2007-05-21 17:09 ` Phil Endecott [this message]
2007-05-23 8:01 ` MikeW
2007-05-21 15:53 ` MikeW
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=1179767386547@dmwebmail.belize.chezphil.org \
--to=spam_from_linux_mtd@chezphil.org \
--cc=linux-mtd@lists.infradead.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