diff options
author | Alex Elder <elder@inktank.com> | 2013-02-06 14:11:38 -0500 |
---|---|---|
committer | Alex Elder <elder@inktank.com> | 2013-02-19 20:14:05 -0500 |
commit | 903bb32e890237ca43ab847e561e5377cfe0fdb3 (patch) | |
tree | a2327dd33fe66cd73b30e298b91829b28a05ea7c /net/ceph | |
parent | 23ed6e13b320b33decb516cbe66e71b132df488d (diff) |
libceph: drop return value from page vector copy routines
The return values provided for ceph_copy_to_page_vector() and
ceph_copy_from_page_vector() serve no purpose, so get rid of them.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'net/ceph')
-rw-r--r-- | net/ceph/pagevec.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/net/ceph/pagevec.c b/net/ceph/pagevec.c index 5b20be979c19..815a2249cfa9 100644 --- a/net/ceph/pagevec.c +++ b/net/ceph/pagevec.c | |||
@@ -118,17 +118,17 @@ int ceph_copy_user_to_page_vector(struct page **pages, | |||
118 | } | 118 | } |
119 | EXPORT_SYMBOL(ceph_copy_user_to_page_vector); | 119 | EXPORT_SYMBOL(ceph_copy_user_to_page_vector); |
120 | 120 | ||
121 | int ceph_copy_to_page_vector(struct page **pages, | 121 | void ceph_copy_to_page_vector(struct page **pages, |
122 | const void *data, | 122 | const void *data, |
123 | loff_t off, size_t len) | 123 | loff_t off, size_t len) |
124 | { | 124 | { |
125 | int i = 0; | 125 | int i = 0; |
126 | size_t po = off & ~PAGE_CACHE_MASK; | 126 | size_t po = off & ~PAGE_CACHE_MASK; |
127 | size_t left = len; | 127 | size_t left = len; |
128 | size_t l; | ||
129 | 128 | ||
130 | while (left > 0) { | 129 | while (left > 0) { |
131 | l = min_t(size_t, PAGE_CACHE_SIZE-po, left); | 130 | size_t l = min_t(size_t, PAGE_CACHE_SIZE-po, left); |
131 | |||
132 | memcpy(page_address(pages[i]) + po, data, l); | 132 | memcpy(page_address(pages[i]) + po, data, l); |
133 | data += l; | 133 | data += l; |
134 | left -= l; | 134 | left -= l; |
@@ -138,21 +138,20 @@ int ceph_copy_to_page_vector(struct page **pages, | |||
138 | i++; | 138 | i++; |
139 | } | 139 | } |
140 | } | 140 | } |
141 | return len; | ||
142 | } | 141 | } |
143 | EXPORT_SYMBOL(ceph_copy_to_page_vector); | 142 | EXPORT_SYMBOL(ceph_copy_to_page_vector); |
144 | 143 | ||
145 | int ceph_copy_from_page_vector(struct page **pages, | 144 | void ceph_copy_from_page_vector(struct page **pages, |
146 | void *data, | 145 | void *data, |
147 | loff_t off, size_t len) | 146 | loff_t off, size_t len) |
148 | { | 147 | { |
149 | int i = 0; | 148 | int i = 0; |
150 | size_t po = off & ~PAGE_CACHE_MASK; | 149 | size_t po = off & ~PAGE_CACHE_MASK; |
151 | size_t left = len; | 150 | size_t left = len; |
152 | size_t l; | ||
153 | 151 | ||
154 | while (left > 0) { | 152 | while (left > 0) { |
155 | l = min_t(size_t, PAGE_CACHE_SIZE-po, left); | 153 | size_t l = min_t(size_t, PAGE_CACHE_SIZE-po, left); |
154 | |||
156 | memcpy(data, page_address(pages[i]) + po, l); | 155 | memcpy(data, page_address(pages[i]) + po, l); |
157 | data += l; | 156 | data += l; |
158 | left -= l; | 157 | left -= l; |
@@ -162,7 +161,6 @@ int ceph_copy_from_page_vector(struct page **pages, | |||
162 | i++; | 161 | i++; |
163 | } | 162 | } |
164 | } | 163 | } |
165 | return len; | ||
166 | } | 164 | } |
167 | EXPORT_SYMBOL(ceph_copy_from_page_vector); | 165 | EXPORT_SYMBOL(ceph_copy_from_page_vector); |
168 | 166 | ||