target-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] use setup_timer() helper function.
@ 2017-09-22 10:20 Allen Pais
  2017-09-22 10:20 ` [PATCH 1/5] iscsi-target: use setup_timer() helper Allen Pais
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Allen Pais @ 2017-09-22 10:20 UTC (permalink / raw)
  To: linux-scsi; +Cc: nab, target-devel, Allen Pais

This series uses setup_timer() helper function. The series
addresses the files under drivers/target/iscsi/*.

Allen Pais (5):
  iscsi-target: use setup_timer() helper.
  iscsi-target: use setup_timer() helper.
  iscsi-target: use setup_timer() helper.
  iscsi-target: use setup_timer() helper.
  iscsi-target: use setup_timer() helper.

 drivers/target/iscsi/iscsi_target_erl0.c  | 5 ++---
 drivers/target/iscsi/iscsi_target_erl1.c  | 5 ++---
 drivers/target/iscsi/iscsi_target_login.c | 5 ++---
 drivers/target/iscsi/iscsi_target_nego.c  | 5 ++---
 drivers/target/iscsi/iscsi_target_util.c  | 5 ++---
 5 files changed, 10 insertions(+), 15 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/5] iscsi-target: use setup_timer() helper.
  2017-09-22 10:20 [PATCH 0/5] use setup_timer() helper function Allen Pais
@ 2017-09-22 10:20 ` Allen Pais
  2017-09-22 10:20 ` [PATCH 2/5] " Allen Pais
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Allen Pais @ 2017-09-22 10:20 UTC (permalink / raw)
  To: linux-scsi; +Cc: nab, target-devel, Allen Pais

   Use setup_timer function instead of initializing timer with the
   function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/target/iscsi/iscsi_target_nego.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/target/iscsi/iscsi_target_nego.c b/drivers/target/iscsi/iscsi_target_nego.c
index 7a6751f..5b22f01 100644
--- a/drivers/target/iscsi/iscsi_target_nego.c
+++ b/drivers/target/iscsi/iscsi_target_nego.c
@@ -618,10 +618,9 @@ static void iscsi_target_do_login_rx(struct work_struct *work)
 	conn->login_kworker = current;
 	allow_signal(SIGINT);
 
-	init_timer(&login_timer);
+	setup_timer(&login_timer, iscsi_target_login_timeout,
+		    (unsigned long)conn);
 	login_timer.expires = (get_jiffies_64() + TA_LOGIN_TIMEOUT * HZ);
-	login_timer.data = (unsigned long)conn;
-	login_timer.function = iscsi_target_login_timeout;
 	add_timer(&login_timer);
 	pr_debug("Starting login_timer for %s/%d\n", current->comm, current->pid);
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/5] iscsi-target: use setup_timer() helper.
  2017-09-22 10:20 [PATCH 0/5] use setup_timer() helper function Allen Pais
  2017-09-22 10:20 ` [PATCH 1/5] iscsi-target: use setup_timer() helper Allen Pais
@ 2017-09-22 10:20 ` Allen Pais
  2017-09-22 10:20 ` [PATCH 3/5] " Allen Pais
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Allen Pais @ 2017-09-22 10:20 UTC (permalink / raw)
  To: linux-scsi; +Cc: nab, target-devel, Allen Pais

   Use setup_timer function instead of initializing timer with the
   function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/target/iscsi/iscsi_target_login.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c
index dc13afb..e608fd5 100644
--- a/drivers/target/iscsi/iscsi_target_login.c
+++ b/drivers/target/iscsi/iscsi_target_login.c
@@ -866,10 +866,9 @@ static void iscsi_start_login_thread_timer(struct iscsi_np *np)
 	 * point we do not have access to ISCSI_TPG_ATTRIB(tpg)->login_timeout
 	 */
 	spin_lock_bh(&np->np_thread_lock);
-	init_timer(&np->np_login_timer);
+	setup_timer(&np->np_login_timer, iscsi_handle_login_thread_timeout,
+		    (unsigned long)np);
 	np->np_login_timer.expires = (get_jiffies_64() + TA_LOGIN_TIMEOUT * HZ);
-	np->np_login_timer.data = (unsigned long)np;
-	np->np_login_timer.function = iscsi_handle_login_thread_timeout;
 	np->np_login_timer_flags &= ~ISCSI_TF_STOP;
 	np->np_login_timer_flags |= ISCSI_TF_RUNNING;
 	add_timer(&np->np_login_timer);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/5] iscsi-target: use setup_timer() helper.
  2017-09-22 10:20 [PATCH 0/5] use setup_timer() helper function Allen Pais
  2017-09-22 10:20 ` [PATCH 1/5] iscsi-target: use setup_timer() helper Allen Pais
  2017-09-22 10:20 ` [PATCH 2/5] " Allen Pais
