Commit 691f8bfd authored by Dmitry Eremin's avatar Dmitry Eremin Committed by Greg Kroah-Hartman

staging: lustre: obdclass: fix comparison between signed and unsigned

Make lu_buf->lb_len unsigned.
Signed-off-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5417
Reviewed-on: http://review.whamcloud.com/11281Reviewed-by: default avatarFan Yong <fan.yong@intel.com>
Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3dd282c4
...@@ -1290,7 +1290,7 @@ static inline bool lu_name_is_valid_2(const char *name, size_t name_len) ...@@ -1290,7 +1290,7 @@ static inline bool lu_name_is_valid_2(const char *name, size_t name_len)
*/ */
struct lu_buf { struct lu_buf {
void *lb_buf; void *lb_buf;
ssize_t lb_len; size_t lb_len;
}; };
#define DLUBUF "(%p %zu)" #define DLUBUF "(%p %zu)"
......
...@@ -341,7 +341,7 @@ int lu_site_purge(const struct lu_env *env, struct lu_site *s, int nr) ...@@ -341,7 +341,7 @@ int lu_site_purge(const struct lu_env *env, struct lu_site *s, int nr)
int start; int start;
int count; int count;
int bnr; int bnr;
int i; unsigned int i;
if (OBD_FAIL_CHECK(OBD_FAIL_OBD_NO_LRU)) if (OBD_FAIL_CHECK(OBD_FAIL_OBD_NO_LRU))
return 0; return 0;
...@@ -869,11 +869,11 @@ EXPORT_SYMBOL(lu_site_print); ...@@ -869,11 +869,11 @@ EXPORT_SYMBOL(lu_site_print);
/** /**
* Return desired hash table order. * Return desired hash table order.
*/ */
static int lu_htable_order(struct lu_device *top) static unsigned int lu_htable_order(struct lu_device *top)
{ {
unsigned long bits_max = LU_SITE_BITS_MAX; unsigned long bits_max = LU_SITE_BITS_MAX;
unsigned long cache_size; unsigned long cache_size;
int bits; unsigned int bits;
/* /*
* Calculate hash table size, assuming that we want reasonable * Calculate hash table size, assuming that we want reasonable
...@@ -1325,7 +1325,7 @@ static unsigned key_set_version; ...@@ -1325,7 +1325,7 @@ static unsigned key_set_version;
int lu_context_key_register(struct lu_context_key *key) int lu_context_key_register(struct lu_context_key *key)
{ {
int result; int result;
int i; unsigned int i;
LASSERT(key->lct_init); LASSERT(key->lct_init);
LASSERT(key->lct_fini); LASSERT(key->lct_fini);
...@@ -1531,7 +1531,7 @@ EXPORT_SYMBOL(lu_context_key_revive); ...@@ -1531,7 +1531,7 @@ EXPORT_SYMBOL(lu_context_key_revive);
static void keys_fini(struct lu_context *ctx) static void keys_fini(struct lu_context *ctx)
{ {
int i; unsigned int i;
if (!ctx->lc_value) if (!ctx->lc_value)
return; return;
...@@ -1545,7 +1545,7 @@ static void keys_fini(struct lu_context *ctx) ...@@ -1545,7 +1545,7 @@ static void keys_fini(struct lu_context *ctx)
static int keys_fill(struct lu_context *ctx) static int keys_fill(struct lu_context *ctx)
{ {
int i; unsigned int i;
LINVRNT(ctx->lc_value); LINVRNT(ctx->lc_value);
for (i = 0; i < ARRAY_SIZE(lu_keys); ++i) { for (i = 0; i < ARRAY_SIZE(lu_keys); ++i) {
...@@ -1658,7 +1658,7 @@ EXPORT_SYMBOL(lu_context_enter); ...@@ -1658,7 +1658,7 @@ EXPORT_SYMBOL(lu_context_enter);
*/ */
void lu_context_exit(struct lu_context *ctx) void lu_context_exit(struct lu_context *ctx)
{ {
int i; unsigned int i;
LINVRNT(ctx->lc_state == LCS_ENTERED); LINVRNT(ctx->lc_state == LCS_ENTERED);
ctx->lc_state = LCS_LEFT; ctx->lc_state = LCS_LEFT;
...@@ -1740,7 +1740,7 @@ static void lu_site_stats_get(struct cfs_hash *hs, ...@@ -1740,7 +1740,7 @@ static void lu_site_stats_get(struct cfs_hash *hs,
struct lu_site_stats *stats, int populated) struct lu_site_stats *stats, int populated)
{ {
struct cfs_hash_bd bd; struct cfs_hash_bd bd;
int i; unsigned int i;
cfs_hash_for_each_bucket(hs, &bd, i) { cfs_hash_for_each_bucket(hs, &bd, i) {
struct lu_site_bkt_data *bkt = cfs_hash_bd_extra_get(hs, &bd); struct lu_site_bkt_data *bkt = cfs_hash_bd_extra_get(hs, &bd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment