On Tue, Jun 28, 2022 at 09:29:48AM -0400, Stefan Berger wrote:
> 
> 
> On 6/27/22 18:43, Rob Herring wrote:
> > On Thu, Jun 16, 2022 at 11:41:28AM -0400, Stefan Berger wrote:
> > > Simplify tpm_read_log_of() by moving Openfirmware-specific code into
> > > the Openfirmware driver to make the code reusable. Call the new
> > 
> > There is no such 'Openfirmware driver'.
> > 
> > > of_tpm_get_sml_parameters() function from the TPM Openfirmware driver.
> > > 
> > > Signed-off-by: Stefan Berger <[email protected]>
> > > Cc: Jarkko Sakkinen <[email protected]>
> > > Cc: Jason Gunthorpe <[email protected]>
> > > Cc: Rob Herring <[email protected]>
> > > Cc: Frank Rowand <[email protected]>
> > > ---
> > >   drivers/char/tpm/eventlog/of.c | 31 +++++--------------------------
> > >   drivers/of/Makefile            |  2 +-
> > >   drivers/of/device_node.c       | 27 +++++++++++++++++++++++++++
> > 
> > Humm, definitely the wrong direction. Generally, code for specific
> > bindings does not go in drivers/of/. There used to be some, but we've
> > moved it to the appropriate subsystems. kexec was an exception to not
> > have 2 copies of the same code in arch/.
> 
> The function I am moving here is called by the TPM subsystem and also now by
> of/kexec.c. The latter is compiled under the following conditions:
> 
> ifdef CONFIG_KEXEC_FILE
> ifdef CONFIG_OF_FLATTREE
> obj-y += kexec.o
> endif
> endif
> 
> The code that current calls it is compiled under the following conditions:
> 
> tpm-$(CONFIG_OF) += eventlog/of.o
> 
> To make it available to both I could keep it in the TPM subsystem like this:
> 
> obj-$(CONFIG_OF) = tpm_of.o
> 
> 
> Jarrko, if you read this, any comment?
> 
> 
>    Stefan

Why can't you convert of_tpm_get_sml_parameters() to inline function?

BR, Jarkko

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to