Date: Tue, 1 Sep 2020 21:50:32 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365144 - head/sys/dev/tpm Message-ID: <202009012150.081LoWND040900@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Tue Sep 1 21:50:31 2020 New Revision: 365144 URL: https://svnweb.freebsd.org/changeset/base/365144 Log: tpm: clean up empty lines in .c and .h files Modified: head/sys/dev/tpm/tpm.c head/sys/dev/tpm/tpm20.c head/sys/dev/tpm/tpm20.h head/sys/dev/tpm/tpm_acpi.c head/sys/dev/tpm/tpm_crb.c head/sys/dev/tpm/tpm_tis.c Modified: head/sys/dev/tpm/tpm.c ============================================================================== --- head/sys/dev/tpm/tpm.c Tue Sep 1 21:50:21 2020 (r365143) +++ head/sys/dev/tpm/tpm.c Tue Sep 1 21:50:31 2020 (r365144) @@ -146,7 +146,6 @@ __FBSDID("$FreeBSD$"); /* Set when enabling legacy interface in host bridge. */ int tpm_enabled; - #ifdef __FreeBSD__ #define TPMSOFTC(dev) \ ((struct tpm_softc *)dev->si_drv1) @@ -244,7 +243,6 @@ tpm_identify(driver_t *driver, device_t parent) } #endif - int tpm_attach(device_t dev) { @@ -270,7 +268,7 @@ tpm_attach(device_t dev) /* In case PnP probe this may contain some initialization. */ tpm_tis12_probe(sc->sc_bt, sc->sc_bh); - + if (tpm_legacy_probe(sc->sc_bt, sc->sc_bh)) { sc->sc_init = tpm_legacy_init; sc->sc_start = tpm_legacy_start; @@ -330,7 +328,6 @@ tpm_detach(device_t dev) return 0; } - #else /* Modified: head/sys/dev/tpm/tpm20.c ============================================================================== --- head/sys/dev/tpm/tpm20.c Tue Sep 1 21:50:21 2020 (r365143) +++ head/sys/dev/tpm/tpm20.c Tue Sep 1 21:50:31 2020 (r365144) @@ -177,7 +177,6 @@ tpm20_close(struct cdev *dev, int flag, int mode, stru return (0); } - int tpm20_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) @@ -234,7 +233,6 @@ tpm20_release(struct tpm_sc *sc) destroy_dev(sc->sc_cdev); } - int tpm20_suspend(device_t dev) { @@ -266,7 +264,6 @@ tpm20_harvest(void *arg) 0x00, 0x00, 0x01, 0x7b, /* cmd TPM_CC_GetRandom */ 0x00, TPM_HARVEST_SIZE /* number of bytes requested */ }; - sc = arg; sx_xlock(&sc->dev_lock); Modified: head/sys/dev/tpm/tpm20.h ============================================================================== --- head/sys/dev/tpm/tpm20.h Tue Sep 1 21:50:21 2020 (r365143) +++ head/sys/dev/tpm/tpm20.h Tue Sep 1 21:50:31 2020 (r365144) @@ -95,7 +95,6 @@ __FBSDID("$FreeBSD$"); #define TPM_CDEV_NAME "tpm0" #define TPM_CDEV_PERM_FLAG 0600 - #define TPM2_START_METHOD_ACPI 2 #define TPM2_START_METHOD_TIS 6 #define TPM2_START_METHOD_CRB 7 Modified: head/sys/dev/tpm/tpm_acpi.c ============================================================================== --- head/sys/dev/tpm/tpm_acpi.c Tue Sep 1 21:50:21 2020 (r365143) +++ head/sys/dev/tpm/tpm_acpi.c Tue Sep 1 21:50:31 2020 (r365144) @@ -44,8 +44,6 @@ __FBSDID("$FreeBSD$"); #include <contrib/dev/acpica/include/accommon.h> #include <dev/acpica/acpivar.h> - - char *tpm_ids[] = {"ATM1200", "BCM0102", "INTC0102", "SNO3504", "WEC1000", "PNP0C31", NULL}; @@ -53,7 +51,7 @@ static int tpm_acpi_probe(device_t dev) { int rv; - + rv = ACPI_ID_PROBE(device_get_parent(dev), dev, tpm_ids, NULL); if (rv <= 0) device_set_desc(dev, "Trusted Platform Module"); Modified: head/sys/dev/tpm/tpm_crb.c ============================================================================== --- head/sys/dev/tpm/tpm_crb.c Tue Sep 1 21:50:21 2020 (r365143) +++ head/sys/dev/tpm/tpm_crb.c Tue Sep 1 21:50:31 2020 (r365144) @@ -85,7 +85,6 @@ struct tpmcrb_sc { size_t rsp_buf_size; }; - int tpmcrb_transmit(struct tpm_sc *sc, size_t size); static int tpmcrb_acpi_probe(device_t dev); Modified: head/sys/dev/tpm/tpm_tis.c ============================================================================== --- head/sys/dev/tpm/tpm_tis.c Tue Sep 1 21:50:21 2020 (r365143) +++ head/sys/dev/tpm/tpm_tis.c Tue Sep 1 21:50:31 2020 (r365144) @@ -331,7 +331,6 @@ tpmtis_write_bytes(struct tpm_sc *sc, size_t count, ui return (true); } - static bool tpmtis_request_locality(struct tpm_sc *sc, int locality) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009012150.081LoWND040900>