Commit e3f052f2 authored by Ruslan Pisarev's avatar Ruslan Pisarev Committed by Greg Kroah-Hartman

Staging: pohmelfs: fix spaces and TAB coding style issue in crypto.c

This is a patch to the crypto.c file that fixed up a TAB and spaces
Errors found by the checkpatch.pl tools, like
	ERROR: switch and case should be at the same indent
and
	spaces required around that '=' (ctx:VxV)
Signed-off-by: default avatarRuslan Pisarev <ruslan@rpisarev.org.ua>
Acked-by: default avatarEvgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c1989b36
...@@ -170,17 +170,17 @@ static int pohmelfs_crypto_process(struct ablkcipher_request *req, ...@@ -170,17 +170,17 @@ static int pohmelfs_crypto_process(struct ablkcipher_request *req,
err = crypto_ablkcipher_decrypt(req); err = crypto_ablkcipher_decrypt(req);
switch (err) { switch (err) {
case -EINPROGRESS: case -EINPROGRESS:
case -EBUSY: case -EBUSY:
err = wait_for_completion_interruptible_timeout(&complete.complete, err = wait_for_completion_interruptible_timeout(&complete.complete,
timeout); timeout);
if (!err) if (!err)
err = -ETIMEDOUT; err = -ETIMEDOUT;
else if (err > 0) else if (err > 0)
err = complete.error; err = complete.error;
break; break;
default: default:
break; break;
} }
return err; return err;
...@@ -196,7 +196,7 @@ int pohmelfs_crypto_process_input_data(struct pohmelfs_crypto_engine *e, u64 cmd ...@@ -196,7 +196,7 @@ int pohmelfs_crypto_process_input_data(struct pohmelfs_crypto_engine *e, u64 cmd
return 0; return 0;
dprintk("%s: eng: %p, iv: %llx, data: %p, page: %p/%lu, size: %u.\n", dprintk("%s: eng: %p, iv: %llx, data: %p, page: %p/%lu, size: %u.\n",
__func__, e, cmd_iv, data, page, (page)?page->index:0, size); __func__, e, cmd_iv, data, page, (page) ? page->index : 0, size);
if (data) { if (data) {
sg_init_one(&sg, data, size); sg_init_one(&sg, data, size);
...@@ -247,7 +247,7 @@ int pohmelfs_crypto_process_input_data(struct pohmelfs_crypto_engine *e, u64 cmd ...@@ -247,7 +247,7 @@ int pohmelfs_crypto_process_input_data(struct pohmelfs_crypto_engine *e, u64 cmd
dprintk("%s: eng: %p, hash: %p, cipher: %p: iv : %llx, hash mismatch (recv/calc): ", dprintk("%s: eng: %p, hash: %p, cipher: %p: iv : %llx, hash mismatch (recv/calc): ",
__func__, e, e->hash, e->cipher, cmd_iv); __func__, e, e->hash, e->cipher, cmd_iv);
for (i=0; i<crypto_hash_digestsize(e->hash); ++i) { for (i = 0; i < crypto_hash_digestsize(e->hash); ++i) {
#if 0 #if 0
dprintka("%02x ", recv[i]); dprintka("%02x ", recv[i]);
if (recv[i] != calc[i]) { if (recv[i] != calc[i]) {
...@@ -279,7 +279,7 @@ int pohmelfs_crypto_process_input_data(struct pohmelfs_crypto_engine *e, u64 cmd ...@@ -279,7 +279,7 @@ int pohmelfs_crypto_process_input_data(struct pohmelfs_crypto_engine *e, u64 cmd
} }
static int pohmelfs_trans_iter(struct netfs_trans *t, struct pohmelfs_crypto_engine *e, static int pohmelfs_trans_iter(struct netfs_trans *t, struct pohmelfs_crypto_engine *e,
int (* iterator) (struct pohmelfs_crypto_engine *e, int (*iterator) (struct pohmelfs_crypto_engine *e,
struct scatterlist *dst, struct scatterlist *dst,
struct scatterlist *src)) struct scatterlist *src))
{ {
...@@ -319,7 +319,7 @@ static int pohmelfs_trans_iter(struct netfs_trans *t, struct pohmelfs_crypto_eng ...@@ -319,7 +319,7 @@ static int pohmelfs_trans_iter(struct netfs_trans *t, struct pohmelfs_crypto_eng
return 0; return 0;
dpage_idx = 0; dpage_idx = 0;
for (i=0; i<t->page_num; ++i) { for (i = 0; i < t->page_num; ++i) {
struct page *page = t->pages[i]; struct page *page = t->pages[i];
struct page *dpage = e->pages[dpage_idx]; struct page *dpage = e->pages[dpage_idx];
...@@ -402,7 +402,7 @@ static int pohmelfs_hash(struct pohmelfs_crypto_thread *tc) ...@@ -402,7 +402,7 @@ static int pohmelfs_hash(struct pohmelfs_crypto_thread *tc)
{ {
unsigned int i; unsigned int i;
dprintk("%s: ", __func__); dprintk("%s: ", __func__);
for (i=0; i<tc->psb->crypto_attached_size; ++i) for (i = 0; i < tc->psb->crypto_attached_size; ++i)
dprintka("%02x ", dst[i]); dprintka("%02x ", dst[i]);
dprintka("\n"); dprintka("\n");
} }
...@@ -414,7 +414,7 @@ static void pohmelfs_crypto_pages_free(struct pohmelfs_crypto_engine *e) ...@@ -414,7 +414,7 @@ static void pohmelfs_crypto_pages_free(struct pohmelfs_crypto_engine *e)
{ {
unsigned int i; unsigned int i;
for (i=0; i<e->page_num; ++i) for (i = 0; i < e->page_num; ++i)
__free_page(e->pages[i]); __free_page(e->pages[i]);
kfree(e->pages); kfree(e->pages);
} }
...@@ -427,7 +427,7 @@ static int pohmelfs_crypto_pages_alloc(struct pohmelfs_crypto_engine *e, struct ...@@ -427,7 +427,7 @@ static int pohmelfs_crypto_pages_alloc(struct pohmelfs_crypto_engine *e, struct
if (!e->pages) if (!e->pages)
return -ENOMEM; return -ENOMEM;
for (i=0; i<psb->trans_max_pages; ++i) { for (i = 0; i < psb->trans_max_pages; ++i) {
e->pages[i] = alloc_page(GFP_KERNEL); e->pages[i] = alloc_page(GFP_KERNEL);
if (!e->pages[i]) if (!e->pages[i])
break; break;
...@@ -612,7 +612,7 @@ static int pohmelfs_sys_crypto_init(struct pohmelfs_sb *psb) ...@@ -612,7 +612,7 @@ static int pohmelfs_sys_crypto_init(struct pohmelfs_sb *psb)
__func__, st, &st->eng, &st->eng.hash, &st->eng.cipher); __func__, st, &st->eng, &st->eng.hash, &st->eng.cipher);
} }
for (i=0; i<psb->crypto_thread_num; ++i) { for (i = 0; i < psb->crypto_thread_num; ++i) {
err = -ENOMEM; err = -ENOMEM;
t = kzalloc(sizeof(struct pohmelfs_crypto_thread), GFP_KERNEL); t = kzalloc(sizeof(struct pohmelfs_crypto_thread), GFP_KERNEL);
if (!t) if (!t)
...@@ -780,7 +780,7 @@ int pohmelfs_crypto_init(struct pohmelfs_sb *psb) ...@@ -780,7 +780,7 @@ int pohmelfs_crypto_init(struct pohmelfs_sb *psb)
} }
static int pohmelfs_crypto_thread_get(struct pohmelfs_sb *psb, static int pohmelfs_crypto_thread_get(struct pohmelfs_sb *psb,
int (* action)(struct pohmelfs_crypto_thread *t, void *data), void *data) int (*action)(struct pohmelfs_crypto_thread *t, void *data), void *data)
{ {
struct pohmelfs_crypto_thread *t = NULL; struct pohmelfs_crypto_thread *t = NULL;
int err; int err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment