scsi: qla2xxx: Enable type checking for the SRB free and done callback functions
[linux-2.6-block.git] / drivers / scsi / qla2xxx / qla_mr.c
index 759fcfecc3100e465171c56ad2650aec215c3d18..e8da3ec4db2c187b092b6e6a6e4dcb85eb4e0994 100644 (file)
@@ -1797,10 +1797,8 @@ qla2x00_fxdisc_iocb_timeout(void *data)
        complete(&lio->u.fxiocb.fxiocb_comp);
 }
 
-static void
-qla2x00_fxdisc_sp_done(void *ptr, int res)
+static void qla2x00_fxdisc_sp_done(srb_t *sp, int res)
 {
-       srb_t *sp = ptr;
        struct srb_iocb *lio = &sp->u.iocb_cmd;
 
        complete(&lio->u.fxiocb.fxiocb_comp);
@@ -1939,8 +1937,10 @@ qlafx00_fx_disc(scsi_qla_host_t *vha, fc_port_t *fcport, uint16_t fx_type)
        if (fx_type == FXDISC_GET_CONFIG_INFO) {
                struct config_info_data *pinfo =
                    (struct config_info_data *) fdisc->u.fxiocb.rsp_addr;
-               strcpy(vha->hw->model_number, pinfo->model_num);
-               strcpy(vha->hw->model_desc, pinfo->model_description);
+               strlcpy(vha->hw->model_number, pinfo->model_num,
+                       ARRAY_SIZE(vha->hw->model_number));
+               strlcpy(vha->hw->model_desc, pinfo->model_description,
+                       ARRAY_SIZE(vha->hw->model_desc));
                memcpy(&vha->hw->mr.symbolic_name, pinfo->symbolic_name,
                    sizeof(vha->hw->mr.symbolic_name));
                memcpy(&vha->hw->mr.serial_num, pinfo->serial_num,