From owner-svn-src-head@freebsd.org Tue Sep 1 21:50:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DDC6B37C0EE; Tue, 1 Sep 2020 21:50:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bh12z1Lrqz4Tyh; Tue, 1 Sep 2020 21:50:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D80D2028C; Tue, 1 Sep 2020 21:50:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 081LoXIK040908; Tue, 1 Sep 2020 21:50:33 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 081LoWND040900; Tue, 1 Sep 2020 21:50:32 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202009012150.081LoWND040900@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 1 Sep 2020 21:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365144 - head/sys/dev/tpm X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/dev/tpm X-SVN-Commit-Revision: 365144 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2020 21:50:36 -0000 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 #include - - 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) {