Whamcloud - gitweb
LU-12705 utils: cleanup unnecessary typecasting 13/36313/2
authorGu Zheng <gzheng@ddn.com>
Wed, 18 Sep 2019 04:12:55 +0000 (12:12 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 4 Oct 2019 20:31:36 +0000 (20:31 +0000)
There're a bunch of variables typeecasted in utils/lfs.c where
they are not needed, so cleanup them here.

Lustre-change: https://review.whamcloud.com/36224
Lustre-commit: d8135ad2fbe58a0fbe6984584816338542901c5c

Change-Id: I6c944f18137fd1ff1162d9b6567c9328dfa185eb
Test-Parameters: trivial
Signed-off-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/36313
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/utils/lfs.c

index 48719f6..251eedf 100644 (file)
@@ -2241,13 +2241,13 @@ static int comp_args_to_layout(struct llapi_layout **composite,
                if (lsa->lsa_stripe_count != LLAPI_LAYOUT_DEFAULT) {
                        fprintf(stderr, "Option 'stripe-count' can't be "
                                "specified with Data-on-MDT component: %lld\n",
-                               (long long)lsa->lsa_stripe_count);
+                               lsa->lsa_stripe_count);
                        return -EINVAL;
                }
                if (lsa->lsa_stripe_size != LLAPI_LAYOUT_DEFAULT) {
                        fprintf(stderr, "Option 'stripe-size' can't be "
                                "specified with Data-on-MDT component: %llu\n",
-                               (unsigned long long)lsa->lsa_stripe_size);
+                               lsa->lsa_stripe_size);
                        return -EINVAL;
                }
                if (lsa->lsa_nr_tgts != 0) {
@@ -2259,7 +2259,7 @@ static int comp_args_to_layout(struct llapi_layout **composite,
                if (lsa->lsa_stripe_off != LLAPI_LAYOUT_DEFAULT) {
                        fprintf(stderr, "Option 'stripe-offset' can't be "
                                "specified with Data-on-MDT component: %lld\n",
-                               (long long)lsa->lsa_stripe_off);
+                               lsa->lsa_stripe_off);
                        return -EINVAL;
                }
                if (lsa->lsa_pool_name != 0) {
@@ -2272,7 +2272,7 @@ static int comp_args_to_layout(struct llapi_layout **composite,
                rc = llapi_layout_pattern_set(layout, lsa->lsa_pattern);
                if (rc) {
                        fprintf(stderr, "Set stripe pattern %#llx failed. %s\n",
-                               (unsigned long long)lsa->lsa_pattern,
+                               lsa->lsa_pattern,
                                strerror(errno));
                        return rc;
                }
@@ -2290,7 +2290,7 @@ static int comp_args_to_layout(struct llapi_layout **composite,
        rc = llapi_layout_stripe_count_set(layout, lsa->lsa_stripe_count);
        if (rc) {
                fprintf(stderr, "Set stripe count %lld failed: %s\n",
-                       (long long)lsa->lsa_stripe_count, strerror(errno));
+                       lsa->lsa_stripe_count, strerror(errno));
                return rc;
        }
 
@@ -2323,7 +2323,7 @@ static int comp_args_to_layout(struct llapi_layout **composite,
                    lsa->lsa_stripe_count != LLAPI_LAYOUT_WIDE &&
                    lsa->lsa_nr_tgts != lsa->lsa_stripe_count) {
                        fprintf(stderr, "stripe_count(%lld) != nr_tgts(%d)\n",
-                               (long long)lsa->lsa_stripe_count,
+                               lsa->lsa_stripe_count,
                                lsa->lsa_nr_tgts);
                        return -EINVAL;
                }
@@ -3350,8 +3350,7 @@ static int lfs_setstripe_internal(int argc, char **argv,
                            lsa.lsa_stripe_count != lsa.lsa_nr_tgts) {
                                fprintf(stderr,
                                        "error: %s: stripe count %lld doesn't match the number of MDTs: %d\n",
-                                       progname,
-                                       (long long)lsa.lsa_stripe_count,
+                                       progname, lsa.lsa_stripe_count,
                                        lsa.lsa_nr_tgts);
                                free(lmu);
                                goto usage_error;
@@ -3400,8 +3399,7 @@ static int lfs_setstripe_internal(int argc, char **argv,
                            lsa.lsa_nr_tgts != lsa.lsa_stripe_count) {
                                fprintf(stderr,
                                        "error: %s: stripe count %lld doesn't match the number of OSTs: %d\n",
-                                       argv[0],
-                                       (long long)lsa.lsa_stripe_count,
+                                       argv[0], lsa.lsa_stripe_count,
                                        lsa.lsa_nr_tgts);
                                free(param);
                                goto usage_error;
@@ -5246,7 +5244,7 @@ static int lfs_setdirstripe(int argc, char **argv)
                    lsa.lsa_stripe_count != lsa.lsa_nr_tgts) {
                        fprintf(stderr,
                                "error: %s: stripe count %lld doesn't match the number of MDTs: %d\n",
-                               argv[0], (long long)lsa.lsa_stripe_count,
+                               argv[0], lsa.lsa_stripe_count,
                                lsa.lsa_nr_tgts);
                        free(param);
                        return CMD_HELP;