@ 2017-09-22 10:20 ` Allen Pais
  2017-09-22 10:20 ` [PATCH 4/5] " Allen Pais
  2017-09-22 10:20 ` [PATCH 5/5] " Allen Pais
  4 siblings, 0 replies; 6+ messages in thread
From: Allen Pais @ 2017-09-22 10:20 UTC (permalink / raw)
  To: linux-scsi; +Cc: nab, target-devel, Allen Pais

   Use setup_timer function instead of initializing timer with the
   function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/target/iscsi/iscsi_target_erl0.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/target/iscsi/iscsi_target_erl0.c b/drivers/target/iscsi/iscsi_target_erl0.c
index 7fe2aa7..3131d7b 100644
--- a/drivers/target/iscsi/iscsi_target_erl0.c
+++ b/drivers/target/iscsi/iscsi_target_erl0.c
@@ -809,11 +809,10 @@ void iscsit_start_time2retain_handler(struct iscsi_session *sess)
 	pr_debug("Starting Time2Retain timer for %u seconds on"
 		" SID: %u\n", sess->sess_ops->DefaultTime2Retain, sess->sid);
 
-	init_timer(&sess->time2retain_timer);
+	setup_timer(&sess->time2retain_timer,
+		    iscsit_handle_time2retain_timeout, (unsigned long)sess);
 	sess->time2retain_timer.expires  		(get_jiffies_64() + sess->sess_ops->DefaultTime2Retain * HZ);
-	sess->time2retain_timer.data = (unsigned long)sess;
-	sess->time2retain_timer.function = iscsit_handle_time2retain_timeout;
 	sess->time2retain_timer_flags &= ~ISCSI_TF_STOP;
 	sess->time2retain_timer_flags |= ISCSI_TF_RUNNING;
 	add_timer(&sess->time2retain_timer);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/5] iscsi-target: use setup_timer() helper.
  2017-09-22 10:20 [PATCH 0/5] use setup_timer() helper function Allen Pais
                   ` (2 preceding siblings ...)
  2017-09-22 10:20 ` [PATCH 3/5] " Allen Pais
@ 2017-09-22 10:20 ` Allen Pais
  2017-09-22 10:20 ` [PATCH 5/5] " Allen Pais
  4 siblings, 0 replies; 6+ messages in thread
From: Allen Pais @ 2017-09-22 10:20 UTC (permalink / raw)
  To: linux-scsi; +Cc: nab, target-devel, Allen Pais

   Use setup_timer function instead of initializing timer with the
   function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/target/iscsi/iscsi_target_erl1.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c
index fe9b7f1..858d9c6 100644
--- a/drivers/target/iscsi/iscsi_target_erl1.c
+++ b/drivers/target/iscsi/iscsi_target_erl1.c
@@ -1264,10 +1264,9 @@ void iscsit_start_dataout_timer(
 	pr_debug("Starting DataOUT timer for ITT: 0x%08x on"
 		" CID: %hu.\n", cmd->init_task_tag, conn->cid);
 
-	init_timer(&cmd->dataout_timer);
+	setup_timer(&cmd->dataout_timer, iscsit_handle_dataout_timeout,
+		    (unsigned long)cmd);
 	cmd->dataout_timer.expires = (get_jiffies_64() + na->dataout_timeout * HZ);
-	cmd->dataout_timer.data = (unsigned long)cmd;
-	cmd->dataout_timer.function = iscsit_handle_dataout_timeout;
 	cmd->dataout_timer_flags &= ~ISCSI_TF_STOP;
 	cmd->dataout_timer_flags |= ISCSI_TF_RUNNING;
 	add_timer(&cmd->dataout_timer);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 5/5] iscsi-target: use setup_timer() helper.
  2017-09-22 10:20 [PATCH 0/5] use setup_timer() helper function Allen Pais
                   ` (3 preceding siblings ...)
  2017-09-22 10:20 ` [PATCH 4/5] " Allen Pais
@ 2017-09-22 10:20 ` Allen Pais
  4 siblings, 0 replies; 6+ messages in thread
From: Allen Pais @ 2017-09-22 10:20 UTC (permalink / raw)
  To: linux-scsi; +Cc: nab, target-devel, Allen Pais

   Use setup_timer function instead of initializing timer with the
   function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/target/iscsi/iscsi_target_util.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c
index 1e36f83..97697a9 100644
--- a/drivers/target/iscsi/iscsi_target_util.c
+++ b/drivers/target/iscsi/iscsi_target_util.c
@@ -949,11 +949,10 @@ void iscsit_start_nopin_response_timer(struct iscsi_conn *conn)
 		return;
 	}
 
-	init_timer(&conn->nopin_response_timer);
+	setup_timer(&conn->nopin_response_timer,
+		    iscsit_handle_nopin_response_timeout, (unsigned long)conn);
 	conn->nopin_response_timer.expires  		(get_jiffies_64() + na->nopin_response_timeout * HZ);
-	conn->nopin_response_timer.data = (unsigned long)conn;
-	conn->nopin_response_timer.function = iscsit_handle_nopin_response_timeout;
 	conn->nopin_response_timer_flags &= ~ISCSI_TF_STOP;
 	conn->nopin_response_timer_flags |= ISCSI_TF_RUNNING;
 	add_timer(&conn->nopin_response_timer);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-22 10:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-22 10:20 [PATCH 0/5] use setup_timer() helper function Allen Pais
2017-09-22 10:20 ` [PATCH 1/5] iscsi-target: use setup_timer() helper Allen Pais
2017-09-22 10:20 ` [PATCH 2/5] " Allen Pais
2017-09-22 10:20 ` [PATCH 3/5] " Allen Pais
2017-09-22 10:20 ` [PATCH 4/5] " Allen Pais
2017-09-22 10:20 ` [PATCH 5/5] " Allen Pais

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).