Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1476132

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

From Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h
Date 2016-09-05 07:50 +0200
Message-ID <sdUX7-7Xe-3@gated-at.bofh.it> (permalink)
References (2 earlier) <sd5hT-5pg-3@gated-at.bofh.it> <sd5rA-5sw-5@gated-at.bofh.it> <sdcCJ-1GY-1@gated-at.bofh.it> <sdcCK-1GY-5@gated-at.bofh.it> <sdM3w-2ae-5@gated-at.bofh.it>
Organization Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

Show all headers | View raw


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 'get_default_tpm_for_ns' kind of
> function.

Sorry, but I have no idea what you are talking about.

This does not imply that these structure definitions need to be in
include/linux/tpm.h since you are talking something that does not exist.

> > This still doesn't explain why moving the structures inside the driver
> > would be wrong. Even if outside callers would use a pointer the
> > structure could be opaque.
> 
> For instance, if we did a get function then the 'put' function would
> be an inline around dev_put and that needs to see inside the chip.

I do not see any get/put functionality in include/linux/tpm.h.

> This is a well trodden pattern in the kernel, there is no reason to do
> something different for tpm.

/Jarkko

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-09-02 23:50 +0200
  Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-09-03 00:20 +0200
    Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-09-03 00:40 +0200
      Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-09-03 00:50 +0200
        Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-09-03 08:30 +0200
          Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-09-03 08:30 +0200
            Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-09-04 22:20 +0200
              Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-09-05 07:50 +0200
                Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-09-05 19:50 +0200

csiph-web