staging: lustre: cfs_time_sub() must return unsigned long
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Jul 2014 07:54:26 +0000 (00:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Jul 2014 07:54:26 +0000 (00:54 -0700)
It looks like someone ment for it to return this value (there's a cast),
but the funtion says 'long' which causes problems when comparing values
from this function.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: hpdd-discuss <hpdd-discuss@lists.01.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs_time.h

index d686b55e406a99657fa027092c8a01e0345d7dda..3371e9e0bb4375484b45d775957e0a53644a196f 100644 (file)
@@ -48,7 +48,7 @@ static inline unsigned long cfs_time_add(unsigned long t, long d)
        return (unsigned long)(t + d);
 }
 
-static inline long cfs_time_sub(unsigned long t1, unsigned long t2)
+static inline unsigned long cfs_time_sub(unsigned long t1, unsigned long t2)
 {
        return (unsigned long)(t1 - t2);
 }