diff --git a/iscsi-scst/kernel/session.c b/iscsi-scst/kernel/session.c index e9146952b..39fba5f0d 100644 --- a/iscsi-scst/kernel/session.c +++ b/iscsi-scst/kernel/session.c @@ -167,7 +167,7 @@ int session_add(struct iscsi_target *target, goto out; } - sid = (union iscsi_sid)info->sid; + sid = *(union iscsi_sid *)&info->sid; sid.id.tsih = 0; old_sess = NULL; @@ -177,7 +177,7 @@ int session_add(struct iscsi_target *target, */ list_for_each_entry_reverse(session, &target->session_list, session_list_entry) { - union iscsi_sid i = (union iscsi_sid)session->sid; + union iscsi_sid i = *(union iscsi_sid *)&session->sid; i.id.tsih = 0; if ((sid.id64 == i.id64) && (strcmp(info->initiator_name, session->initiator_name) == 0)) { diff --git a/scst/src/dev_handlers/scst_disk.c b/scst/src/dev_handlers/scst_disk.c index b12b88805..2257bf673 100644 --- a/scst/src/dev_handlers/scst_disk.c +++ b/scst/src/dev_handlers/scst_disk.c @@ -193,7 +193,7 @@ static int disk_attach(struct scst_device *dev) sizeof(sense_buffer), SCST_SENSE_ALL_VALID, SCST_LOAD_SENSE(scst_sense_medium_changed_UA)) || !scst_analyze_sense(sense_buffer, sizeof(sense_buffer), - SCST_SENSE_KEY_VALID | SCST_SENSE_ASC_VALID, + SCST_SENSE_KEY_VALID | SCST_SENSE_ASC_VALID, UNIT_ATTENTION, 0x29, 0)) break; if (!--retries) { diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index c125bd75c..6f299b7f8 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -37,6 +37,8 @@ static void scst_free_tgt_dev(struct scst_tgt_dev *tgt_dev); static void scst_check_internal_sense(struct scst_device *dev, int result, uint8_t *sense, int sense_len); +static void scst_queue_report_luns_changed_UA(struct scst_session *sess, + int flags); static void __scst_check_set_UA(struct scst_tgt_dev *tgt_dev, const uint8_t *sense, int sense_len, int flags); static void scst_alloc_set_UA(struct scst_tgt_dev *tgt_dev, @@ -434,7 +436,8 @@ static inline bool scst_is_report_luns_changed_type(int type) } /* scst_mutex supposed to be held */ -void scst_queue_report_luns_changed_UA(struct scst_session *sess, int flags) +static void scst_queue_report_luns_changed_UA(struct scst_session *sess, + int flags) { uint8_t sense_buffer[SCST_STANDARD_SENSE_LEN]; struct list_head *shead; @@ -4088,7 +4091,7 @@ static int tm_dbg_passed_cmds_count; static int tm_dbg_state; static int tm_dbg_on_state_passes; static DEFINE_TIMER(tm_dbg_timer, tm_dbg_timer_fn, 0, 0); -struct scst_tgt_dev *tm_dbg_tgt_dev; +static struct scst_tgt_dev *tm_dbg_tgt_dev; static const int tm_dbg_on_state_num_passes[] = { 5, 1, 0x7ffffff };