1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-11 09:50:12 +00:00

Fix "set but not used" warnings in CAM.

This commit is contained in:
Scott Long 2021-11-25 03:17:54 +00:00
parent 6ef1ad0dcf
commit c154feacc4
5 changed files with 2 additions and 16 deletions

View File

@ -144,7 +144,7 @@ void
cam_sim_free(struct cam_sim *sim, int free_devq)
{
struct mtx *mtx;
int error;
int error __diagused;
if (sim->mtx == NULL) {
mtx = &cam_sim_free_mtx;

View File

@ -5921,7 +5921,7 @@ static void
dareprobe(struct cam_periph *periph)
{
struct da_softc *softc;
int status;
int status __diagused;
softc = (struct da_softc *)periph->softc;

View File

@ -560,11 +560,6 @@ ptdone(struct cam_periph *periph, union ccb *done_ccb)
static int
pterror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags)
{
struct pt_softc *softc;
struct cam_periph *periph;
periph = xpt_path_periph(ccb->ccb_h.path);
softc = (struct pt_softc *)periph->softc;
return(cam_periph_error(ccb, cam_flags, sense_flags));
}

View File

@ -405,7 +405,6 @@ sgdone(struct cam_periph *periph, union ccb *done_ccb)
case SG_CCB_RDWR_IO:
{
struct sg_rdwr *rdwr;
int state;
devstat_end_transaction(softc->device_stats,
csio->dxfer_len,
@ -417,7 +416,6 @@ sgdone(struct cam_periph *periph, union ccb *done_ccb)
NULL, NULL);
rdwr = done_ccb->ccb_h.ccb_rdwr;
state = rdwr->state;
rdwr->state = SG_RDWR_DONE;
wakeup(rdwr);
break;
@ -932,11 +930,6 @@ sgsendrdwr(struct cam_periph *periph, union ccb *ccb)
static int
sgerror(union ccb *ccb, uint32_t cam_flags, uint32_t sense_flags)
{
struct cam_periph *periph;
struct sg_softc *softc;
periph = xpt_path_periph(ccb->ccb_h.path);
softc = (struct sg_softc *)periph->softc;
return (cam_periph_error(ccb, cam_flags, sense_flags));
}

View File

@ -761,13 +761,11 @@ static void
targdone(struct cam_periph *periph, union ccb *done_ccb)
{
struct targ_softc *softc;
cam_status status;
CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, ("targdone %p\n", done_ccb));
softc = (struct targ_softc *)periph->softc;
TAILQ_REMOVE(&softc->pending_ccb_queue, &done_ccb->ccb_h,
periph_links.tqe);
status = done_ccb->ccb_h.status & CAM_STATUS_MASK;
/* If we're no longer enabled, throw away CCB */
if ((softc->state & TARG_STATE_LUN_ENABLED) == 0) {