lkml.org 
[lkml]   [2003]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 3/9] convert net to virt_to_pageoff()
From
[3/9] convert net virt_to_pageoff().

Index: linux-2.6/net/ipv6/addrconf.c
===================================================================
RCS file: /home/cvs/linux-2.5/net/ipv6/addrconf.c,v
retrieving revision 1.48
diff -u -r1.48 addrconf.c
--- linux-2.6/net/ipv6/addrconf.c 25 Jul 2003 23:58:59 -0000 1.48
+++ linux-2.6/net/ipv6/addrconf.c 10 Aug 2003 08:40:55 -0000
@@ -1110,10 +1110,10 @@
struct scatterlist sg[2];

sg[0].page = virt_to_page(idev->entropy);
- sg[0].offset = ((long) idev->entropy & ~PAGE_MASK);
+ sg[0].offset = virt_to_pageoff(idev->entropy);
sg[0].length = 8;
sg[1].page = virt_to_page(eui64);
- sg[1].offset = ((long) eui64 & ~PAGE_MASK);
+ sg[1].offset = virt_to_pageoff(eui64);
sg[1].length = 8;

dev = idev->dev;
Index: linux-2.6/net/sunrpc/auth_gss/gss_krb5_crypto.c
===================================================================
RCS file: /home/cvs/linux-2.5/net/sunrpc/auth_gss/gss_krb5_crypto.c,v
retrieving revision 1.3
diff -u -r1.3 gss_krb5_crypto.c
--- linux-2.6/net/sunrpc/auth_gss/gss_krb5_crypto.c 4 Feb 2003 17:55:46 -0000 1.3
+++ linux-2.6/net/sunrpc/auth_gss/gss_krb5_crypto.c 10 Aug 2003 08:40:55 -0000
@@ -75,7 +75,7 @@

memcpy(out, in, length);
sg[0].page = virt_to_page(out);
- sg[0].offset = ((long)out & ~PAGE_MASK);
+ sg[0].offset = virt_to_pageoff(out);
sg[0].length = length;

ret = crypto_cipher_encrypt(tfm, sg, sg, length);
@@ -114,7 +114,7 @@

memcpy(out, in, length);
sg[0].page = virt_to_page(out);
- sg[0].offset = ((long)out & ~PAGE_MASK);
+ sg[0].offset = virt_to_pageoff(out);
sg[0].length = length;

ret = crypto_cipher_decrypt(tfm, sg, sg, length);
@@ -151,7 +151,7 @@
goto out_free_tfm;
}
sg[0].page = virt_to_page(input->data);
- sg[0].offset = ((long)input->data & ~PAGE_MASK);
+ sg[0].offset = virt_to_pageoff(input->data);
sg[0].length = input->len;

crypto_digest_init(tfm);
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.148 / U:5.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site