From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753964AbdJaUDJ (ORCPT ); Tue, 31 Oct 2017 16:03:09 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:48818 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753921AbdJaUDG (ORCPT ); Tue, 31 Oct 2017 16:03:06 -0400 X-Google-Smtp-Source: ABhQp+R9V4SeQjRT/ELJ98KV3RpKsHdpIfJXAq2fKr1mVn3HiKDYi+I9H8yA3Ki/zjnTcANDQpoWMw== Date: Tue, 31 Oct 2017 14:03:03 -0600 From: Jason Gunthorpe To: Jarkko Sakkinen Cc: linux-kernel@vger.kernel.org, Matt Mackall , Herbert Xu , Peter Huewe , Marcel Selhorst , Mimi Zohar , Dmitry Kasatkin , James Morris , "Serge E. Hallyn" , David Safford , David Howells , Jerry Snitselaar , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , "open list:INTEGRITY MEASUREMENT ARCHITECTURE (IMA)" , "open list:KEYS-TRUSTED" Subject: Re: [PATCH v3] tpm: use struct tpm_chip for tpm_chip_find_get() Message-ID: <20171031200303.GB18578@ziepe.ca> References: <20171026135453.24672-1-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171026135453.24672-1-jarkko.sakkinen@linux.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 26, 2017 at 03:54:50PM +0200, Jarkko Sakkinen wrote: > Device number (the character device index) is not a stable identifier > for a TPM chip. That is the reason why every call site passes > TPM_ANY_NUM to tpm_chip_find_get(). > > This commit changes the API in a way that instead a struct tpm_chip > instance is given and NULL means the default chip. In addition, this > commit refines the documentation to be up to date with the > implementation. > > Suggested-by: Jason Gunthorpe (@chip_num -> @chip) > Signed-off-by: Jarkko Sakkinen Reviewed-by: Jason Gunthorpe Jason