Skip to contentSkip to conversation

block: cryptoloop - Fix build warning

PATCH In review Corentin Labbe 2 participants 2 messages Sep 25, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: cryptoloop - Fix build warning

This patch fix the following build warning:
drivers/block/cryptoloop.c:46:8: warning: variable 'cipher' set but not used [-Wunused-but-set-variable]

---
 drivers/block/cryptoloop.c | 2 --
 1 file changed, 2 deletions(-)
drivers/block/cryptoloop.c +0 -2
index 74e03aa537ad..7033a4beda66 100644
@@ -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;
Signature · 1 line
2.13.5
maintainer
#1 lore raw
Quoted 2 lines · Corentin Labbe

This patch fix the following build warning:
drivers/block/cryptoloop.c:46:8: warning: variable 'cipher' set but not used [-Wunused-but-set-variable]

Thanks, added for 4.15.

Signature · 1 line
Jens Axboe