freebsd-skq/sys/modules/tpm/Makefile
Dimitry Andric f6d5b31f8b Revert r357349, since the clang 10.0.0 warning was actually correct, and
the ! operator should have been a ~ instead:

  Merge r357348 from the clang 10.0.0 import branch:

  Disable new clang 10.0.0 warnings about converting the result of
  shift operations to a boolean in tpm(4):

  sys/dev/tpm/tpm_crb.c:301:32: error: converting the result of '<<' to a boolean; did you mean '(1 << (0)) != 0'? [-Werror,-Wint-in-bool-context]
	  WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
					^
  sys/dev/tpm/tpm_crb.c:73:34: note: expanded from macro 'TPM_CRB_CTRL_CANCEL_CMD'
  #define TPM_CRB_CTRL_CANCEL_CMD         BIT(0)
					  ^
  sys/dev/tpm/tpm20.h:60:19: note: expanded from macro 'BIT'
  #define BIT(x) (1 << (x))
		    ^

  Such warnings can be useful in C++ contexts, but not so much in kernel
  drivers, where this type of bit twiddling is commonplace.  So disable
  it for this case.

Noticed by:	cem
MFC after:	3 days
2020-02-01 16:57:04 +00:00

14 lines
244 B
Makefile

# $FreeBSD$
.PATH: ${SRCTOP}/sys/dev/tpm
KMOD= tpm
SRCS= tpm.c bus_if.h device_if.h
#Bus specific stuff.
SRCS+= tpm_isa.c tpm_acpi.c isa_if.h opt_acpi.h acpi_if.h
#TPM 2.0
SRCS+= tpm20.c tpm_crb.c tpm_tis.c opt_tpm.h
.include <bsd.kmod.mk>