diff --git a/iscsi-scst/kernel/conn.c b/iscsi-scst/kernel/conn.c index 0b5462856..81fd98d5d 100644 --- a/iscsi-scst/kernel/conn.c +++ b/iscsi-scst/kernel/conn.c @@ -209,9 +209,9 @@ static ssize_t iscsi_get_target_ip(struct iscsi_conn *conn, NIP6(inet6_sk(sk)->saddr)); #else #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) - pos = scnprintf(buf, size, "[%p6]", &inet6_sk(sk)->saddr); + pos = scnprintf(buf, size, "[%pI6]", &inet6_sk(sk)->saddr); #else - pos = scnprintf(buf, size, "[%p6]", &sk->sk_v6_rcv_saddr); + pos = scnprintf(buf, size, "[%pI6]", &sk->sk_v6_rcv_saddr); #endif #endif break; @@ -1127,7 +1127,7 @@ void iscsi_extracheck_is_rd_thread(struct iscsi_conn *conn) pr_emerg("rd_state %x\n", conn->rd_state); pr_emerg("rd_task %p\n", conn->rd_task); if (conn->rd_task) - pr_emerg("rd_task->pid %d\n", conn->rd_task->pid); + pr_emerg("rd_task->pid %d\n", conn->rd_task->pid); BUG(); } } diff --git a/scst/include/backport.h b/scst/include/backport.h index d06230ee4..ef697ee1a 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -682,11 +682,19 @@ struct t10_pi_tuple { /* */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) /* * See also commit 686fef928bba ("timer: Prepare to change timer callback - * argument type"). + * argument type"). See also commit 0eeda71bc30d ("timer: Replace timer base + * by a cpu index"). */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) +#define timer_setup(_timer, _fn, _flags) do { \ + init_timer(_timer); \ + (_timer)->function = (void (*)(unsigned long))(_fn); \ + (_timer)->data = (unsigned long)(_timer); \ + WARN_ON_ONCE((_flags) != 0); \ +} while (0) +#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) #define timer_setup(_timer, _fn, _flags) do { \ init_timer(_timer); \ (_timer)->function = (void (*)(unsigned long))(_fn); \ diff --git a/scst/include/scst_debug.h b/scst/include/scst_debug.h index 0caae1872..de8f50d7e 100644 --- a/scst/include/scst_debug.h +++ b/scst/include/scst_debug.h @@ -339,28 +339,30 @@ do { \ #define TRACE_EXIT_RES(res) \ do { \ + unsigned long lres = res; \ + \ if (trace_flag & TRACE_ENTRYEXIT) { \ if (trace_flag & TRACE_PID) { \ PRINT(KERN_INFO, "[%d]: EXIT %s: %ld", current->pid, \ - __func__, (long)(res)); \ - } \ - else { \ + __func__, lres); \ + } else { \ PRINT(KERN_INFO, "EXIT %s: %ld", \ - __func__, (long)(res)); \ + __func__, lres); \ } \ } \ } while (0) #define TRACE_EXIT_HRES(res) \ do { \ + unsigned long lres = (unsigned long)res; \ + \ if (trace_flag & TRACE_ENTRYEXIT) { \ if (trace_flag & TRACE_PID) { \ PRINT(KERN_INFO, "[%d]: EXIT %s: 0x%lx", current->pid, \ - __func__, (long)(res)); \ - } \ - else { \ + __func__, lres); \ + } else { \ PRINT(KERN_INFO, "EXIT %s: %lx", \ - __func__, (long)(res)); \ + __func__, lres); \ } \ } \ } while (0) diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 4ddee69b3..ab633b8ef 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -1346,7 +1346,7 @@ set_res: if (cmd->data_direction & SCST_DATA_READ) cmd->resp_data_len = cmd->bufflen; else - cmd->resp_data_len = 0; + cmd->resp_data_len = 0; } #ifndef CONFIG_SCST_TEST_IO_IN_SIRQ