Commit e8453c24 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Greg Kroah-Hartman

staging/lustre: use 'long' return type for cfs_duration_sec()

The cfs_duration_sec() converts a relative jiffies value into seconds,
and returns that number as a time_t. We know that a 32-bit type is
enough here, because the result is order of magnitudes smaller than
the difference in jiffies that is also expressed as a 'long', so
we can safely replace the time_t type with long as well.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5e50efea
...@@ -90,7 +90,7 @@ static inline long cfs_time_seconds(int seconds) ...@@ -90,7 +90,7 @@ static inline long cfs_time_seconds(int seconds)
return ((long)seconds) * HZ; return ((long)seconds) * HZ;
} }
static inline time_t cfs_duration_sec(long d) static inline long cfs_duration_sec(long d)
{ {
return d / HZ; return d / HZ;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment