diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-04-26 04:31:28 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-04-26 04:31:28 -0400 |
commit | ef2e58ea6b9931c3a4816c66593da49bb20e3b24 (patch) | |
tree | ce7432add3becbe78de4ea06425cd2d9e91f4ada /crypto | |
parent | 06d63cc51d47f572009138a7f3ac34d95773405d (diff) | |
parent | de46c33745f5e2ad594c72f2cf5f490861b16ce1 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/scatterwalk.c | 12 | ||||
-rw-r--r-- | crypto/tcrypt.c | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c index 35172d3f043b..81afd1790a1d 100644 --- a/crypto/scatterwalk.c +++ b/crypto/scatterwalk.c | |||
@@ -59,8 +59,12 @@ EXPORT_SYMBOL_GPL(scatterwalk_map); | |||
59 | static void scatterwalk_pagedone(struct scatter_walk *walk, int out, | 59 | static void scatterwalk_pagedone(struct scatter_walk *walk, int out, |
60 | unsigned int more) | 60 | unsigned int more) |
61 | { | 61 | { |
62 | if (out) | 62 | if (out) { |
63 | flush_dcache_page(scatterwalk_page(walk)); | 63 | struct page *page; |
64 | |||
65 | page = walk->sg->page + ((walk->offset - 1) >> PAGE_SHIFT); | ||
66 | flush_dcache_page(page); | ||
67 | } | ||
64 | 68 | ||
65 | if (more) { | 69 | if (more) { |
66 | walk->offset += PAGE_SIZE - 1; | 70 | walk->offset += PAGE_SIZE - 1; |
@@ -91,6 +95,8 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk, | |||
91 | memcpy_dir(buf, vaddr, len_this_page, out); | 95 | memcpy_dir(buf, vaddr, len_this_page, out); |
92 | scatterwalk_unmap(vaddr, out); | 96 | scatterwalk_unmap(vaddr, out); |
93 | 97 | ||
98 | scatterwalk_advance(walk, len_this_page); | ||
99 | |||
94 | if (nbytes == len_this_page) | 100 | if (nbytes == len_this_page) |
95 | break; | 101 | break; |
96 | 102 | ||
@@ -99,7 +105,5 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk, | |||
99 | 105 | ||
100 | scatterwalk_pagedone(walk, out, 1); | 106 | scatterwalk_pagedone(walk, out, 1); |
101 | } | 107 | } |
102 | |||
103 | scatterwalk_advance(walk, nbytes); | ||
104 | } | 108 | } |
105 | EXPORT_SYMBOL_GPL(scatterwalk_copychunks); | 109 | EXPORT_SYMBOL_GPL(scatterwalk_copychunks); |
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index f5e9da319ece..8eaa5aa210b0 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c | |||
@@ -768,7 +768,7 @@ static void test_deflate(void) | |||
768 | tv = (void *)tvmem; | 768 | tv = (void *)tvmem; |
769 | 769 | ||
770 | tfm = crypto_alloc_comp("deflate", 0, CRYPTO_ALG_ASYNC); | 770 | tfm = crypto_alloc_comp("deflate", 0, CRYPTO_ALG_ASYNC); |
771 | if (tfm == NULL) { | 771 | if (IS_ERR(tfm)) { |
772 | printk("failed to load transform for deflate\n"); | 772 | printk("failed to load transform for deflate\n"); |
773 | return; | 773 | return; |
774 | } | 774 | } |