From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Jarkko Sakkinen
<jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: "moderated list:TPM DEVICE DRIVER"
<tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
open list <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h
Date: Fri, 2 Sep 2016 16:45:31 -0600 [thread overview]
Message-ID: <20160902224531.GC1897@obsidianresearch.com> (raw)
In-Reply-To: <20160902223522.GA27454-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
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 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 struct tpm_chip into the public header, and that requires ops
> > to be in the public header.
> >
> > This is why I put ops here in the first place.
>
> I'm OK with it as long as you explain why this is necessary. I see no
> use for them outside the TPM subsystem.
That is because the users out side the subsystem are Doing it Wrong.
eg this:
extern int tpm_is_tpm2(u32 chip_num);
Should be:
extern int tpm_is_tpm2(struct tpm_chip *chip);
And same for all other examples.
The 'chip_num' thing is bonkers.
Jason
------------------------------------------------------------------------------
next prev parent reply other threads:[~2016-09-02 22:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-02 21:48 [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h Jarkko Sakkinen
2016-09-02 22:11 ` Jason Gunthorpe
2016-09-02 22:35 ` Jarkko Sakkinen
[not found] ` <20160902223522.GA27454-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-09-02 22:45 ` Jason Gunthorpe [this message]
[not found] ` <20160902224531.GC1897-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-03 6:22 ` Jarkko Sakkinen
2016-09-03 6:26 ` Jarkko Sakkinen
[not found] ` <20160903062605.GB2061-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-09-04 20:14 ` Jason Gunthorpe
2016-09-05 5:44 ` Jarkko Sakkinen
2016-09-05 17:44 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160902224531.GC1897@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).