block: cryptoloop - Fix build warning
authorCorentin Labbe <clabbe.montjoie@gmail.com>
Mon, 25 Sep 2017 17:10:07 +0000 (19:10 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 26 Sep 2017 13:41:22 +0000 (07:41 -0600)
This patch fix the following build warning:
drivers/block/cryptoloop.c:46:8: warning: variable 'cipher' set but not used [-Wunused-but-set-variable]

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/cryptoloop.c

index 74e03aa537ad740faf9cf056d2b10e3f77590d31..7033a4beda66998deac5d02ebeb908101b950b79 100644 (file)
@@ -43,7 +43,6 @@ cryptoloop_init(struct loop_device *lo, const struct loop_info64 *info)
        int cipher_len;
        int mode_len;
        char cms[LO_NAME_SIZE];                 /* cipher-mode string */
-       char *cipher;
        char *mode;
        char *cmsp = cms;                       /* c-m string pointer */
        struct crypto_skcipher *tfm;
@@ -56,7 +55,6 @@ cryptoloop_init(struct loop_device *lo, const struct loop_info64 *info)
        strncpy(cms, info->lo_crypt_name, LO_NAME_SIZE);
        cms[LO_NAME_SIZE - 1] = 0;
 
-       cipher = cmsp;
        cipher_len = strcspn(cmsp, "-");
 
        mode = cmsp + cipher_len;