summaryrefslogtreecommitdiff
path: root/drivers/staging/pohmelfs/crypto.c
AgeCommit message (Collapse)Author
2011-06-21net: remove mm.h inclusion from netdevice.hAlexey Dobriyan
Remove linux/mm.h inclusion from netdevice.h -- it's unused (I've checked manually). To prevent mm.h inclusion via other channels also extract "enum dma_data_direction" definition into separate header. This tiny piece is what gluing netdevice.h with mm.h via "netdevice.h => dmaengine.h => dma-mapping.h => scatterlist.h => mm.h". Removal of mm.h from scatterlist.h was tried and was found not feasible on most archs, so the link was cutoff earlier. Hope people are OK with tiny include file. Note, that mm_types.h is still dragged in, but it is a separate story. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2010-11-09pohmelfs: remove unneeded conditionals before calls to crypto_destroy_tfm ↵Jesper Juhl
wrappers. Hi, crypto_free_hash() and crypto_free_ablkcipher() are just wrappers around crypto_free_tfm() which is itself just a wrapper around crypto_destroy_tfm(). Passing crypto_destroy_tfm() a NULL pointer is valid, so there's no reason to check for NULL first. Removing the unneeded conditionals (which is what the patch does) brings us the benefit of having to execute a few fewer test/branch instructions and also reduces object code size slightly: before: text data bss dec hex filename 8630 112 3312 12054 2f16 drivers/staging/pohmelfs/crypto.o 0000000000000cbe <pohmelfs_crypto_engine_exit>: cbe: 55 push %rbp cbf: 48 89 e5 mov %rsp,%rbp cc2: 53 push %rbx cc3: 48 83 ec 08 sub $0x8,%rsp cc7: e8 00 00 00 00 callq ccc <pohmelfs_crypto_engine_exit+0xe> ccc: 48 ff 05 00 00 00 00 incq 0x0(%rip) # cd3 <pohmelfs_crypto_engine_exit+0x15> cd3: 48 89 fb mov %rdi,%rbx cd6: 48 8b 7f 20 mov 0x20(%rdi),%rdi cda: 48 85 ff test %rdi,%rdi cdd: 74 0c je ceb <pohmelfs_crypto_engine_exit+0x2d> cdf: 48 ff 05 00 00 00 00 incq 0x0(%rip) # ce6 <pohmelfs_crypto_engine_exit+0x28> ce6: e8 58 fa ff ff callq 743 <crypto_free_hash> ceb: 48 8b 7b 28 mov 0x28(%rbx),%rdi cef: 48 85 ff test %rdi,%rdi cf2: 75 09 jne cfd <pohmelfs_crypto_engine_exit+0x3f> cf4: 48 ff 05 00 00 00 00 incq 0x0(%rip) # cfb <pohmelfs_crypto_engine_exit+0x3d> cfb: eb 16 jmp d13 <pohmelfs_crypto_engine_exit+0x55> cfd: 48 89 fe mov %rdi,%rsi d00: 48 ff 05 00 00 00 00 incq 0x0(%rip) # d07 <pohmelfs_crypto_engine_exit+0x49> d07: e8 00 00 00 00 callq d0c <pohmelfs_crypto_engine_exit+0x4e> d0c: 48 ff 05 00 00 00 00 incq 0x0(%rip) # d13 <pohmelfs_crypto_engine_exit+0x55> d13: 48 8b 7b 18 mov 0x18(%rbx),%rdi d17: e8 00 00 00 00 callq d1c <pohmelfs_crypto_engine_exit+0x5e> d1c: 48 ff 05 00 00 00 00 incq 0x0(%rip) # d23 <pohmelfs_crypto_engine_exit+0x65> d23: 5e pop %rsi d24: 5b pop %rbx d25: c9 leaveq d26: c3 retq after: text data bss dec hex filename 8604 112 3296 12012 2eec drivers/staging/pohmelfs/crypto.o 0000000000000cbe <pohmelfs_crypto_engine_exit>: cbe: 55 push %rbp cbf: 48 89 e5 mov %rsp,%rbp cc2: 53 push %rbx cc3: 48 83 ec 08 sub $0x8,%rsp cc7: e8 00 00 00 00 callq ccc <pohmelfs_crypto_engine_exit+0xe> ccc: 48 ff 05 00 00 00 00 incq 0x0(%rip) # cd3 <pohmelfs_crypto_engine_exit+0x15> cd3: 48 89 fb mov %rdi,%rbx cd6: 48 8b 7f 20 mov 0x20(%rdi),%rdi cda: e8 64 fa ff ff callq 743 <crypto_free_hash> cdf: 48 8b 7b 28 mov 0x28(%rbx),%rdi ce3: 48 ff 05 00 00 00 00 incq 0x0(%rip) # cea <pohmelfs_crypto_engine_exit+0x2c> cea: 48 89 fe mov %rdi,%rsi ced: e8 00 00 00 00 callq cf2 <pohmelfs_crypto_engine_exit+0x34> cf2: 48 8b 7b 18 mov 0x18(%rbx),%rdi cf6: 48 ff 05 00 00 00 00 incq 0x0(%rip) # cfd <pohmelfs_crypto_engine_exit+0x3f> cfd: e8 00 00 00 00 callq d02 <pohmelfs_crypto_engine_exit+0x44> d02: 48 ff 05 00 00 00 00 incq 0x0(%rip) # d09 <pohmelfs_crypto_engine_exit+0x4b> d09: 5e pop %rsi d0a: 5b pop %rbx d0b: c9 leaveq d0c: c3 retq Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: pohmelfs: fix spaces and TAB coding style issue in crypto.cRuslan Pisarev
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: Ruslan Pisarev <ruslan@rpisarev.org.ua> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: pohmelfs: sync with the development treeEvgeniy Polyakov
* cache coherency protocol fix * proper timeout handling * implement dump/del all config group command (Signed-off-by: Pierpaolo Giacomin <yrz@anche.no>) Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: pohmelfs: move open brace to same line on structsBill Pemberton
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: pohmelfs: crypto processing.Evgeniy Polyakov
POHMELFS is able to encrypt the whole network channel or attach the strong checksum to own packets to catch faulty media. This patch implements crypto initialization, its autoconfiguration and sync with the server. Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>