From patchwork Tue Dec 21 15:28:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Broz X-Patchwork-Id: 424661 X-Patchwork-Delegate: agk@redhat.com Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBLFWcV1002892 for ; Tue, 21 Dec 2010 15:32:59 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oBLFUZGk027902; Tue, 21 Dec 2010 10:30:36 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oBLFT74g005319 for ; Tue, 21 Dec 2010 10:29:07 -0500 Received: from tawny.mazyland.cz (tawny.brq.redhat.com [10.34.26.53]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oBLFSSc0028030; Tue, 21 Dec 2010 10:29:01 -0500 From: Milan Broz To: dm-devel@redhat.com Date: Tue, 21 Dec 2010 16:28:16 +0100 Message-Id: <6d942218774967849021d96a0d4cd4174a4163ac.1292944625.git.mbroz@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-loop: dm-devel@redhat.com Cc: Milan Broz Subject: [dm-devel] [PATCH 4/7] dm crypt: remove unused compatible table output X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Dec 2010 15:32:59 +0000 (UTC) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 5c04196..863e412 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1241,7 +1241,6 @@ static int crypt_ctr_cipher(struct dm_target *ti, } per_cpu_ptr(cc->cpu, cpu)->tfm = tfm; } - tfm = any_tfm(cc); /* Initialize and set key */ ret = crypt_set_key(cc, key); @@ -1251,7 +1250,7 @@ static int crypt_ctr_cipher(struct dm_target *ti, } /* Initialize IV */ - cc->iv_size = crypto_ablkcipher_ivsize(tfm); + cc->iv_size = crypto_ablkcipher_ivsize(any_tfm(cc)); if (cc->iv_size) /* at least a 64 bit sector number should fit in our buffer */ cc->iv_size = max(cc->iv_size, @@ -1451,10 +1450,7 @@ static int crypt_status(struct dm_target *ti, status_type_t type, break; case STATUSTYPE_TABLE: - if (cc->cipher_mode) - DMEMIT("%s-%s ", cc->cipher, cc->cipher_mode); - else - DMEMIT("%s ", cc->cipher); + DMEMIT("%s-%s ", cc->cipher, cc->cipher_mode); if (cc->key_size > 0) { if ((maxlen - sz) < ((cc->key_size << 1) + 1))