Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/newsmips/dev David Binderman in PR port-newsmips/51...



details:   https://anonhg.NetBSD.org/src/rev/8290c9538342
branches:  trunk
changeset: 344402:8290c9538342
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Mar 26 17:14:38 2016 +0000

description:
David Binderman in PR port-newsmips/51014:
Move initialization of remain_cnt up to the declaration.
XXX the #ifdef here does not make much sense to me, but I know nothing
about the hardware. I'd guess it could be removed or inverted and #error'd
instead.

diffstat:

 sys/arch/newsmips/dev/scsi_1185.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r e79fcc8f69e9 -r 8290c9538342 sys/arch/newsmips/dev/scsi_1185.c
--- a/sys/arch/newsmips/dev/scsi_1185.c Sat Mar 26 17:04:03 2016 +0000
+++ b/sys/arch/newsmips/dev/scsi_1185.c Sat Mar 26 17:14:38 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsi_1185.c,v 1.21 2014/03/24 20:05:20 christos Exp $  */
+/*     $NetBSD: scsi_1185.c,v 1.22 2016/03/26 17:14:38 martin Exp $    */
 
 /*
  * Copyright (c) 1992, 1993
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsi_1185.c,v 1.21 2014/03/24 20:05:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsi_1185.c,v 1.22 2016/03/26 17:14:38 martin Exp $");
 
 #define        __INTR_PRIVATE
 #include <sys/param.h>
@@ -1720,12 +1720,11 @@
 adjust_transfer(struct sc_softc *sc, struct sc_chan_stat *cs)
 {
        struct sc_scb *scb = cs->scb;
-       u_int remain_cnt;
+       u_int remain_cnt = 0;
        u_int offset, sent_byte;
 
        if (sc->pad_start) {
                sc->pad_start = 0;
-               remain_cnt = 0;
        } else {
 # if defined(__mips__) && defined(CPU_SINGLE)
                remain_cnt = GET_CNT();



Home | Main Index | Thread Index | Old Index