From owner-svn-src-all@freebsd.org Tue Sep 1 21:31:53 2020 Return-Path: Delivered-To: svn-src-all@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 5157837A4AF; Tue, 1 Sep 2020 21:31:53 +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 4Bh0dN5nfLz4MJq; Tue, 1 Sep 2020 21:31:52 +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 630401FEA9; Tue, 1 Sep 2020 21:31:51 +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 081LVp6l029906; Tue, 1 Sep 2020 21:31:51 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 081LVodt029898; Tue, 1 Sep 2020 21:31:50 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202009012131.081LVodt029898@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:31:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365093 - head/sys/dev/twe X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/dev/twe X-SVN-Commit-Revision: 365093 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2020 21:31:53 -0000 Author: mjg Date: Tue Sep 1 21:31:50 2020 New Revision: 365093 URL: https://svnweb.freebsd.org/changeset/base/365093 Log: twe: clean up empty lines in .c and .h files Modified: head/sys/dev/twe/twe.c head/sys/dev/twe/twe_freebsd.c head/sys/dev/twe/tweio.h head/sys/dev/twe/twereg.h head/sys/dev/twe/twevar.h Modified: head/sys/dev/twe/twe.c ============================================================================== --- head/sys/dev/twe/twe.c Tue Sep 1 21:31:38 2020 (r365092) +++ head/sys/dev/twe/twe.c Tue Sep 1 21:31:50 2020 (r365093) @@ -184,10 +184,9 @@ twe_setup(struct twe_softc *sc) * check for errors, drain the response queue. */ for (i = 0; i < TWE_MAX_RESET_TRIES; i++) { - if (i > 0) twe_printf(sc, "reset %d failed, trying again\n", i); - + if (!twe_soft_reset(sc)) break; /* reset process complete */ } @@ -413,7 +412,6 @@ twe_startio(struct twe_softc *sc) /* spin until something prevents us from doing any work */ for (;;) { - /* try to get a command that's already ready to go */ tr = twe_dequeue_ready(sc); @@ -447,18 +445,18 @@ twe_startio(struct twe_softc *sc) biofinish(bp, NULL, EOPNOTSUPP); break; } - + /* build a suitable I/O command (assumes 512-byte rounded transfers) */ cmd->io.size = 3; cmd->io.unit = *(int *)(bp->bio_driver1); cmd->io.block_count = (tr->tr_length + TWE_BLOCK_SIZE - 1) / TWE_BLOCK_SIZE; cmd->io.lba = bp->bio_pblkno; } - + /* did we find something to do? */ if (tr == NULL) break; - + /* try to map and submit the command to controller */ error = twe_map_request(tr); @@ -578,7 +576,7 @@ twe_ioctl(struct twe_softc *sc, u_long ioctlcmd, void /* copy the command out again */ bcopy(cmd, &tu->tu_command, sizeof(TWE_Command)); - + /* if there was a data buffer, copy it out */ if (tr->tr_length > 0) error = copyout(tr->tr_data, tu->tu_data, tu->tu_size); @@ -1024,7 +1022,6 @@ twe_completeio(struct twe_request *tr) debug_called(4); if (tr->tr_status == TWE_CMD_COMPLETE) { - if (cmd->generic.status) if (twe_report_request(tr)) { bp->bio_error = EIO; @@ -1065,10 +1062,9 @@ twe_reset(struct twe_softc *sc) * Try to soft-reset the controller. */ for (i = 0; i < TWE_MAX_RESET_TRIES; i++) { - if (i > 0) twe_printf(sc, "reset %d failed, trying again\n", i); - + if (!twe_soft_reset(sc)) break; /* reset process complete */ } @@ -1132,7 +1128,6 @@ twe_start(struct twe_request *tr) * and let the command be rescheduled. */ for (i = 100000; (i > 0); i--) { - /* check to see if we can post a command */ status_reg = TWE_STATUS(sc); twe_check_bits(sc, status_reg); @@ -1541,7 +1536,6 @@ twe_find_aen(struct twe_softc *sc, u_int16_t aen) return(missing); } - #if 0 /* currently unused */ /******************************************************************************** * Sleep waiting for at least (timeout) seconds until we see (aen) as @@ -1809,7 +1803,6 @@ twe_format_aen(struct twe_softc *sc, u_int16_t aen) TWE_AEN_UNIT(aen), msg); return(sc->twe_aen_buf); - case 'x': default: break; Modified: head/sys/dev/twe/twe_freebsd.c ============================================================================== --- head/sys/dev/twe/twe_freebsd.c Tue Sep 1 21:31:38 2020 (r365092) +++ head/sys/dev/twe/twe_freebsd.c Tue Sep 1 21:31:50 2020 (r365093) @@ -709,7 +709,7 @@ twed_open(struct disk *dp) struct twed_softc *sc = (struct twed_softc *)dp->d_drv1; debug_called(4); - + if (sc == NULL) return (ENXIO); @@ -1065,7 +1065,6 @@ twe_map_request(struct twe_request *tr) * If the command involves data, map that too. */ if (tr->tr_data != NULL && ((tr->tr_flags & TWE_CMD_MAPPED) == 0)) { - /* * Data must be 64-byte aligned; allocate a fixup buffer if it's not. */ @@ -1079,7 +1078,7 @@ twe_map_request(struct twe_request *tr) return(ENOMEM); } } - + /* * Map the data buffer into bus space and build the s/g list. */ Modified: head/sys/dev/twe/tweio.h ============================================================================== --- head/sys/dev/twe/tweio.h Tue Sep 1 21:31:38 2020 (r365092) +++ head/sys/dev/twe/tweio.h Tue Sep 1 21:31:50 2020 (r365093) @@ -31,7 +31,6 @@ * $FreeBSD$ */ - /* * User-space command * Modified: head/sys/dev/twe/twereg.h ============================================================================== --- head/sys/dev/twe/twereg.h Tue Sep 1 21:31:38 2020 (r365092) +++ head/sys/dev/twe/twereg.h Tue Sep 1 21:31:50 2020 (r365093) @@ -494,4 +494,3 @@ typedef struct u_int8_t parameter_size_bytes; u_int8_t data[0]; } __packed TWE_Param; - Modified: head/sys/dev/twe/twevar.h ============================================================================== --- head/sys/dev/twe/twevar.h Tue Sep 1 21:31:38 2020 (r365092) +++ head/sys/dev/twe/twevar.h Tue Sep 1 21:31:50 2020 (r365093) @@ -108,7 +108,7 @@ struct twe_request ((tr)->tr_tag * sizeof(TWE_Command))) #define TWE_FIND_COMMANDPHYS(tr) ((tr)->tr_sc->twe_cmdphys + \ ((tr)->tr_tag * sizeof(TWE_Command))) - + /* * Per-controller state. */ @@ -201,7 +201,6 @@ extern void twe_unmap_request(struct twe_request *tr); sc->twe_qstat[qname].q_max = 0; \ sc->twe_qstat[qname].q_min = 0xFFFFFFFF; \ } while(0) - #define TWEQ_REQUEST_QUEUE(name, index) \ static __inline void \