From: Sascha Wildner Date: Thu, 21 Feb 2013 19:14:23 +0000 (+0100) Subject: asr(4): Remove a case that is not a member of the enum being tested. X-Git-Tag: v3.4.0rc~249 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/3fd202cb50f05840c73d61ad64406538f3f734a7 asr(4): Remove a case that is not a member of the enum being tested. Apparently xpt_opcode can wind up being REPORT_LUNS here. gcc47 warns about it because REPORT_LUNS is not an enum xpt_opcode member. FreeBSD just casted this away. Instead of doing that, remove it and let the default case handle it (which has the same code as XPT_ABORT). While here, fix a typo in a comment. --- diff --git a/sys/dev/raid/asr/asr.c b/sys/dev/raid/asr/asr.c index 739857ebc6..cb07afc242 100644 --- a/sys/dev/raid/asr/asr.c +++ b/sys/dev/raid/asr/asr.c @@ -2750,15 +2750,12 @@ asr_action(struct cam_sim *sim, union ccb *ccb) } case XPT_RESET_DEV: /* Bus Device Reset the specified SCSI device */ - /* Rese HBA device ... */ + /* Reset HBA device ... */ asr_hbareset (sc); ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; -#if (defined(REPORT_LUNS)) - case REPORT_LUNS: -#endif case XPT_ABORT: /* Abort the specified CCB */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID;