From: Arnd Bergmann <a...@arndb.de>

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 <a...@arndb.de>
Signed-off-by: Oleg Drokin <gr...@linuxhacker.ru>
---
 drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 0fc490b..b0af909 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;
 }
-- 
2.1.0

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to