[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <201407220202.02388.PeterHuewe@gmx.de>
Date: Tue, 22 Jul 2014 02:02:02 +0200
From: Peter Hüwe <PeterHuewe@....de>
To: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
Cc: tpmdd-devel@...ts.sourceforge.net,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [tpmdd-devel] [PATCH] Use devm_ioremap_resource to reserve resource
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists