mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-27 18:52:14 +07:00
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: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5e50efea6a
commit
e8453c24d7
@ -90,7 +90,7 @@ static inline long cfs_time_seconds(int seconds)
|
||||
return ((long)seconds) * HZ;
|
||||
}
|
||||
|
||||
static inline time_t cfs_duration_sec(long d)
|
||||
static inline long cfs_duration_sec(long d)
|
||||
{
|
||||
return d / HZ;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user