From owner-svn-src-head@freebsd.org Tue Sep 1 21:51:11 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 6B14137C07E; Tue, 1 Sep 2020 21:51:11 +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 4Bh13g24m6z4VM3; Tue, 1 Sep 2020 21:51:11 +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 2BF0620309; Tue, 1 Sep 2020 21:51:11 +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 081LpAwD041874; Tue, 1 Sep 2020 21:51:10 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 081LpAwI041873; Tue, 1 Sep 2020 21:51:10 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202009012151.081LpAwI041873@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:51:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365146 - head/sys/dev/tdfx X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/dev/tdfx X-SVN-Commit-Revision: 365146 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:51:11 -0000 Author: mjg Date: Tue Sep 1 21:51:10 2020 New Revision: 365146 URL: https://svnweb.freebsd.org/changeset/base/365146 Log: tdfx: clean up empty lines in .c and .h files Modified: head/sys/dev/tdfx/tdfx_linux.h head/sys/dev/tdfx/tdfx_pci.c Modified: head/sys/dev/tdfx/tdfx_linux.h ============================================================================== --- head/sys/dev/tdfx/tdfx_linux.h Tue Sep 1 21:50:47 2020 (r365145) +++ head/sys/dev/tdfx/tdfx_linux.h Tue Sep 1 21:51:10 2020 (r365146) @@ -33,7 +33,6 @@ * $FreeBSD$ */ - #include #include #include Modified: head/sys/dev/tdfx/tdfx_pci.c ============================================================================== --- head/sys/dev/tdfx/tdfx_pci.c Tue Sep 1 21:50:47 2020 (r365145) +++ head/sys/dev/tdfx/tdfx_pci.c Tue Sep 1 21:51:10 2020 (r365146) @@ -75,13 +75,10 @@ __FBSDID("$FreeBSD$"); #include #include - static devclass_t tdfx_devclass; - static int tdfx_count = 0; - /* Set up the boot probe/attach routines */ static device_method_t tdfx_methods[] = { DEVMETHOD(device_probe, tdfx_probe), @@ -250,7 +247,7 @@ tdfx_attach(device_t dev) { tdfx_info->devt = make_dev(&tdfx_cdev, device_get_unit(dev), UID_ROOT, GID_WHEEL, 0600, "3dfx%x", device_get_unit(dev)); tdfx_info->devt->si_drv1 = tdfx_info; - + return 0; } @@ -259,7 +256,7 @@ tdfx_detach(device_t dev) { struct tdfx_softc* tdfx_info; int retval; tdfx_info = device_get_softc(dev); - + /* Delete allocated resource, of course */ bus_release_resource(dev, SYS_RES_MEMORY, tdfx_info->memrid, tdfx_info->memrange); @@ -303,12 +300,12 @@ tdfx_clrmtrr(device_t dev) { */ int retval, act; struct tdfx_softc *tdfx_info = device_get_softc(dev); - + act = MEMRANGE_SET_REMOVE; retval = mem_range_attr_set(&tdfx_info->mrdesc, &act); return retval; } - + static int tdfx_setmtrr(device_t dev) { /* @@ -426,13 +423,13 @@ tdfx_mmap(struct cdev *dev, vm_ooffset_t offset, vm_pa /**** OLD GET CONFIG ****/ /* struct tdfx_softc* tdfx_info; */ - + /* Get the configuration for our card XXX*/ /*tdfx_info = dev->si_drv1; */ /************************/ struct tdfx_softc* tdfx_info[2]; - + tdfx_info[0] = (struct tdfx_softc*)devclass_get_softc(tdfx_devclass, 0); /* If, for some reason, its not configured, we bail out */ @@ -449,7 +446,7 @@ tdfx_mmap(struct cdev *dev, vm_ooffset_t offset, vm_pa *paddr = rman_get_start(tdfx_info[0]->memrange) + offset; return 0; } - + if(tdfx_count > 1) { tdfx_info[1] = (struct tdfx_softc*)devclass_get_softc(tdfx_devclass, 1); if((offset & 0xff000000) == tdfx_info[1]->addr0) { @@ -552,7 +549,6 @@ tdfx_query_fetch(u_int cmd, struct tdfx_pio_data *piod return -EINVAL; } - /* Read the value and return */ switch(piod->size) { case 1: @@ -675,7 +671,7 @@ tdfx_do_pio_rd(struct tdfx_pio_data *piod) (piod->port != SC_DATA) || (piod->port != VGA_MISC_OUTPUT_READ)) && (piod->port < tdfx_info->pio0) && (piod->port > tdfx_info->pio0max)) return -EPERM; - + /* All VGA STATUS REGS are byte registers, size should never be > 1 */ if(piod->size != 1) { return -EINVAL; @@ -702,7 +698,7 @@ tdfx_do_pio_wt(struct tdfx_pio_data *piod) (piod->port != VGA_MISC_OUTPUT_READ)) /* Can't write VGA_ST_1C */ && (piod->port < tdfx_info->pio0) && (piod->port > tdfx_info->pio0max)) return -EPERM; - + /* All VGA STATUS REGS are byte registers, size should never be > 1 */ if(piod->size != 1) { return -EINVAL;