summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-09-27 23:45:11 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-29 05:03:35 +0300
commite8453c24d7f610ec67cc1bbbcf5c8b6880645672 (patch)
treed6c926c891434ee2bb82bdb1e0209cce6e6031b9
parent5e50efea6a4fe6c92dce3022878f91cf17bdceb8 (diff)
downloadlinux-e8453c24d7f610ec67cc1bbbcf5c8b6880645672.tar.xz
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>
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h2
1 files changed, 1 insertions, 1 deletions
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 0fc490bac2b5..b0af90907020 100644
--- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h
+++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h
@@ -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;
}