Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb The "bad status" case is impossible -- the switc...



details:   https://anonhg.NetBSD.org/src/rev/14ccf0eb4985
branches:  trunk
changeset: 554497:14ccf0eb4985
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Tue Oct 28 23:37:59 2003 +0000

description:
The "bad status" case is impossible -- the switch value is constrained to 2
bits -- so just add the default case to the one that returns
STATUS_WIRE_FAILED.

diffstat:

 sys/dev/usb/umass.c |  10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diffs (33 lines):

diff -r 3d5ecc4d1d2b -r 14ccf0eb4985 sys/dev/usb/umass.c
--- a/sys/dev/usb/umass.c       Tue Oct 28 23:33:46 2003 +0000
+++ b/sys/dev/usb/umass.c       Tue Oct 28 23:37:59 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: umass.c,v 1.106 2003/10/25 18:28:31 christos Exp $     */
+/*     $NetBSD: umass.c,v 1.107 2003/10/28 23:37:59 mycroft Exp $      */
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -131,7 +131,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.106 2003/10/25 18:28:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.107 2003/10/28 23:37:59 mycroft Exp $");
 
 #include "atapibus.h"
 #include "scsibus.h"
@@ -1641,13 +1641,9 @@
                                        status = STATUS_CMD_FAILED;
                                        break;
                                case IDB_VALUE_PHASE:
+                               default: /* XXX: gcc */
                                        status = STATUS_WIRE_FAILED;
                                        break;
-                               default:
-                                       printf("%s: bad status\n",
-                                           USBDEVNAME(sc->sc_dev));
-                                       status = -1;
-                                       break;
                                }
 
                                sc->transfer_state = TSTATE_IDLE;



Home | Main Index | Thread Index | Old Index