staging/lustre: fix build warnning on 32bit system
authorPeng Tao <bergwolf@gmail.com>
Mon, 15 Jul 2013 14:27:16 +0000 (22:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 19:24:05 +0000 (12:24 -0700)
Building on 32bit system, I got warnings like below:
drivers/staging/lustre/lustre/llite/../include/lprocfs_status.h:666:7: note: expected ‘long unsigned int *’ but argument is of type ‘size_t *’
 char *lprocfs_find_named_value(const char *buffer, const char *name,

drivers/staging/lustre/lustre/lov/lov_io.c: In function ‘lov_io_rw_iter_init’:
include/asm-generic/div64.h:43:28: warning: comparison of distinct pointer types lacks a cast [enabled by default]
  (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/lprocfs_status.h
drivers/staging/lustre/lustre/lov/lov_io.c
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c

index 55f182205d7850618bb8d9fd1a0f18cff0e7f6ee..294fb7807c8c1aa6dcbbd50c8ba0e8674f965136 100644 (file)
@@ -663,8 +663,8 @@ extern int lprocfs_write_u64_helper(const char *buffer, unsigned long count,
 extern int lprocfs_write_frac_u64_helper(const char *buffer,
                                         unsigned long count,
                                         __u64 *val, int mult);
-char *lprocfs_find_named_value(const char *buffer, const char *name,
-                               unsigned long *count);
+extern char *lprocfs_find_named_value(const char *buffer, const char *name,
+                                     size_t *count);
 void lprocfs_oh_tally(struct obd_histogram *oh, unsigned int value);
 void lprocfs_oh_tally_log2(struct obd_histogram *oh, unsigned int value);
 void lprocfs_oh_clear(struct obd_histogram *oh);
index 1a87abdf095320b8b0feae4e9263c5827c34574e..022e0f4911c64b2c97ab8a5e868a7cf4e64f2196 100644 (file)
@@ -430,7 +430,7 @@ static int lov_io_rw_iter_init(const struct lu_env *env,
        struct lov_io   *lio = cl2lov_io(env, ios);
        struct cl_io     *io  = ios->cis_io;
        struct lov_stripe_md *lsm = lio->lis_object->lo_lsm;
-       loff_t start = io->u.ci_rw.crw_pos;
+       __u64 start = io->u.ci_rw.crw_pos;
        loff_t next;
        unsigned long ssize = lsm->lsm_stripe_size;
 
index f7af3d6a4efcbf52f1cba02c6ad717c6efdbb879..85163f42892e66d340c318003c1496d3e3117c4f 100644 (file)
@@ -1873,7 +1873,7 @@ static char *lprocfs_strnstr(const char *s1, const char *s2, size_t len)
  * If \a name is not found the original \a buffer is returned.
  */
 char *lprocfs_find_named_value(const char *buffer, const char *name,
-                               unsigned long *count)
+                              size_t *count)
 {
        char *val;
        size_t buflen = *count;