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

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

index 62f9198..14907c8 100644 (file)
@@ -2424,14 +2424,14 @@ new_comp:
                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);
                        errno = EINVAL;
                        return -1;
                }
                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);
                        errno = EINVAL;
                        return -1;
                }
@@ -2445,7 +2445,7 @@ new_comp:
                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);
                        errno = EINVAL;
                        return -1;
                }
@@ -2460,7 +2460,7 @@ new_comp:
                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;
                }
@@ -2470,7 +2470,7 @@ new_comp:
                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;
                }
@@ -2493,7 +2493,7 @@ new_comp:
        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;
        }
 
@@ -2519,7 +2519,7 @@ new_comp:
                    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);
                        errno = EINVAL;
                        return -1;
@@ -3763,8 +3763,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;
@@ -3821,8 +3820,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;
@@ -5870,7 +5868,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;