Fix "set but not used" warnings in CAM.
This commit is contained in:
parent
6ef1ad0dcf
commit
c154feacc4
@ -144,7 +144,7 @@ void
|
|||||||
cam_sim_free(struct cam_sim *sim, int free_devq)
|
cam_sim_free(struct cam_sim *sim, int free_devq)
|
||||||
{
|
{
|
||||||
struct mtx *mtx;
|
struct mtx *mtx;
|
||||||
int error;
|
int error __diagused;
|
||||||
|
|
||||||
if (sim->mtx == NULL) {
|
if (sim->mtx == NULL) {
|
||||||
mtx = &cam_sim_free_mtx;
|
mtx = &cam_sim_free_mtx;
|
||||||
|
@ -5921,7 +5921,7 @@ static void
|
|||||||
dareprobe(struct cam_periph *periph)
|
dareprobe(struct cam_periph *periph)
|
||||||
{
|
{
|
||||||
struct da_softc *softc;
|
struct da_softc *softc;
|
||||||
int status;
|
int status __diagused;
|
||||||
|
|
||||||
softc = (struct da_softc *)periph->softc;
|
softc = (struct da_softc *)periph->softc;
|
||||||
|
|
||||||
|
@ -560,11 +560,6 @@ ptdone(struct cam_periph *periph, union ccb *done_ccb)
|
|||||||
static int
|
static int
|
||||||
pterror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags)
|
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));
|
return(cam_periph_error(ccb, cam_flags, sense_flags));
|
||||||
}
|
}
|
||||||
|
@ -405,7 +405,6 @@ sgdone(struct cam_periph *periph, union ccb *done_ccb)
|
|||||||
case SG_CCB_RDWR_IO:
|
case SG_CCB_RDWR_IO:
|
||||||
{
|
{
|
||||||
struct sg_rdwr *rdwr;
|
struct sg_rdwr *rdwr;
|
||||||
int state;
|
|
||||||
|
|
||||||
devstat_end_transaction(softc->device_stats,
|
devstat_end_transaction(softc->device_stats,
|
||||||
csio->dxfer_len,
|
csio->dxfer_len,
|
||||||
@ -417,7 +416,6 @@ sgdone(struct cam_periph *periph, union ccb *done_ccb)
|
|||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
rdwr = done_ccb->ccb_h.ccb_rdwr;
|
rdwr = done_ccb->ccb_h.ccb_rdwr;
|
||||||
state = rdwr->state;
|
|
||||||
rdwr->state = SG_RDWR_DONE;
|
rdwr->state = SG_RDWR_DONE;
|
||||||
wakeup(rdwr);
|
wakeup(rdwr);
|
||||||
break;
|
break;
|
||||||
@ -932,11 +930,6 @@ sgsendrdwr(struct cam_periph *periph, union ccb *ccb)
|
|||||||
static int
|
static int
|
||||||
sgerror(union ccb *ccb, uint32_t cam_flags, uint32_t sense_flags)
|
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));
|
return (cam_periph_error(ccb, cam_flags, sense_flags));
|
||||||
}
|
}
|
||||||
|
@ -761,13 +761,11 @@ static void
|
|||||||
targdone(struct cam_periph *periph, union ccb *done_ccb)
|
targdone(struct cam_periph *periph, union ccb *done_ccb)
|
||||||
{
|
{
|
||||||
struct targ_softc *softc;
|
struct targ_softc *softc;
|
||||||
cam_status status;
|
|
||||||
|
|
||||||
CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, ("targdone %p\n", done_ccb));
|
CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, ("targdone %p\n", done_ccb));
|
||||||
softc = (struct targ_softc *)periph->softc;
|
softc = (struct targ_softc *)periph->softc;
|
||||||
TAILQ_REMOVE(&softc->pending_ccb_queue, &done_ccb->ccb_h,
|
TAILQ_REMOVE(&softc->pending_ccb_queue, &done_ccb->ccb_h,
|
||||||
periph_links.tqe);
|
periph_links.tqe);
|
||||||
status = done_ccb->ccb_h.status & CAM_STATUS_MASK;
|
|
||||||
|
|
||||||
/* If we're no longer enabled, throw away CCB */
|
/* If we're no longer enabled, throw away CCB */
|
||||||
if ((softc->state & TARG_STATE_LUN_ENABLED) == 0) {
|
if ((softc->state & TARG_STATE_LUN_ENABLED) == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user