All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] tpm_tis_i2c: Fix -Wdeclaration-after-statement
@ 2022-07-25 22:51 Peter Delevoryas
  2022-07-25 22:51 ` [PATCH 1/1] " Peter Delevoryas
  2022-07-29  0:21 ` [PATCH 0/1] " Joel Stanley
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Delevoryas @ 2022-07-25 22:51 UTC (permalink / raw)
  To: peter, patrick, joel, openbmc

Hey Joel,

I've been trying to build fby35 from https://github.com/openbmc/openbmc, and I
noticed that the TPM TIS I2C file seems to emit a warning that causes a
compilation error:

../drivers/char/tpm/tpm_tis_i2c.c: In function ‘tpm_tis_i2c_write_bytes’:
../drivers/char/tpm/tpm_tis_i2c.c:114:17: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  114 |                 struct i2c_msg msgs[] = {
      |                 ^~~~~~

I'm sending this patch as a fix for the warning, to avoid the compilation error.

Normally I think I would send this to the upstream kernel mailing list, but
this file doesn't actually seem to be in the upstream at any point:

    drivers/char/tpm/tpm_tis_i2c.c

It looks like it was added by Nuvoton and never upstreamed successfully? Perhaps
we should get rid of it at this point? fby35 doesn't actually use the TPM TIS
I2C interface, it uses the SPI one. Bletchley doesn't use the I2C one either.
Only older FB platforms did.

Actually, doing a quick search on lore.kernel.org: It looks like maybe there's
a new version submitted by Infineon in June:

    https://lore.kernel.org/all/20220608173113.9232-1-Alexander.Steffen@infineon.com/

If fby35 wants to avoid this error, should we fix the driver, remove it from the
kernel, pull in the new driver from upstream, or maybe just disable it in the
linux-aspeed tpm2 distro feature Kconfig?

Thanks,
Peter

Peter Delevoryas (1):
  tpm_tis_i2c: Fix -Wdeclaration-after-statement

 drivers/char/tpm/tpm_tis_i2c.c | 36 ++++++++++++----------------------
 1 file changed, 13 insertions(+), 23 deletions(-)

-- 
2.37.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-29  2:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-25 22:51 [PATCH 0/1] tpm_tis_i2c: Fix -Wdeclaration-after-statement Peter Delevoryas
2022-07-25 22:51 ` [PATCH 1/1] " Peter Delevoryas
2022-07-29  0:21 ` [PATCH 0/1] " Joel Stanley
2022-07-29  2:49   ` Peter Delevoryas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.