aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
diff options
context:
space:
mode:
authorDmitry Eremin <dmitry.eremin@intel.com>2016-09-18 16:38:06 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-19 09:51:51 +0200
commitbb5c7f2630dec25282f1ef31c3eeb218ee8b323f (patch)
treea1a0a5dd24ac5e69b99dffa613f5382383febdfd /drivers/staging/lustre/lustre/include/lustre/lustre_user.h
parentstaging: lustre: lov: remove LL_IOC_RECREATE_{FID, OBJ} (diff)
downloadlinux-dev-bb5c7f2630dec25282f1ef31c3eeb218ee8b323f.tar.xz
linux-dev-bb5c7f2630dec25282f1ef31c3eeb218ee8b323f.zip
staging: lustre: changelog: fix comparison between signed and unsigned
Change type of changelog_*{namelen,size}() to size_t. Fixed string specifier for unsigned types. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/12474 Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: James Nunez <james.a.nunez@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/include/lustre/lustre_user.h')
-rw-r--r--drivers/staging/lustre/lustre/include/lustre/lustre_user.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
index de52339232ed..e8f81a565391 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
@@ -819,9 +819,9 @@ struct changelog_ext_jobid {
char cr_jobid[LUSTRE_JOBID_SIZE]; /**< zero-terminated string. */
};
-static inline unsigned int changelog_rec_offset(enum changelog_rec_flags crf)
+static inline size_t changelog_rec_offset(enum changelog_rec_flags crf)
{
- unsigned int size = sizeof(struct changelog_rec);
+ size_t size = sizeof(struct changelog_rec);
if (crf & CLF_RENAME)
size += sizeof(struct changelog_ext_rename);
@@ -832,12 +832,12 @@ static inline unsigned int changelog_rec_offset(enum changelog_rec_flags crf)
return size;
}
-static inline int changelog_rec_size(struct changelog_rec *rec)
+static inline size_t changelog_rec_size(struct changelog_rec *rec)
{
return changelog_rec_offset(rec->cr_flags);
}
-static inline unsigned int changelog_rec_varsize(struct changelog_rec *rec)
+static inline size_t changelog_rec_varsize(struct changelog_rec *rec)
{
return changelog_rec_size(rec) - sizeof(*rec) + rec->cr_namelen;
}
@@ -869,7 +869,7 @@ static inline char *changelog_rec_name(struct changelog_rec *rec)
CLF_SUPPORTED);
}
-static inline int changelog_rec_snamelen(struct changelog_rec *rec)
+static inline size_t changelog_rec_snamelen(struct changelog_rec *rec)
{
return rec->cr_namelen - strlen(changelog_rec_name(rec)) - 1;
}