diff options
author | David Hardeman <david@2gen.com> | 2005-09-17 03:55:31 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2005-10-29 20:19:43 -0400 |
commit | 378f058cc49bcda7fa63d3cd86d2f9a0a5188b1c (patch) | |
tree | ed99548aa459054c7b046f0ac96af2cc50683e6e /net/ipv6/addrconf.c | |
parent | d32311fed70d12f14e585feb4653571b1e2b0e6d (diff) |
[PATCH] Use sg_set_buf/sg_init_one where applicable
This patch uses sg_set_buf/sg_init_one in some places where it was
duplicated.
Signed-off-by: David Hardeman <david@2gen.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Greg KH <greg@kroah.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index a970b4727ce8..41edc14851e8 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -75,7 +75,7 @@ | |||
75 | #ifdef CONFIG_IPV6_PRIVACY | 75 | #ifdef CONFIG_IPV6_PRIVACY |
76 | #include <linux/random.h> | 76 | #include <linux/random.h> |
77 | #include <linux/crypto.h> | 77 | #include <linux/crypto.h> |
78 | #include <asm/scatterlist.h> | 78 | #include <linux/scatterlist.h> |
79 | #endif | 79 | #endif |
80 | 80 | ||
81 | #include <asm/uaccess.h> | 81 | #include <asm/uaccess.h> |
@@ -1217,12 +1217,8 @@ static int __ipv6_regen_rndid(struct inet6_dev *idev) | |||
1217 | struct net_device *dev; | 1217 | struct net_device *dev; |
1218 | struct scatterlist sg[2]; | 1218 | struct scatterlist sg[2]; |
1219 | 1219 | ||
1220 | sg[0].page = virt_to_page(idev->entropy); | 1220 | sg_set_buf(&sg[0], idev->entropy, 8); |
1221 | sg[0].offset = offset_in_page(idev->entropy); | 1221 | sg_set_buf(&sg[1], idev->work_eui64, 8); |
1222 | sg[0].length = 8; | ||
1223 | sg[1].page = virt_to_page(idev->work_eui64); | ||
1224 | sg[1].offset = offset_in_page(idev->work_eui64); | ||
1225 | sg[1].length = 8; | ||
1226 | 1222 | ||
1227 | dev = idev->dev; | 1223 | dev = idev->dev; |
1228 | 1224 | ||