On Tue, Aug 30, 2016 at 12:50:16AM -0400, Nayna Jain wrote:
> Currently, the difference in read_log method for ACPI/OF based platforms
> is handled by defining respective read_log method and handing
> them using CONFIG based #ifdef condition in Makefile which is not
> the recommended approach.
> 
> This patch cleans up the ifdef condition in Makefile by defining
> single read_log method which checks for ACPI/OF event log memory in
> sequence.
> 
> Suggested-by: Jason Gunthorpe <jguntho...@obsidianresearch.com>
> Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com>

Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com>

Yep, this is what I was looking to see..

> +#if defined(CONFIG_ACPI)
> +int read_log_acpi(struct tpm_chip *chip);
> +#else
> +static inline int read_log_acpi(struct tpm_chip *chip)
> +{
> +     return -1;
> +}
> +#endif
> +
> +#if defined(CONFIG_OF)
> +int read_log_of(struct tpm_chip *chip);
> +#else
> +static inline int read_log_of(struct tpm_chip *chip)
> +{
> +     return -1;
> +}
> +#endif

Though shouldn't these two be ERRNOs of some kind? -ENODEV?

Jason

------------------------------------------------------------------------------
_______________________________________________
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

Reply via email to