aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/ll_rw_blk.c2
-rw-r--r--crypto/anubis.c1
-rw-r--r--crypto/blowfish.c1
-rw-r--r--crypto/compress.c1
-rw-r--r--crypto/crypto_null.c1
-rw-r--r--crypto/khazad.c1
-rw-r--r--crypto/sha1_generic.c1
-rw-r--r--crypto/sha256_generic.c1
-rw-r--r--crypto/sha512.c1
-rw-r--r--crypto/tea.c1
-rw-r--r--crypto/tgr192.c1
-rw-r--r--crypto/wp512.c1
-rw-r--r--drivers/base/dmapool.c1
-rw-r--r--drivers/ieee1394/sbp2.c2
-rw-r--r--drivers/media/video/bt8xx/bttvp.h2
-rw-r--r--drivers/mmc/core/core.c1
-rw-r--r--drivers/mmc/core/mmc_ops.c1
-rw-r--r--drivers/mmc/core/sd_ops.c1
-rw-r--r--drivers/mmc/core/sdio_ops.c1
-rw-r--r--drivers/net/meth.c1
-rw-r--r--drivers/scsi/scsi_lib.c2
-rw-r--r--drivers/usb/core/buffer.c1
-rw-r--r--drivers/usb/core/hcd.c1
-rw-r--r--drivers/usb/core/usb.c2
-rw-r--r--fs/nfsd/nfs4recover.c2
-rw-r--r--include/linux/scatterlist.h60
-rw-r--r--include/net/esp.h2
-rw-r--r--include/rdma/ib_verbs.h2
-rw-r--r--include/scsi/libsas.h2
-rw-r--r--net/core/skbuff.c2
-rw-r--r--net/ieee80211/ieee80211_crypt_ccmp.c1
-rw-r--r--net/ipv4/ah4.c1
-rw-r--r--net/ipv4/ipcomp.c1
-rw-r--r--net/ipv4/tcp_ipv4.c2
-rw-r--r--net/ipv6/ah6.c1
-rw-r--r--net/ipv6/ipcomp6.c1
-rw-r--r--net/ipv6/tcp_ipv6.c2
-rw-r--r--net/mac80211/aes_ccm.c1
-rw-r--r--net/rxrpc/rxkad.c2
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_crypto.c6
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_seal.c1
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_wrap.c1
-rw-r--r--net/xfrm/xfrm_algo.c1
43 files changed, 45 insertions, 75 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 56f2646612e6..54fd38589674 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1369,7 +1369,7 @@ new_segment:
1369 } /* segments in rq */ 1369 } /* segments in rq */
1370 1370
1371 if (sg) 1371 if (sg)
1372 __sg_mark_end(sg); 1372 sg_mark_end(sg);
1373 1373
1374 return nsegs; 1374 return nsegs;
1375} 1375}
diff --git a/crypto/anubis.c b/crypto/anubis.c
index 1c771f7f4dc5..4ff0e1e243ad 100644
--- a/crypto/anubis.c
+++ b/crypto/anubis.c
@@ -33,7 +33,6 @@
33#include <linux/module.h> 33#include <linux/module.h>
34#include <linux/mm.h> 34#include <linux/mm.h>
35#include <asm/byteorder.h> 35#include <asm/byteorder.h>
36#include <asm/scatterlist.h>
37#include <linux/crypto.h> 36#include <linux/crypto.h>
38#include <linux/types.h> 37#include <linux/types.h>
39 38
diff --git a/crypto/blowfish.c b/crypto/blowfish.c
index 55238c4e37f0..80c3fd8be97c 100644
--- a/crypto/blowfish.c
+++ b/crypto/blowfish.c
@@ -20,7 +20,6 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <asm/byteorder.h> 22#include <asm/byteorder.h>
23#include <asm/scatterlist.h>
24#include <linux/crypto.h> 23#include <linux/crypto.h>
25#include <linux/types.h> 24#include <linux/types.h>
26 25
diff --git a/crypto/compress.c b/crypto/compress.c
index 0a6570048c1e..1ee357085d3a 100644
--- a/crypto/compress.c
+++ b/crypto/compress.c
@@ -14,7 +14,6 @@
14#include <linux/types.h> 14#include <linux/types.h>
15#include <linux/crypto.h> 15#include <linux/crypto.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <asm/scatterlist.h>
18#include <linux/string.h> 17#include <linux/string.h>
19#include "internal.h" 18#include "internal.h"
20 19
diff --git a/crypto/crypto_null.c b/crypto/crypto_null.c
index 24dbb5d8617e..29f77477d701 100644
--- a/crypto/crypto_null.c
+++ b/crypto/crypto_null.c
@@ -19,7 +19,6 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <asm/scatterlist.h>
23#include <linux/crypto.h> 22#include <linux/crypto.h>
24#include <linux/string.h> 23#include <linux/string.h>
25 24
diff --git a/crypto/khazad.c b/crypto/khazad.c
index 9fa24a2dd6ff..704ebfe26b55 100644
--- a/crypto/khazad.c
+++ b/crypto/khazad.c
@@ -23,7 +23,6 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <asm/byteorder.h> 25#include <asm/byteorder.h>
26#include <asm/scatterlist.h>
27#include <linux/crypto.h> 26#include <linux/crypto.h>
28#include <linux/types.h> 27#include <linux/types.h>
29 28
diff --git a/crypto/sha1_generic.c b/crypto/sha1_generic.c
index 48a3c3e0bf5f..68c62f528eb5 100644
--- a/crypto/sha1_generic.c
+++ b/crypto/sha1_generic.c
@@ -23,7 +23,6 @@
23#include <linux/cryptohash.h> 23#include <linux/cryptohash.h>
24#include <linux/types.h> 24#include <linux/types.h>
25#include <crypto/sha.h> 25#include <crypto/sha.h>
26#include <asm/scatterlist.h>
27#include <asm/byteorder.h> 26#include <asm/byteorder.h>
28 27
29struct sha1_ctx { 28struct sha1_ctx {
diff --git a/crypto/sha256_generic.c b/crypto/sha256_generic.c
index 5f4332edcf6b..fd3918be58b5 100644
--- a/crypto/sha256_generic.c
+++ b/crypto/sha256_generic.c
@@ -22,7 +22,6 @@
22#include <linux/crypto.h> 22#include <linux/crypto.h>
23#include <linux/types.h> 23#include <linux/types.h>
24#include <crypto/sha.h> 24#include <crypto/sha.h>
25#include <asm/scatterlist.h>
26#include <asm/byteorder.h> 25#include <asm/byteorder.h>
27 26
28struct sha256_ctx { 27struct sha256_ctx {
diff --git a/crypto/sha512.c b/crypto/sha512.c
index e736596ca574..c39c803ecc02 100644
--- a/crypto/sha512.c
+++ b/crypto/sha512.c
@@ -19,7 +19,6 @@
19#include <linux/types.h> 19#include <linux/types.h>
20#include <crypto/sha.h> 20#include <crypto/sha.h>
21 21
22#include <asm/scatterlist.h>
23#include <asm/byteorder.h> 22#include <asm/byteorder.h>
24 23
25struct sha512_ctx { 24struct sha512_ctx {
diff --git a/crypto/tea.c b/crypto/tea.c
index 1c54e26fa529..6893b3fdf9d6 100644
--- a/crypto/tea.c
+++ b/crypto/tea.c
@@ -23,7 +23,6 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <asm/byteorder.h> 25#include <asm/byteorder.h>
26#include <asm/scatterlist.h>
27#include <linux/crypto.h> 26#include <linux/crypto.h>
28#include <linux/types.h> 27#include <linux/types.h>
29 28
diff --git a/crypto/tgr192.c b/crypto/tgr192.c
index a0fadf3dd3e2..2e7ea1680c7f 100644
--- a/crypto/tgr192.c
+++ b/crypto/tgr192.c
@@ -25,7 +25,6 @@
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/mm.h> 26#include <linux/mm.h>
27#include <asm/byteorder.h> 27#include <asm/byteorder.h>
28#include <asm/scatterlist.h>
29#include <linux/crypto.h> 28#include <linux/crypto.h>
30#include <linux/types.h> 29#include <linux/types.h>
31 30
diff --git a/crypto/wp512.c b/crypto/wp512.c
index 727d05a19ff4..f746952b93fc 100644
--- a/crypto/wp512.c
+++ b/crypto/wp512.c
@@ -23,7 +23,6 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <asm/byteorder.h> 25#include <asm/byteorder.h>
26#include <asm/scatterlist.h>
27#include <linux/crypto.h> 26#include <linux/crypto.h>
28#include <linux/types.h> 27#include <linux/types.h>
29 28
diff --git a/drivers/base/dmapool.c b/drivers/base/dmapool.c
index 5beddc322e6f..b5034dc72a05 100644
--- a/drivers/base/dmapool.c
+++ b/drivers/base/dmapool.c
@@ -2,7 +2,6 @@
2#include <linux/device.h> 2#include <linux/device.h>
3#include <linux/mm.h> 3#include <linux/mm.h>
4#include <asm/io.h> /* Needed for i386 to build */ 4#include <asm/io.h> /* Needed for i386 to build */
5#include <asm/scatterlist.h> /* Needed for i386 to build */
6#include <linux/dma-mapping.h> 5#include <linux/dma-mapping.h>
7#include <linux/dmapool.h> 6#include <linux/dmapool.h>
8#include <linux/slab.h> 7#include <linux/slab.h>
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index d5dfe11aa5c6..b83d254bc86e 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -71,11 +71,11 @@
71#include <linux/types.h> 71#include <linux/types.h>
72#include <linux/wait.h> 72#include <linux/wait.h>
73#include <linux/workqueue.h> 73#include <linux/workqueue.h>
74#include <linux/scatterlist.h>
74 75
75#include <asm/byteorder.h> 76#include <asm/byteorder.h>
76#include <asm/errno.h> 77#include <asm/errno.h>
77#include <asm/param.h> 78#include <asm/param.h>
78#include <asm/scatterlist.h>
79#include <asm/system.h> 79#include <asm/system.h>
80#include <asm/types.h> 80#include <asm/types.h>
81 81
diff --git a/drivers/media/video/bt8xx/bttvp.h b/drivers/media/video/bt8xx/bttvp.h
index 0b92c35a8435..d4ac4c4b49b4 100644
--- a/drivers/media/video/bt8xx/bttvp.h
+++ b/drivers/media/video/bt8xx/bttvp.h
@@ -36,7 +36,7 @@
36#include <linux/pci.h> 36#include <linux/pci.h>
37#include <linux/input.h> 37#include <linux/input.h>
38#include <linux/mutex.h> 38#include <linux/mutex.h>
39#include <asm/scatterlist.h> 39#include <linux/scatterlist.h>
40#include <asm/io.h> 40#include <asm/io.h>
41#include <media/v4l2-common.h> 41#include <media/v4l2-common.h>
42 42
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 09435e0ec680..b96667448eb5 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -19,7 +19,6 @@
19#include <linux/pagemap.h> 19#include <linux/pagemap.h>
20#include <linux/err.h> 20#include <linux/err.h>
21#include <linux/leds.h> 21#include <linux/leds.h>
22#include <asm/scatterlist.h>
23#include <linux/scatterlist.h> 22#include <linux/scatterlist.h>
24 23
25#include <linux/mmc/card.h> 24#include <linux/mmc/card.h>
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index 7471d49909b2..64b05c6270f2 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12#include <linux/types.h> 12#include <linux/types.h>
13#include <asm/scatterlist.h>
14#include <linux/scatterlist.h> 13#include <linux/scatterlist.h>
15 14
16#include <linux/mmc/host.h> 15#include <linux/mmc/host.h>
diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
index a6dafe62b992..0d96080d44b0 100644
--- a/drivers/mmc/core/sd_ops.c
+++ b/drivers/mmc/core/sd_ops.c
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12#include <linux/types.h> 12#include <linux/types.h>
13#include <asm/scatterlist.h>
14#include <linux/scatterlist.h> 13#include <linux/scatterlist.h>
15 14
16#include <linux/mmc/host.h> 15#include <linux/mmc/host.h>
diff --git a/drivers/mmc/core/sdio_ops.c b/drivers/mmc/core/sdio_ops.c
index 4d289b275031..e1fca588e385 100644
--- a/drivers/mmc/core/sdio_ops.c
+++ b/drivers/mmc/core/sdio_ops.c
@@ -9,7 +9,6 @@
9 * your option) any later version. 9 * your option) any later version.
10 */ 10 */
11 11
12#include <asm/scatterlist.h>
13#include <linux/scatterlist.h> 12#include <linux/scatterlist.h>
14 13
15#include <linux/mmc/host.h> 14#include <linux/mmc/host.h>
diff --git a/drivers/net/meth.c b/drivers/net/meth.c
index e25dbab67363..0c89b028a80c 100644
--- a/drivers/net/meth.c
+++ b/drivers/net/meth.c
@@ -33,7 +33,6 @@
33#include <asm/ip32/ip32_ints.h> 33#include <asm/ip32/ip32_ints.h>
34 34
35#include <asm/io.h> 35#include <asm/io.h>
36#include <asm/scatterlist.h>
37 36
38#include "meth.h" 37#include "meth.h"
39 38
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 61fdaf02f251..88de771d3569 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -785,7 +785,7 @@ struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *cmd, gfp_t gfp_mask)
785 * end-of-list 785 * end-of-list
786 */ 786 */
787 if (!left) 787 if (!left)
788 sg_mark_end(sgl, this); 788 sg_mark_end(&sgl[this - 1]);
789 789
790 /* 790 /*
791 * don't allow subsequent mempool allocs to sleep, it would 791 * don't allow subsequent mempool allocs to sleep, it would
diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c
index ead2475406b8..28d4972f7ad5 100644
--- a/drivers/usb/core/buffer.c
+++ b/drivers/usb/core/buffer.c
@@ -11,7 +11,6 @@
11#include <linux/device.h> 11#include <linux/device.h>
12#include <linux/mm.h> 12#include <linux/mm.h>
13#include <asm/io.h> 13#include <asm/io.h>
14#include <asm/scatterlist.h>
15#include <linux/dma-mapping.h> 14#include <linux/dma-mapping.h>
16#include <linux/dmapool.h> 15#include <linux/dmapool.h>
17#include <linux/usb.h> 16#include <linux/usb.h>
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 3dd997df8505..fea8256a18d6 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -30,7 +30,6 @@
30#include <linux/utsname.h> 30#include <linux/utsname.h>
31#include <linux/mm.h> 31#include <linux/mm.h>
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/scatterlist.h>
34#include <linux/device.h> 33#include <linux/device.h>
35#include <linux/dma-mapping.h> 34#include <linux/dma-mapping.h>
36#include <linux/mutex.h> 35#include <linux/mutex.h>
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 69aa68287d3f..c4a6f1095b8b 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -36,7 +36,7 @@
36#include <linux/workqueue.h> 36#include <linux/workqueue.h>
37 37
38#include <asm/io.h> 38#include <asm/io.h>
39#include <asm/scatterlist.h> 39#include <linux/scatterlist.h>
40#include <linux/mm.h> 40#include <linux/mm.h>
41#include <linux/dma-mapping.h> 41#include <linux/dma-mapping.h>
42 42
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index 6f03918018a3..1602cd00dd45 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -43,7 +43,7 @@
43#include <linux/file.h> 43#include <linux/file.h>
44#include <linux/namei.h> 44#include <linux/namei.h>
45#include <asm/uaccess.h> 45#include <asm/uaccess.h>
46#include <asm/scatterlist.h> 46#include <linux/scatterlist.h>
47#include <linux/crypto.h> 47#include <linux/crypto.h>
48#include <linux/sched.h> 48#include <linux/sched.h>
49 49
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
index 32326c293d7b..259735044148 100644
--- a/include/linux/scatterlist.h
+++ b/include/linux/scatterlist.h
@@ -188,43 +188,23 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
188 188
189/** 189/**
190 * sg_mark_end - Mark the end of the scatterlist 190 * sg_mark_end - Mark the end of the scatterlist
191 * @sgl: Scatterlist 191 * @sg: SG entryScatterlist
192 * @nents: Number of entries in sgl
193 * 192 *
194 * Description: 193 * Description:
195 * Marks the last entry as the termination point for sg_next() 194 * Marks the passed in sg entry as the termination point for the sg
195 * table. A call to sg_next() on this entry will return NULL.
196 * 196 *
197 **/ 197 **/
198static inline void sg_mark_end(struct scatterlist *sgl, unsigned int nents) 198static inline void sg_mark_end(struct scatterlist *sg)
199{ 199{
200 sgl[nents - 1].page_link = 0x02;
201}
202
203static inline void __sg_mark_end(struct scatterlist *sg)
204{
205 sg->page_link |= 0x02;
206}
207
208/**
209 * sg_init_one - Initialize a single entry sg list
210 * @sg: SG entry
211 * @buf: Virtual address for IO
212 * @buflen: IO length
213 *
214 * Notes:
215 * This should not be used on a single entry that is part of a larger
216 * table. Use sg_init_table() for that.
217 *
218 **/
219static inline void sg_init_one(struct scatterlist *sg, const void *buf,
220 unsigned int buflen)
221{
222 memset(sg, 0, sizeof(*sg));
223#ifdef CONFIG_DEBUG_SG 200#ifdef CONFIG_DEBUG_SG
224 sg->sg_magic = SG_MAGIC; 201 BUG_ON(sg->sg_magic != SG_MAGIC);
225#endif 202#endif
226 sg_mark_end(sg, 1); 203 /*
227 sg_set_buf(sg, buf, buflen); 204 * Set termination bit, clear potential chain bit
205 */
206 sg->page_link |= 0x02;
207 sg->page_link &= ~0x01;
228} 208}
229 209
230/** 210/**
@@ -240,7 +220,6 @@ static inline void sg_init_one(struct scatterlist *sg, const void *buf,
240static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents) 220static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents)
241{ 221{
242 memset(sgl, 0, sizeof(*sgl) * nents); 222 memset(sgl, 0, sizeof(*sgl) * nents);
243 sg_mark_end(sgl, nents);
244#ifdef CONFIG_DEBUG_SG 223#ifdef CONFIG_DEBUG_SG
245 { 224 {
246 unsigned int i; 225 unsigned int i;
@@ -248,6 +227,25 @@ static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents)
248 sgl[i].sg_magic = SG_MAGIC; 227 sgl[i].sg_magic = SG_MAGIC;
249 } 228 }
250#endif 229#endif
230 sg_mark_end(&sgl[nents - 1]);
231}
232
233/**
234 * sg_init_one - Initialize a single entry sg list
235 * @sg: SG entry
236 * @buf: Virtual address for IO
237 * @buflen: IO length
238 *
239 * Notes:
240 * This should not be used on a single entry that is part of a larger
241 * table. Use sg_init_table() for that.
242 *
243 **/
244static inline void sg_init_one(struct scatterlist *sg, const void *buf,
245 unsigned int buflen)
246{
247 sg_init_table(sg, 1);
248 sg_set_buf(sg, buf, buflen);
251} 249}
252 250
253/** 251/**
diff --git a/include/net/esp.h b/include/net/esp.h
index c1bc529809da..c05f529bff28 100644
--- a/include/net/esp.h
+++ b/include/net/esp.h
@@ -3,7 +3,7 @@
3 3
4#include <linux/crypto.h> 4#include <linux/crypto.h>
5#include <net/xfrm.h> 5#include <net/xfrm.h>
6#include <asm/scatterlist.h> 6#include <linux/scatterlist.h>
7 7
8#define ESP_NUM_FAST_SG 4 8#define ESP_NUM_FAST_SG 4
9 9
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 4bea182d7116..11f39606e7d9 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -48,9 +48,9 @@
48#include <linux/kref.h> 48#include <linux/kref.h>
49#include <linux/list.h> 49#include <linux/list.h>
50#include <linux/rwsem.h> 50#include <linux/rwsem.h>
51#include <linux/scatterlist.h>
51 52
52#include <asm/atomic.h> 53#include <asm/atomic.h>
53#include <asm/scatterlist.h>
54#include <asm/uaccess.h> 54#include <asm/uaccess.h>
55 55
56union ib_gid { 56union ib_gid {
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 8dda2d66b5b9..a466c2cb8955 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -36,7 +36,7 @@
36#include <scsi/scsi_device.h> 36#include <scsi/scsi_device.h>
37#include <scsi/scsi_cmnd.h> 37#include <scsi/scsi_cmnd.h>
38#include <scsi/scsi_transport_sas.h> 38#include <scsi/scsi_transport_sas.h>
39#include <asm/scatterlist.h> 39#include <linux/scatterlist.h>
40 40
41struct block_device; 41struct block_device;
42 42
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 64b50ff7a413..32d5826b7177 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2095,7 +2095,7 @@ int skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int le
2095{ 2095{
2096 int nsg = __skb_to_sgvec(skb, sg, offset, len); 2096 int nsg = __skb_to_sgvec(skb, sg, offset, len);
2097 2097
2098 __sg_mark_end(&sg[nsg - 1]); 2098 sg_mark_end(&sg[nsg - 1]);
2099 2099
2100 return nsg; 2100 return nsg;
2101} 2101}
diff --git a/net/ieee80211/ieee80211_crypt_ccmp.c b/net/ieee80211/ieee80211_crypt_ccmp.c
index 0936a3e0210b..c6d760d9fbbe 100644
--- a/net/ieee80211/ieee80211_crypt_ccmp.c
+++ b/net/ieee80211/ieee80211_crypt_ccmp.c
@@ -25,7 +25,6 @@
25#include <net/ieee80211.h> 25#include <net/ieee80211.h>
26 26
27#include <linux/crypto.h> 27#include <linux/crypto.h>
28#include <asm/scatterlist.h>
29 28
30MODULE_AUTHOR("Jouni Malinen"); 29MODULE_AUTHOR("Jouni Malinen");
31MODULE_DESCRIPTION("Host AP crypt: CCMP"); 30MODULE_DESCRIPTION("Host AP crypt: CCMP");
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c
index 4e8e3b079f5b..5fc346d8b566 100644
--- a/net/ipv4/ah4.c
+++ b/net/ipv4/ah4.c
@@ -8,7 +8,6 @@
8#include <linux/spinlock.h> 8#include <linux/spinlock.h>
9#include <net/icmp.h> 9#include <net/icmp.h>
10#include <net/protocol.h> 10#include <net/protocol.h>
11#include <asm/scatterlist.h>
12 11
13 12
14/* Clear mutable options and find final destination to substitute 13/* Clear mutable options and find final destination to substitute
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c
index 0bfeb02a5f87..ca1b5fdb8d31 100644
--- a/net/ipv4/ipcomp.c
+++ b/net/ipv4/ipcomp.c
@@ -14,7 +14,6 @@
14 * - Adaptive compression. 14 * - Adaptive compression.
15 */ 15 */
16#include <linux/module.h> 16#include <linux/module.h>
17#include <asm/scatterlist.h>
18#include <asm/semaphore.h> 17#include <asm/semaphore.h>
19#include <linux/crypto.h> 18#include <linux/crypto.h>
20#include <linux/pfkeyv2.h> 19#include <linux/pfkeyv2.h>
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index eec02b29ffcf..d438dfb0c8f3 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1083,7 +1083,7 @@ static int tcp_v4_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key,
1083 sg_set_buf(&sg[block++], key->key, key->keylen); 1083 sg_set_buf(&sg[block++], key->key, key->keylen);
1084 nbytes += key->keylen; 1084 nbytes += key->keylen;
1085 1085
1086 __sg_mark_end(&sg[block - 1]); 1086 sg_mark_end(&sg[block - 1]);
1087 1087
1088 /* Now store the Hash into the packet */ 1088 /* Now store the Hash into the packet */
1089 err = crypto_hash_init(desc); 1089 err = crypto_hash_init(desc);
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index 66a9139d46e9..4eaf55072b1b 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -35,7 +35,6 @@
35#include <net/ipv6.h> 35#include <net/ipv6.h>
36#include <net/protocol.h> 36#include <net/protocol.h>
37#include <net/xfrm.h> 37#include <net/xfrm.h>
38#include <asm/scatterlist.h>
39 38
40static int zero_out_mutable_opts(struct ipv6_opt_hdr *opthdr) 39static int zero_out_mutable_opts(struct ipv6_opt_hdr *opthdr)
41{ 40{
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c
index 80ef2a1d39fd..85eb4798d8d2 100644
--- a/net/ipv6/ipcomp6.c
+++ b/net/ipv6/ipcomp6.c
@@ -34,7 +34,6 @@
34#include <net/ip.h> 34#include <net/ip.h>
35#include <net/xfrm.h> 35#include <net/xfrm.h>
36#include <net/ipcomp.h> 36#include <net/ipcomp.h>
37#include <asm/scatterlist.h>
38#include <asm/semaphore.h> 37#include <asm/semaphore.h>
39#include <linux/crypto.h> 38#include <linux/crypto.h>
40#include <linux/pfkeyv2.h> 39#include <linux/pfkeyv2.h>
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 4b9032880959..06be2a1f2730 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -781,7 +781,7 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key,
781 sg_set_buf(&sg[block++], key->key, key->keylen); 781 sg_set_buf(&sg[block++], key->key, key->keylen);
782 nbytes += key->keylen; 782 nbytes += key->keylen;
783 783
784 __sg_mark_end(&sg[block - 1]); 784 sg_mark_end(&sg[block - 1]);
785 785
786 /* Now store the hash into the packet */ 786 /* Now store the hash into the packet */
787 err = crypto_hash_init(desc); 787 err = crypto_hash_init(desc);
diff --git a/net/mac80211/aes_ccm.c b/net/mac80211/aes_ccm.c
index bf7ba128b963..e62fe55944b8 100644
--- a/net/mac80211/aes_ccm.c
+++ b/net/mac80211/aes_ccm.c
@@ -11,7 +11,6 @@
11#include <linux/types.h> 11#include <linux/types.h>
12#include <linux/crypto.h> 12#include <linux/crypto.h>
13#include <linux/err.h> 13#include <linux/err.h>
14#include <asm/scatterlist.h>
15 14
16#include <net/mac80211.h> 15#include <net/mac80211.h>
17#include "ieee80211_key.h" 16#include "ieee80211_key.h"
diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c
index c387cf68a08c..e09a95aa68ff 100644
--- a/net/rxrpc/rxkad.c
+++ b/net/rxrpc/rxkad.c
@@ -702,7 +702,7 @@ static void rxkad_sg_set_buf2(struct scatterlist sg[2],
702 nsg++; 702 nsg++;
703 } 703 }
704 704
705 __sg_mark_end(&sg[nsg - 1]); 705 sg_mark_end(&sg[nsg - 1]);
706 706
707 ASSERTCMP(sg[0].length + sg[1].length, ==, buflen); 707 ASSERTCMP(sg[0].length + sg[1].length, ==, buflen);
708} 708}
diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c
index ab7cbd6575c4..0dd792338fa9 100644
--- a/net/sunrpc/auth_gss/gss_krb5_crypto.c
+++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c
@@ -211,8 +211,8 @@ encryptor(struct scatterlist *sg, void *data)
211 if (thislen == 0) 211 if (thislen == 0)
212 return 0; 212 return 0;
213 213
214 __sg_mark_end(&desc->infrags[desc->fragno - 1]); 214 sg_mark_end(&desc->infrags[desc->fragno - 1]);
215 __sg_mark_end(&desc->outfrags[desc->fragno - 1]); 215 sg_mark_end(&desc->outfrags[desc->fragno - 1]);
216 216
217 ret = crypto_blkcipher_encrypt_iv(&desc->desc, desc->outfrags, 217 ret = crypto_blkcipher_encrypt_iv(&desc->desc, desc->outfrags,
218 desc->infrags, thislen); 218 desc->infrags, thislen);
@@ -293,7 +293,7 @@ decryptor(struct scatterlist *sg, void *data)
293 if (thislen == 0) 293 if (thislen == 0)
294 return 0; 294 return 0;
295 295
296 __sg_mark_end(&desc->frags[desc->fragno - 1]); 296 sg_mark_end(&desc->frags[desc->fragno - 1]);
297 297
298 ret = crypto_blkcipher_decrypt_iv(&desc->desc, desc->frags, 298 ret = crypto_blkcipher_decrypt_iv(&desc->desc, desc->frags,
299 desc->frags, thislen); 299 desc->frags, thislen);
diff --git a/net/sunrpc/auth_gss/gss_krb5_seal.c b/net/sunrpc/auth_gss/gss_krb5_seal.c
index a0d9faa59cb5..1c6eda5077c1 100644
--- a/net/sunrpc/auth_gss/gss_krb5_seal.c
+++ b/net/sunrpc/auth_gss/gss_krb5_seal.c
@@ -63,7 +63,6 @@
63#include <linux/jiffies.h> 63#include <linux/jiffies.h>
64#include <linux/sunrpc/gss_krb5.h> 64#include <linux/sunrpc/gss_krb5.h>
65#include <linux/random.h> 65#include <linux/random.h>
66#include <asm/scatterlist.h>
67#include <linux/crypto.h> 66#include <linux/crypto.h>
68 67
69#ifdef RPC_DEBUG 68#ifdef RPC_DEBUG
diff --git a/net/sunrpc/auth_gss/gss_krb5_wrap.c b/net/sunrpc/auth_gss/gss_krb5_wrap.c
index 8bd074df27d3..3bdc527ee64a 100644
--- a/net/sunrpc/auth_gss/gss_krb5_wrap.c
+++ b/net/sunrpc/auth_gss/gss_krb5_wrap.c
@@ -4,7 +4,6 @@
4#include <linux/sunrpc/gss_krb5.h> 4#include <linux/sunrpc/gss_krb5.h>
5#include <linux/random.h> 5#include <linux/random.h>
6#include <linux/pagemap.h> 6#include <linux/pagemap.h>
7#include <asm/scatterlist.h>
8#include <linux/crypto.h> 7#include <linux/crypto.h>
9 8
10#ifdef RPC_DEBUG 9#ifdef RPC_DEBUG
diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c
index 0426388d351d..1686f64c4352 100644
--- a/net/xfrm/xfrm_algo.c
+++ b/net/xfrm/xfrm_algo.c
@@ -21,7 +21,6 @@
21#if defined(CONFIG_INET_ESP) || defined(CONFIG_INET_ESP_MODULE) || defined(CONFIG_INET6_ESP) || defined(CONFIG_INET6_ESP_MODULE) 21#if defined(CONFIG_INET_ESP) || defined(CONFIG_INET_ESP_MODULE) || defined(CONFIG_INET6_ESP) || defined(CONFIG_INET6_ESP_MODULE)
22#include <net/esp.h> 22#include <net/esp.h>
23#endif 23#endif
24#include <asm/scatterlist.h>
25 24
26/* 25/*
27 * Algorithms supported by IPsec. These entries contain properties which 26 * Algorithms supported by IPsec. These entries contain properties which