From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH v5 4/5] Initialize TPM and get durations and timeouts Date: Thu, 11 Feb 2016 11:12:08 -0700 Message-ID: <20160211181208.GA6285@obsidianresearch.com> References: <201602091626.u19GQpga021574@d01av02.pok.ibm.com> <20160209165228.GA14611@obsidianresearch.com> <20160210035620.GB7161@intel.com> <201602100515.u1A5FpFi002736@d03av02.boulder.ibm.com> <20160210162809.GB20730@obsidianresearch.com> <201602102145.u1ALjSAs001597@d03av04.boulder.ibm.com> <20160210222313.GA7047@obsidianresearch.com> <201602110038.u1B0cuE0030670@d03av05.boulder.ibm.com> <20160211070426.GB9307@intel.com> <201602111534.u1BFYvRs019573@d01av03.pok.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <201602111534.u1BFYvRs019573-CUdSWdNILC7ImUpY6SP3GEEOCMrvLtNR@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Stefan Berger Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org List-Id: tpmdd-devel@lists.sourceforge.net On Thu, Feb 11, 2016 at 10:24:18AM -0500, Stefan Berger wrote: > We need two steps here. One to let tpmm_chip_alloc call two functions > tpm_chip_alloc + tpmm_chip_dev (better name?), which are both going to > be public and called by tpm-vtpm.c, and provide tpm_chip_free. Let me > do that. Then we can get rid of the bitmap for the chip->dev_num > independently and use idr there. Make sense. Don't change the names all the drivers would have to be churn'd. tpm_chip_alloc, tpmm_chip_alloc. It is probably OK just to use put_device(&chip->dev), tpm_chip_put is already taken for something else. Don't call it free, it isn't free. 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