WorkStruct: make allyesconfig
[deliverable/linux.git] / drivers / md / dm-crypt.c
index a625576fdeeb3eb5c5ac1c7ebc15f3aea841df39..ed2d4ef27fd84f4ac62928389605e0eaed96934c 100644 (file)
@@ -458,11 +458,11 @@ static void dec_pending(struct crypt_io *io, int error)
  * interrupt context.
  */
 static struct workqueue_struct *_kcryptd_workqueue;
-static void kcryptd_do_work(void *data);
+static void kcryptd_do_work(struct work_struct *work);
 
 static void kcryptd_queue_io(struct crypt_io *io)
 {
-       INIT_WORK(&io->work, kcryptd_do_work, io);
+       INIT_WORK(&io->work, kcryptd_do_work);
        queue_work(_kcryptd_workqueue, &io->work);
 }
 
@@ -618,9 +618,9 @@ static void process_read_endio(struct crypt_io *io)
        dec_pending(io, crypt_convert(cc, &ctx));
 }
 
-static void kcryptd_do_work(void *data)
+static void kcryptd_do_work(struct work_struct *work)
 {
-       struct crypt_io *io = data;
+       struct crypt_io *io = container_of(work, struct crypt_io, work);
 
        if (io->post_process)
                process_read_endio(io);
@@ -915,8 +915,6 @@ static int crypt_status(struct dm_target *ti, status_type_t type,
                        char *result, unsigned int maxlen)
 {
        struct crypt_config *cc = (struct crypt_config *) ti->private;
-       const char *cipher;
-       const char *chainmode = NULL;
        unsigned int sz = 0;
 
        switch (type) {
@@ -925,14 +923,11 @@ static int crypt_status(struct dm_target *ti, status_type_t type,
                break;
 
        case STATUSTYPE_TABLE:
-               cipher = crypto_blkcipher_name(cc->tfm);
-
-               chainmode = cc->chainmode;
-
                if (cc->iv_mode)
-                       DMEMIT("%s-%s-%s ", cipher, chainmode, cc->iv_mode);
+                       DMEMIT("%s-%s-%s ", cc->cipher, cc->chainmode,
+                              cc->iv_mode);
                else
-                       DMEMIT("%s-%s ", cipher, chainmode);
+                       DMEMIT("%s-%s ", cc->cipher, cc->chainmode);
 
                if (cc->key_size > 0) {
                        if ((maxlen - sz) < ((cc->key_size << 1) + 1))
This page took 0.027224 seconds and 5 git commands to generate.