Whamcloud - gitweb
LU-16518 misc: fix clang build errors
[fs/lustre-release.git] / lustre / target / update_records.c
index 5fb706c..7184a9e 100644 (file)
@@ -209,8 +209,8 @@ static int update_records_update_pack(const struct lu_env *env,
 
        for (i = 0; i < param_bufs_count; i++)
                total_param_sizes +=
-                       cfs_size_round(sizeof(struct object_update_param) +
-                                      param_sizes[i]);
+                       round_up(sizeof(struct object_update_param) +
+                                      param_sizes[i], 8);
 
        /* Check whether the packing exceeding the maximum parameter size */
        if (unlikely(*max_param_size < total_param_sizes)) {
@@ -236,7 +236,7 @@ static int update_records_update_pack(const struct lu_env *env,
 
                op->uop_params_off[i] = index;
        }
-       CDEBUG(D_INFO, "%huth "DFID" %s param_count = %u\n",
+       CDEBUG(D_INFO, "%uth "DFID" %s param_count = %u\n",
               *op_count, PFID(fid), update_op_str(op_type), *param_count);
 
        *op_count = *op_count + 1;
@@ -263,8 +263,8 @@ static size_t update_records_update_size(__u32 param_count, size_t *sizes)
        size = update_op_size(param_count);
 
        for (i = 0; i < param_count; i++)
-               size += cfs_size_round(sizeof(struct object_update_param) +
-                                      sizes[i]);
+               size += round_up(sizeof(struct object_update_param) +
+                                      sizes[i], 8);
 
        return size;
 }
@@ -1200,8 +1200,7 @@ static void update_key_fini(const struct lu_context *ctx,
        }
 
        if (args->ta_args != NULL)
-               OBD_FREE(args->ta_args, sizeof(args->ta_args[0]) *
-                        args->ta_alloc_args);
+               OBD_FREE_PTR_ARRAY(args->ta_args, args->ta_alloc_args);
 
        if (info->uti_tur.tur_update_records != NULL)
                OBD_FREE_LARGE(info->uti_tur.tur_update_records,