From 07c6eac9d71e2005be09f6dab00f26224288d0f2 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 31 May 2003 20:46:21 +0000 Subject: [PATCH] Add /* FALLTHROUGH */ Move /* FALLTHROUGH */ to correct location. Remove unused variable(s). Found by: FlexeLint --- sys/cam/cam.c | 1 + sys/cam/cam_xpt.c | 13 +++++-------- sys/cam/scsi/scsi_pt.c | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/sys/cam/cam.c b/sys/cam/cam.c index d575fd6751d7..e9e2e546dd0c 100644 --- a/sys/cam/cam.c +++ b/sys/cam/cam.c @@ -236,6 +236,7 @@ cam_error_string(struct cam_device *device, union ccb *ccb, char *str, /* FALLTHROUGH */ case CAM_EPF_MINIMAL: proto_flags |= CAM_ESF_PRINT_STATUS; + /* FALLTHROUGH */ default: break; } diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index a272a3e819af..fa6c63afbaa7 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -2995,8 +2995,8 @@ xpt_action(union ccb *start_ccb) &path->device->inq_data), scsi_cdb_string(start_ccb->csio.cdb_io.cdb_bytes, cdb_str, sizeof(cdb_str)))); - /* FALLTHROUGH */ } + /* FALLTHROUGH */ case XPT_TARGET_IO: case XPT_CONT_TARGET_IO: start_ccb->csio.sense_resid = 0; @@ -3111,8 +3111,8 @@ xpt_action(union ccb *start_ccb) * If we weren't able to take care of the abort request * in the XPT, pass the request down to the SIM for processing. */ - /* FALLTHROUGH */ } + /* FALLTHROUGH */ case XPT_ACCEPT_TARGET_IO: case XPT_EN_LUN: case XPT_IMMED_NOTIFY: @@ -3271,7 +3271,6 @@ xpt_action(union ccb *start_ccb) int s; dev_pos_type position_type; struct ccb_dev_match *cdm; - int ret; cdm = &start_ccb->cdm; @@ -3316,10 +3315,10 @@ xpt_action(union ccb *start_ccb) switch(position_type & CAM_DEV_POS_TYPEMASK) { case CAM_DEV_POS_EDT: - ret = xptedtmatch(cdm); + xptedtmatch(cdm); break; case CAM_DEV_POS_PDRV: - ret = xptperiphlistmatch(cdm); + xptperiphlistmatch(cdm); break; default: cdm->status = CAM_DEV_MATCH_ERROR; @@ -5639,8 +5638,8 @@ probestart(struct cam_periph *periph, union ccb *start_ccb) xpt_print_path(periph->path); printf("Unable to mode sense control page - malloc failure\n"); softc->action = PROBE_SERIAL_NUM; - /* FALLTHROUGH */ } + /* FALLTHROUGH */ case PROBE_SERIAL_NUM: { struct scsi_vpd_unit_serial_number *serial_buf; @@ -6913,7 +6912,6 @@ camisr(void *V_queue) if (ccb_h->flags & CAM_HIGH_POWER) { struct highpowerlist *hphead; - struct cam_ed *device; union ccb *send_ccb; hphead = &highpowerq; @@ -6929,7 +6927,6 @@ camisr(void *V_queue) * Any high powered commands queued up? */ if (send_ccb != NULL) { - device = send_ccb->ccb_h.path->device; STAILQ_REMOVE_HEAD(hphead, xpt_links.stqe); diff --git a/sys/cam/scsi/scsi_pt.c b/sys/cam/scsi/scsi_pt.c index 63bb15a57a8d..070357305416 100644 --- a/sys/cam/scsi/scsi_pt.c +++ b/sys/cam/scsi/scsi_pt.c @@ -458,8 +458,8 @@ ptasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg) LIST_FOREACH(ccbh, &softc->pending_ccbs, periph_links.le) ccbh->ccb_state |= PT_CCB_RETRY_UA; splx(s); - /* FALLTHROUGH */ } + /* FALLTHROUGH */ default: cam_periph_async(periph, code, path, arg); break;