mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
crypto: scatterwalk - Change scatterwalk_next calling convention
Rather than returning the address and storing the length into an argument pointer, add an address field to the walk struct and use that to store the address. The length is returned directly. Change the done functions to use this stored address instead of getting them from the caller. Split the address into two using a union. The user should only access the const version so that it is never changed. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -54,6 +54,7 @@ struct rtattr;
|
||||
struct scatterlist;
|
||||
struct seq_file;
|
||||
struct sk_buff;
|
||||
union crypto_no_such_thing;
|
||||
|
||||
struct crypto_instance {
|
||||
struct crypto_alg alg;
|
||||
@@ -108,6 +109,12 @@ struct crypto_queue {
|
||||
struct scatter_walk {
|
||||
struct scatterlist *sg;
|
||||
unsigned int offset;
|
||||
union {
|
||||
void *const addr;
|
||||
|
||||
/* Private API field, do not touch. */
|
||||
union crypto_no_such_thing *__addr;
|
||||
};
|
||||
};
|
||||
|
||||
struct crypto_attr_alg {
|
||||
|
||||
Reference in New Issue
Block a user