aboutsummaryrefslogtreecommitdiff
path: root/crypto/scatterwalk.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-08-19 22:24:23 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2006-09-21 11:46:17 +1000
commit055bcee3102dc35f019b69df9c2618e9d6dd1c09 (patch)
tree3f7c68abbbb5041d570e4cb8588f3943530bc0b7 /crypto/scatterwalk.h
parent7226bc877a22244e8003924031435a4bffd52654 (diff)
[CRYPTO] digest: Added user API for new hash type
The existing digest user interface is inadequate for support asynchronous operations. For one it doesn't return a value to indicate success or failure, nor does it take a per-operation descriptor which is essential for the issuing of requests while other requests are still outstanding. This patch is the first in a series of steps to remodel the interface for asynchronous operations. For the ease of transition the new interface will be known as "hash" while the old one will remain as "digest". This patch also changes sg_next to allow chaining. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/scatterwalk.h')
-rw-r--r--crypto/scatterwalk.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/scatterwalk.h b/crypto/scatterwalk.h
index ace595a2e11..f1592cc2d0f 100644
--- a/crypto/scatterwalk.h
+++ b/crypto/scatterwalk.h
@@ -20,11 +20,9 @@
#include "internal.h"
-/* Define sg_next is an inline routine now in case we want to change
- scatterlist to a linked list later. */
static inline struct scatterlist *sg_next(struct scatterlist *sg)
{
- return sg + 1;
+ return (++sg)->length ? sg : (void *)sg->page;
}
static inline unsigned long scatterwalk_samebuf(struct scatter_walk *walk_in,