Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-05 Thread Jason Gunthorpe
On Mon, Sep 05, 2016 at 08:44:34AM +0300, Jarkko Sakkinen wrote: > On Sun, Sep 04, 2016 at 02:14:06PM -0600, Jason Gunthorpe wrote: > > On Sat, Sep 03, 2016 at 09:26:05AM +0300, Jarkko Sakkinen wrote: > > > > > > > > OK, how would one get the chip instance? > > > > Most subsystems have a get

Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-05 Thread Jason Gunthorpe
On Mon, Sep 05, 2016 at 08:44:34AM +0300, Jarkko Sakkinen wrote: > On Sun, Sep 04, 2016 at 02:14:06PM -0600, Jason Gunthorpe wrote: > > On Sat, Sep 03, 2016 at 09:26:05AM +0300, Jarkko Sakkinen wrote: > > > > > > > > OK, how would one get the chip instance? > > > > Most subsystems have a get

Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-04 Thread Jarkko Sakkinen
On Sun, Sep 04, 2016 at 02:14:06PM -0600, Jason Gunthorpe wrote: > On Sat, Sep 03, 2016 at 09:26:05AM +0300, Jarkko Sakkinen wrote: > > > > > > OK, how would one get the chip instance? > > Most subsystems have a get function that returns a kref'd pointer. For > TPM all we really need today is a

Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-04 Thread Jarkko Sakkinen
On Sun, Sep 04, 2016 at 02:14:06PM -0600, Jason Gunthorpe wrote: > On Sat, Sep 03, 2016 at 09:26:05AM +0300, Jarkko Sakkinen wrote: > > > > > > OK, how would one get the chip instance? > > Most subsystems have a get function that returns a kref'd pointer. For > TPM all we really need today is a

Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-04 Thread Jason Gunthorpe
On Sat, Sep 03, 2016 at 09:26:05AM +0300, Jarkko Sakkinen wrote: > > > > OK, how would one get the chip instance? Most subsystems have a get function that returns a kref'd pointer. For TPM all we really need today is a 'get_default_tpm_for_ns' kind of function. > This still doesn't explain why

Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-04 Thread Jason Gunthorpe
On Sat, Sep 03, 2016 at 09:26:05AM +0300, Jarkko Sakkinen wrote: > > > > OK, how would one get the chip instance? Most subsystems have a get function that returns a kref'd pointer. For TPM all we really need today is a 'get_default_tpm_for_ns' kind of function. > This still doesn't explain why

Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-03 Thread Jarkko Sakkinen
On Sat, Sep 03, 2016 at 09:22:21AM +0300, Jarkko Sakkinen wrote: > On Fri, Sep 02, 2016 at 04:45:31PM -0600, Jason Gunthorpe wrote: > > On Sat, Sep 03, 2016 at 01:35:22AM +0300, Jarkko Sakkinen wrote: > > > On Fri, Sep 02, 2016 at 04:11:22PM -0600, Jason Gunthorpe wrote: > > > > On Sat, Sep 03,

Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-03 Thread Jarkko Sakkinen
On Sat, Sep 03, 2016 at 09:22:21AM +0300, Jarkko Sakkinen wrote: > On Fri, Sep 02, 2016 at 04:45:31PM -0600, Jason Gunthorpe wrote: > > On Sat, Sep 03, 2016 at 01:35:22AM +0300, Jarkko Sakkinen wrote: > > > On Fri, Sep 02, 2016 at 04:11:22PM -0600, Jason Gunthorpe wrote: > > > > On Sat, Sep 03,

Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-03 Thread Jarkko Sakkinen
On Fri, Sep 02, 2016 at 04:45:31PM -0600, Jason Gunthorpe wrote: > On Sat, Sep 03, 2016 at 01:35:22AM +0300, Jarkko Sakkinen wrote: > > On Fri, Sep 02, 2016 at 04:11:22PM -0600, Jason Gunthorpe wrote: > > > On Sat, Sep 03, 2016 at 12:48:03AM +0300, Jarkko Sakkinen wrote: > > > > The struct

Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-03 Thread Jarkko Sakkinen
On Fri, Sep 02, 2016 at 04:45:31PM -0600, Jason Gunthorpe wrote: > On Sat, Sep 03, 2016 at 01:35:22AM +0300, Jarkko Sakkinen wrote: > > On Fri, Sep 02, 2016 at 04:11:22PM -0600, Jason Gunthorpe wrote: > > > On Sat, Sep 03, 2016 at 12:48:03AM +0300, Jarkko Sakkinen wrote: > > > > The struct

Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-02 Thread Jason Gunthorpe
On Sat, Sep 03, 2016 at 01:35:22AM +0300, Jarkko Sakkinen wrote: > On Fri, Sep 02, 2016 at 04:11:22PM -0600, Jason Gunthorpe wrote: > > On Sat, Sep 03, 2016 at 12:48:03AM +0300, Jarkko Sakkinen wrote: > > > The struct tpm_class_ops is not used outside the TPM driver. Thus, > > > it can be safely

Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-02 Thread Jason Gunthorpe
On Sat, Sep 03, 2016 at 01:35:22AM +0300, Jarkko Sakkinen wrote: > On Fri, Sep 02, 2016 at 04:11:22PM -0600, Jason Gunthorpe wrote: > > On Sat, Sep 03, 2016 at 12:48:03AM +0300, Jarkko Sakkinen wrote: > > > The struct tpm_class_ops is not used outside the TPM driver. Thus, > > > it can be safely

Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-02 Thread Jarkko Sakkinen
On Fri, Sep 02, 2016 at 04:11:22PM -0600, Jason Gunthorpe wrote: > On Sat, Sep 03, 2016 at 12:48:03AM +0300, Jarkko Sakkinen wrote: > > The struct tpm_class_ops is not used outside the TPM driver. Thus, > > it can be safely move to drivers/char/tpm/tpm.h. > > No, this is the wrong direction. > >

Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-02 Thread Jarkko Sakkinen
On Fri, Sep 02, 2016 at 04:11:22PM -0600, Jason Gunthorpe wrote: > On Sat, Sep 03, 2016 at 12:48:03AM +0300, Jarkko Sakkinen wrote: > > The struct tpm_class_ops is not used outside the TPM driver. Thus, > > it can be safely move to drivers/char/tpm/tpm.h. > > No, this is the wrong direction. > >

Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-02 Thread Jason Gunthorpe
On Sat, Sep 03, 2016 at 12:48:03AM +0300, Jarkko Sakkinen wrote: > The struct tpm_class_ops is not used outside the TPM driver. Thus, > it can be safely move to drivers/char/tpm/tpm.h. No, this is the wrong direction. The goal is to make things more like other subsystems, so we should be moving

Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-02 Thread Jason Gunthorpe
On Sat, Sep 03, 2016 at 12:48:03AM +0300, Jarkko Sakkinen wrote: > The struct tpm_class_ops is not used outside the TPM driver. Thus, > it can be safely move to drivers/char/tpm/tpm.h. No, this is the wrong direction. The goal is to make things more like other subsystems, so we should be moving

[PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-02 Thread Jarkko Sakkinen
The struct tpm_class_ops is not used outside the TPM driver. Thus, it can be safely move to drivers/char/tpm/tpm.h. Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm.h | 13 + include/linux/tpm.h| 14 -- 2 files changed, 13

[PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h

2016-09-02 Thread Jarkko Sakkinen
The struct tpm_class_ops is not used outside the TPM driver. Thus, it can be safely move to drivers/char/tpm/tpm.h. Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm.h | 13 + include/linux/tpm.h| 14 -- 2 files changed, 13 insertions(+), 14 deletions(-) diff