dm ioctl: remove double parentheses
authorMatthias Kaehlcke <mka@chromium.org>
Mon, 17 Apr 2017 18:05:03 +0000 (11:05 -0700)
committerMike Snitzer <snitzer@redhat.com>
Mon, 24 Apr 2017 18:31:53 +0000 (14:31 -0400)
The extra pair of parantheses is not needed and causes clang to generate
warnings about the DM_DEV_CREATE_CMD comparison in validate_params().

Also remove another double parentheses that doesn't cause a warning.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-ioctl.c

index 641d5e9cfedd471440aeb03debb4a26921eb491c..0956b86593603470ab6c27e0ae69af430e01708c 100644 (file)
@@ -1770,12 +1770,12 @@ static int validate_params(uint cmd, struct dm_ioctl *param)
            cmd == DM_LIST_VERSIONS_CMD)
                return 0;
 
-       if ((cmd == DM_DEV_CREATE_CMD)) {
+       if (cmd == DM_DEV_CREATE_CMD) {
                if (!*param->name) {
                        DMWARN("name not supplied when creating device");
                        return -EINVAL;
                }
-       } else if ((*param->uuid && *param->name)) {
+       } else if (*param->uuid && *param->name) {
                DMWARN("only supply one of name or uuid, cmd(%u)", cmd);
                return -EINVAL;
        }