diff options
author | NeilBrown <neilb@suse.com> | 2018-03-29 15:26:48 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-23 14:52:52 +0200 |
commit | e990f1c6eccd6389c3ce321d8bf05cdb0747b761 (patch) | |
tree | cfa5d2490dc2d507e2a5bfa069985d494472c8f5 /drivers/staging/lustre/include | |
parent | b0fdb5702533eda27357102ff221297fe5cf009b (diff) | |
download | op-kernel-dev-e990f1c6eccd6389c3ce321d8bf05cdb0747b761.zip op-kernel-dev-e990f1c6eccd6389c3ce321d8bf05cdb0747b761.tar.gz |
staging: lustre: libcfs: discard cfs_time_shift().
This function simply multiplies by HZ and adds jiffies.
This is simple enough to be opencoded, and doing so
makes the code easier to read.
Same for cfs_time_shift_64()
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/include')
-rw-r--r-- | drivers/staging/lustre/include/linux/libcfs/libcfs_time.h | 5 | ||||
-rw-r--r-- | drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h | 5 |
2 files changed, 0 insertions, 10 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h index 7b41a12..0ebbde4 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h @@ -50,11 +50,6 @@ static inline int cfs_time_aftereq(unsigned long t1, unsigned long t2) return time_before_eq(t2, t1); } -static inline unsigned long cfs_time_shift(int seconds) -{ - return jiffies + seconds * HZ; -} - /* * return valid time-out based on user supplied one. Currently we only check * that time-out is not shorted than allowed. diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h index b3a8053..ff3aae2 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h @@ -65,11 +65,6 @@ static inline long cfs_duration_sec(long d) return d / msecs_to_jiffies(MSEC_PER_SEC); } -static inline u64 cfs_time_shift_64(int seconds) -{ - return get_jiffies_64() + (u64)seconds * HZ; -} - static inline int cfs_time_before_64(u64 t1, u64 t2) { return (__s64)t2 - (__s64)t1 > 0; |