Jason Gunthorpe <[email protected]> wrote on 02/11/2016
06:56:11 PM:
>
> On Thu, Feb 11, 2016 at 05:26:24PM -0500, Stefan Berger wrote:
>
> > > What is the point of tpmm_chip_dev?
> > So that the usage model of the chip is the same. We get this in the
> > tpm-vtpm.c with tpm_alloc_chip + tpmm_chip_dev while all others can
> > call tpmm_chip_alloc, which combines the two.
>
> No need, just don't use devm in vtpm, that is even better. The
> standard devm idiom is a with and without version.
Updated the branch. Are you going to upstream your patch? Otherwise I
would just add your Signed-off-by to it if that's ok ?
https://github.com/stefanberger/linux/tree/vtpm-driver.v3
>
> > > Just have the vtpm driver do device_initialize, then tpm_alloc
and
> > > have the release function do put_device on the chip. No need for
devm
> > > at all
>
> > I would also like to have a tpm_chip_put (static inline in tpm.h ?)
> > that wraps the put_device. To me this is more intuitive than
calling
> > put_device() as a counter-part to tpm_chip_alloc.
>
> Many in the kernel community would call this sort of wrapping
> obfuscation.. We don't have a put_platform_device, etc for
> instance. Naked put_device in an error path is fine.
I guess it's a matter of getting used to. I still like being 'guided' by
function names...
Stefan
>
> Jason
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
tpmdd-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel