From: "Peter Hüwe" <PeterHuewe@gmx.de>
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: tpmdd-devel@lists.sourceforge.net, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [tpmdd-devel] [PATCH] Use devm_ioremap_resource to reserve resource
Date: Tue, 22 Jul 2014 02:02:02 +0200 [thread overview]
Message-ID: <201407220202.02388.PeterHuewe@gmx.de> (raw)
In-Reply-To: <20140721234330.GA6482@obsidianresearch.com>
Am Dienstag, 22. Juli 2014, 01:43:30 schrieb Jason Gunthorpe:
> On Tue, Jul 22, 2014 at 01:26:05AM +0200, Peter Huewe wrote:
> > Unfortunately the tpm_tis driver did never call request_region for its
> > adress space - now since we've got devm_ioremap_resource we can simply
> > remove all the stuff and do everything in one call.
> >
>
> Hurm, this makes the ordering truely horrible and opaque. Are you
> completely certain that in every case the devm unwide will happen only
> after cleanup_tis is called?
>
> Intuitively, I would expect all devices to have been detached and
> resources freed prior to the module exit function being called...
>
> I'd be much happier with mixing devm into this driver if it had a
> proper driver remove method and the unnecessary tis_chips list was
> purged.
>
> Jason
Ok, thanks for the review - that's why I post this stuff to the mailing list
first ;)
In my tests everything worked fine, but I agree that the TPM code is so
horible that there might be a lot of cases not handled correctly.
I think I'll conjure up a "manual" patch, doing the request_region and
release_region manually ?
Thanks,
Peter
prev parent reply other threads:[~2014-07-21 23:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 23:26 Peter Huewe
2014-07-21 23:43 ` [tpmdd-devel] " Jason Gunthorpe
2014-07-22 0:02 ` Peter Hüwe [this message]
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=201407220202.02388.PeterHuewe@gmx.de \
--to=peterhuewe@gmx.de \
--cc=jgunthorpe@obsidianresearch.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tpmdd-devel@lists.sourceforge.net \
/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
Powered by JetHome