diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-12-25 06:30:41 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-12-25 11:21:22 -0500 |
commit | 8b0e195314fabd58a331c4f7b6db75a1565535d7 (patch) | |
tree | 6ff9d2d9388406b8447b09b6a4037795142172de /drivers/scsi | |
parent | 2456e855354415bfaeb7badaa14e11b3e02c8466 (diff) |
ktime: Cleanup ktime_set() usage
ktime_set(S,N) was required for the timespec storage type and is still
useful for situations where a Seconds and Nanoseconds part of a time value
needs to be converted. For anything where the Seconds argument is 0, this
is pointless and can be replaced with a simple assignment.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_debug.c | 2 | ||||
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c index 2583e8b50b21..3d3768aaab4f 100644 --- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | |||
@@ -1694,7 +1694,7 @@ static void srp_snd_msg_failed(struct scsi_info *vscsi, long rc) | |||
1694 | if (!vscsi->rsp_q_timer.started) { | 1694 | if (!vscsi->rsp_q_timer.started) { |
1695 | if (vscsi->rsp_q_timer.timer_pops < | 1695 | if (vscsi->rsp_q_timer.timer_pops < |
1696 | MAX_TIMER_POPS) { | 1696 | MAX_TIMER_POPS) { |
1697 | kt = ktime_set(0, WAIT_NANO_SECONDS); | 1697 | kt = WAIT_NANO_SECONDS; |
1698 | } else { | 1698 | } else { |
1699 | /* | 1699 | /* |
1700 | * slide the timeslice if the maximum | 1700 | * slide the timeslice if the maximum |
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index cf04a364fd8b..03051e12a072 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -4085,7 +4085,7 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip, | |||
4085 | jiffies_to_timespec(delta_jiff, &ts); | 4085 | jiffies_to_timespec(delta_jiff, &ts); |
4086 | kt = ktime_set(ts.tv_sec, ts.tv_nsec); | 4086 | kt = ktime_set(ts.tv_sec, ts.tv_nsec); |
4087 | } else | 4087 | } else |
4088 | kt = ktime_set(0, sdebug_ndelay); | 4088 | kt = sdebug_ndelay; |
4089 | if (NULL == sd_dp) { | 4089 | if (NULL == sd_dp) { |
4090 | sd_dp = kzalloc(sizeof(*sd_dp), GFP_ATOMIC); | 4090 | sd_dp = kzalloc(sizeof(*sd_dp), GFP_ATOMIC); |
4091 | if (NULL == sd_dp) | 4091 | if (NULL == sd_dp) |
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index a2c2817fc566..20e5e5fb048c 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c | |||
@@ -930,7 +930,7 @@ static void ufshcd_clk_scaling_update_busy(struct ufs_hba *hba) | |||
930 | if (!hba->outstanding_reqs && scaling->is_busy_started) { | 930 | if (!hba->outstanding_reqs && scaling->is_busy_started) { |
931 | scaling->tot_busy_t += ktime_to_us(ktime_sub(ktime_get(), | 931 | scaling->tot_busy_t += ktime_to_us(ktime_sub(ktime_get(), |
932 | scaling->busy_start_t)); | 932 | scaling->busy_start_t)); |
933 | scaling->busy_start_t = ktime_set(0, 0); | 933 | scaling->busy_start_t = 0; |
934 | scaling->is_busy_started = false; | 934 | scaling->is_busy_started = false; |
935 | } | 935 | } |
936 | } | 936 | } |
@@ -6661,7 +6661,7 @@ start_window: | |||
6661 | scaling->busy_start_t = ktime_get(); | 6661 | scaling->busy_start_t = ktime_get(); |
6662 | scaling->is_busy_started = true; | 6662 | scaling->is_busy_started = true; |
6663 | } else { | 6663 | } else { |
6664 | scaling->busy_start_t = ktime_set(0, 0); | 6664 | scaling->busy_start_t = 0; |
6665 | scaling->is_busy_started = false; | 6665 | scaling->is_busy_started = false; |
6666 | } | 6666 | } |
6667 | spin_unlock_irqrestore(hba->host->host_lock, flags); | 6667 | spin_unlock_irqrestore(hba->host->host_lock, flags); |