sys/dev/disk/dm: Remove default:break for switch enums on kldload
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 1 Oct 2016 21:20:55 +0000 (06:20 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 1 Oct 2016 21:53:07 +0000 (06:53 +0900)
This could be reverted as compilers may warn if not all enum elements
are covered, but some dm targets don't have default case on loading,
and it's been working. Compiles with LINT64.

sys/dev/disk/dm/device-mapper.c
sys/dev/disk/dm/dm_target_error.c
sys/dev/disk/dm/dm_target_zero.c
sys/dev/disk/dm/targets/crypt/dm_target_crypt.c
sys/dev/disk/dm/targets/linear/dm_target_linear.c
sys/dev/disk/dm/targets/striped/dm_target_striped.c

index 2b2c219..ff055fd 100644 (file)
@@ -168,9 +168,6 @@ dm_modcmd(module_t mod, int cmd, void *unused)
                        break;
                kprintf("Device Mapper unloaded\n");
                break;
-
-       default:
-               break;
        }
 
        return error;
index 3bf56e1..405dd1c 100644 (file)
@@ -98,9 +98,6 @@ dmte_mod_handler(module_t mod, int type, void *unused)
                if (err == 0)
                        kprintf("dm_target_error: unloaded\n");
                break;
-
-       default:
-               break;
        }
 
        return err;
index 5251fd6..44e079c 100644 (file)
@@ -102,9 +102,6 @@ dmtz_mod_handler(module_t mod, int type, void *unused)
                if (err == 0)
                        kprintf("dm_target_zero: unloaded\n");
                break;
-
-       default:
-               break;
        }
 
        return err;
index 8536465..e4f066b 100644 (file)
@@ -1442,9 +1442,6 @@ dmtc_mod_handler(module_t mod, int type, void *unused)
                        kprintf("dm_target_crypt: unloaded\n");
                }
                break;
-
-       default:
-               break;
        }
 
        return err;
index 04f3d5a..85bb6ac 100644 (file)
@@ -201,9 +201,6 @@ dmtl_mod_handler(module_t mod, int type, void *unused)
                if (err == 0)
                        kprintf("dm_target_linear: unloaded\n");
                break;
-
-       default:
-               break;
        }
 
        return err;
index 3e6c36b..a0c147a 100644 (file)
@@ -507,9 +507,6 @@ dmts_mod_handler(module_t mod, int type, void *unused)
                if (err == 0)
                        kprintf("dm_target_striped: unloaded\n");
                break;
-
-       default:
-               break;
        }
 
        return err;