Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: scatterwalk - remove obsolete functions

Remove various functions that are no longer used.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Eric Biggers and committed by
Herbert Xu
fa94e454 95dbd711

-62
-37
crypto/scatterwalk.c
··· 30 30 } 31 31 EXPORT_SYMBOL_GPL(scatterwalk_skip); 32 32 33 - static inline void memcpy_dir(void *buf, void *sgdata, size_t nbytes, int out) 34 - { 35 - void *src = out ? buf : sgdata; 36 - void *dst = out ? sgdata : buf; 37 - 38 - memcpy(dst, src, nbytes); 39 - } 40 - 41 - void scatterwalk_copychunks(void *buf, struct scatter_walk *walk, 42 - size_t nbytes, int out) 43 - { 44 - for (;;) { 45 - unsigned int len_this_page = scatterwalk_pagelen(walk); 46 - u8 *vaddr; 47 - 48 - if (len_this_page > nbytes) 49 - len_this_page = nbytes; 50 - 51 - if (out != 2) { 52 - vaddr = scatterwalk_map(walk); 53 - memcpy_dir(buf, vaddr, len_this_page, out); 54 - scatterwalk_unmap(vaddr); 55 - } 56 - 57 - scatterwalk_advance(walk, len_this_page); 58 - 59 - if (nbytes == len_this_page) 60 - break; 61 - 62 - buf += len_this_page; 63 - nbytes -= len_this_page; 64 - 65 - scatterwalk_pagedone(walk, out & 1, 1); 66 - } 67 - } 68 - EXPORT_SYMBOL_GPL(scatterwalk_copychunks); 69 - 70 33 inline void memcpy_from_scatterwalk(void *buf, struct scatter_walk *walk, 71 34 unsigned int nbytes) 72 35 {
-25
include/crypto/scatterwalk.h
··· 115 115 return scatterwalk_map(walk); 116 116 } 117 117 118 - static inline void scatterwalk_pagedone(struct scatter_walk *walk, int out, 119 - unsigned int more) 120 - { 121 - if (out) { 122 - struct page *page; 123 - 124 - page = sg_page(walk->sg) + ((walk->offset - 1) >> PAGE_SHIFT); 125 - flush_dcache_page(page); 126 - } 127 - 128 - if (more && walk->offset >= walk->sg->offset + walk->sg->length) 129 - scatterwalk_start(walk, sg_next(walk->sg)); 130 - } 131 - 132 - static inline void scatterwalk_done(struct scatter_walk *walk, int out, 133 - int more) 134 - { 135 - if (!more || walk->offset >= walk->sg->offset + walk->sg->length || 136 - !(walk->offset & (PAGE_SIZE - 1))) 137 - scatterwalk_pagedone(walk, out, more); 138 - } 139 - 140 118 static inline void scatterwalk_advance(struct scatter_walk *walk, 141 119 unsigned int nbytes) 142 120 { ··· 161 183 } 162 184 163 185 void scatterwalk_skip(struct scatter_walk *walk, unsigned int nbytes); 164 - 165 - void scatterwalk_copychunks(void *buf, struct scatter_walk *walk, 166 - size_t nbytes, int out); 167 186 168 187 void memcpy_from_scatterwalk(void *buf, struct scatter_walk *walk, 169 188 unsigned int nbytes);