aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/digest.c3
-rw-r--r--crypto/hmac.c2
-rw-r--r--crypto/scatterwalk.c2
-rw-r--r--crypto/scatterwalk.h5
4 files changed, 3 insertions, 9 deletions
diff --git a/crypto/digest.c b/crypto/digest.c
index 8871dec8cae7..d3e827a141f1 100644
--- a/crypto/digest.c
+++ b/crypto/digest.c
@@ -21,7 +21,6 @@
21#include <linux/scatterlist.h> 21#include <linux/scatterlist.h>
22 22
23#include "internal.h" 23#include "internal.h"
24#include "scatterwalk.h"
25 24
26static int init(struct hash_desc *desc) 25static int init(struct hash_desc *desc)
27{ 26{
@@ -77,7 +76,7 @@ static int update2(struct hash_desc *desc,
77 76
78 if (!nbytes) 77 if (!nbytes)
79 break; 78 break;
80 sg = scatterwalk_sg_next(sg); 79 sg = sg_next(sg);
81 } 80 }
82 81
83 return 0; 82 return 0;
diff --git a/crypto/hmac.c b/crypto/hmac.c
index 0f05be769c34..34c3706db85d 100644
--- a/crypto/hmac.c
+++ b/crypto/hmac.c
@@ -160,7 +160,7 @@ static int hmac_digest(struct hash_desc *pdesc, struct scatterlist *sg,
160 160
161 sg_init_table(sg1, 2); 161 sg_init_table(sg1, 2);
162 sg_set_buf(sg1, ipad, bs); 162 sg_set_buf(sg1, ipad, bs);
163 sg_set_page(&sg1[1], (void *) sg, 0, 0); 163 sg_chain(sg1, 2, sg);
164 164
165 sg_init_table(sg2, 1); 165 sg_init_table(sg2, 1);
166 sg_set_buf(sg2, opad, bs + ds); 166 sg_set_buf(sg2, opad, bs + ds);
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index b9bbda0bb9f9..206c39a97e57 100644
--- a/crypto/scatterwalk.c
+++ b/crypto/scatterwalk.c
@@ -62,7 +62,7 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out,
62 walk->offset += PAGE_SIZE - 1; 62 walk->offset += PAGE_SIZE - 1;
63 walk->offset &= PAGE_MASK; 63 walk->offset &= PAGE_MASK;
64 if (walk->offset >= walk->sg->offset + walk->sg->length) 64 if (walk->offset >= walk->sg->offset + walk->sg->length)
65 scatterwalk_start(walk, scatterwalk_sg_next(walk->sg)); 65 scatterwalk_start(walk, sg_next(walk->sg));
66 } 66 }
67} 67}
68 68
diff --git a/crypto/scatterwalk.h b/crypto/scatterwalk.h
index 87ed681cceba..fd5517d2a7a9 100644
--- a/crypto/scatterwalk.h
+++ b/crypto/scatterwalk.h
@@ -20,11 +20,6 @@
20 20
21#include "internal.h" 21#include "internal.h"
22 22
23static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg)
24{
25 return (++sg)->length ? sg : (void *) sg_page(sg);
26}
27
28static inline unsigned long scatterwalk_samebuf(struct scatter_walk *walk_in, 23static inline unsigned long scatterwalk_samebuf(struct scatter_walk *walk_in,
29 struct scatter_walk *walk_out) 24 struct scatter_walk *walk_out)
30{ 25{