if (rc < 0)
GOTO(out, rc);
- if (rc < sizeof(*md->lsm)) {
+ if (rc < (typeof(rc))sizeof(*md->lsm)) {
CDEBUG(D_INFO, "lsm size too small: "
"rc < sizeof (*md->lsm) (%d < %d)\n",
rc, (int)sizeof(*md->lsm));
if (rc < 0)
GOTO(out, rc);
- if (rc < sizeof(*md->lmv)) {
+ if (rc < (typeof(rc))sizeof(*md->lmv)) {
CDEBUG(D_INFO, "size too small: "
"rc < sizeof(*md->lmv) (%d < %d)\n",
rc, (int)sizeof(*md->lmv));
return rc;
}
-static struct kuc_hdr *changelog_kuc_hdr(char *buf, int len, int flags)
+static struct kuc_hdr *changelog_kuc_hdr(char *buf, size_t len, __u32 flags)
{
struct kuc_hdr *lh = (struct kuc_hdr *)buf;
struct changelog_show *cs = data;
struct llog_changelog_rec *rec = (struct llog_changelog_rec *)hdr;
struct kuc_hdr *lh;
- int len;
+ size_t len;
int rc;
ENTRY;
memcpy(lh + 1, &rec->cr, len - sizeof(*lh));
rc = libcfs_kkuc_msg_put(cs->cs_fp, lh);
- CDEBUG(D_HSM, "kucmsg fp %p len %d rc %d\n", cs->cs_fp, len, rc);
+ CDEBUG(D_HSM, "kucmsg fp %p len %zu rc %d\n", cs->cs_fp, len, rc);
RETURN(rc);
}
static void lustre_swab_hal(struct hsm_action_list *h)
{
struct hsm_action_item *hai;
- int i;
+ __u32 i;
__swab32s(&h->hal_version);
__swab32s(&h->hal_count);
* @param val KUC message (kuc_hdr + hsm_action_list)
* @param len total length of message
*/
-static int mdc_hsm_copytool_send(int len, void *val)
+static int mdc_hsm_copytool_send(size_t len, void *val)
{
struct kuc_hdr *lh = (struct kuc_hdr *)val;
struct hsm_action_list *hal = (struct hsm_action_list *)(lh + 1);
ENTRY;
if (len < sizeof(*lh) + sizeof(*hal)) {
- CERROR("Short HSM message %d < %d\n", len,
- (int) (sizeof(*lh) + sizeof(*hal)));
+ CERROR("Short HSM message %zu < %zu\n", len,
+ sizeof(*lh) + sizeof(*hal));
RETURN(-EPROTO);
}
if (lh->kuc_magic == __swab16(KUC_MAGIC)) {
int rc = -EINVAL;
if (KEY_IS(KEY_MAX_EASIZE)) {
- int mdsize, *max_easize;
+ __u32 mdsize, *max_easize;
if (*vallen != sizeof(int))
RETURN(-EINVAL);
- mdsize = *(int *)val;
+ mdsize = *(__u32 *)val;
if (mdsize > exp->exp_obd->u.cli.cl_max_mds_easize)
exp->exp_obd->u.cli.cl_max_mds_easize = mdsize;
max_easize = val;
*max_easize = exp->exp_obd->u.cli.cl_max_mds_easize;
RETURN(0);
} else if (KEY_IS(KEY_DEFAULT_EASIZE)) {
- int *default_easize;
+ __u32 *default_easize;
if (*vallen != sizeof(int))
RETURN(-EINVAL);
*default_easize = exp->exp_obd->u.cli.cl_default_mds_easize;
RETURN(0);
} else if (KEY_IS(KEY_MAX_COOKIESIZE)) {
- int mdsize, *max_cookiesize;
+ __u32 mdsize, *max_cookiesize;
if (*vallen != sizeof(int))
RETURN(-EINVAL);
*max_cookiesize = exp->exp_obd->u.cli.cl_max_mds_cookiesize;
RETURN(0);
} else if (KEY_IS(KEY_DEFAULT_COOKIESIZE)) {
- int *default_cookiesize;
+ __u32 *default_cookiesize;
if (*vallen != sizeof(int))
RETURN(-EINVAL);
*data = imp->imp_connect_data;
RETURN(0);
} else if (KEY_IS(KEY_TGT_COUNT)) {
- *((int *)val) = 1;
+ *((__u32 *)val) = 1;
RETURN(0);
}
* a large number of stripes is possible. If a larger reply buffer is
* required it will be reallocated in the ptlrpc layer due to overflow.
*/
-static int mdc_init_ea_size(struct obd_export *exp, int easize,
- int def_easize, int cookiesize, int def_cookiesize)
+static int mdc_init_ea_size(struct obd_export *exp, __u32 easize,
+ __u32 def_easize, __u32 cookiesize,
+ __u32 def_cookiesize)
{
struct obd_device *obd = exp->exp_obd;
struct client_obd *cli = &obd->u.cli;