Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
36f7a8a4
Commit
36f7a8a4
authored
Dec 06, 2015
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iov_iter: constify {csum_and_,}copy_to_iter()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
527e9316
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
include/linux/uio.h
include/linux/uio.h
+2
-2
lib/iov_iter.c
lib/iov_iter.c
+5
-5
No files found.
include/linux/uio.h
View file @
36f7a8a4
...
@@ -82,7 +82,7 @@ size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes,
...
@@ -82,7 +82,7 @@ size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes,
struct
iov_iter
*
i
);
struct
iov_iter
*
i
);
size_t
copy_page_from_iter
(
struct
page
*
page
,
size_t
offset
,
size_t
bytes
,
size_t
copy_page_from_iter
(
struct
page
*
page
,
size_t
offset
,
size_t
bytes
,
struct
iov_iter
*
i
);
struct
iov_iter
*
i
);
size_t
copy_to_iter
(
void
*
addr
,
size_t
bytes
,
struct
iov_iter
*
i
);
size_t
copy_to_iter
(
const
void
*
addr
,
size_t
bytes
,
struct
iov_iter
*
i
);
size_t
copy_from_iter
(
void
*
addr
,
size_t
bytes
,
struct
iov_iter
*
i
);
size_t
copy_from_iter
(
void
*
addr
,
size_t
bytes
,
struct
iov_iter
*
i
);
size_t
copy_from_iter_nocache
(
void
*
addr
,
size_t
bytes
,
struct
iov_iter
*
i
);
size_t
copy_from_iter_nocache
(
void
*
addr
,
size_t
bytes
,
struct
iov_iter
*
i
);
size_t
iov_iter_zero
(
size_t
bytes
,
struct
iov_iter
*
);
size_t
iov_iter_zero
(
size_t
bytes
,
struct
iov_iter
*
);
...
@@ -145,7 +145,7 @@ static inline void iov_iter_reexpand(struct iov_iter *i, size_t count)
...
@@ -145,7 +145,7 @@ static inline void iov_iter_reexpand(struct iov_iter *i, size_t count)
{
{
i
->
count
=
count
;
i
->
count
=
count
;
}
}
size_t
csum_and_copy_to_iter
(
void
*
addr
,
size_t
bytes
,
__wsum
*
csum
,
struct
iov_iter
*
i
);
size_t
csum_and_copy_to_iter
(
const
void
*
addr
,
size_t
bytes
,
__wsum
*
csum
,
struct
iov_iter
*
i
);
size_t
csum_and_copy_from_iter
(
void
*
addr
,
size_t
bytes
,
__wsum
*
csum
,
struct
iov_iter
*
i
);
size_t
csum_and_copy_from_iter
(
void
*
addr
,
size_t
bytes
,
__wsum
*
csum
,
struct
iov_iter
*
i
);
int
import_iovec
(
int
type
,
const
struct
iovec
__user
*
uvector
,
int
import_iovec
(
int
type
,
const
struct
iovec
__user
*
uvector
,
...
...
lib/iov_iter.c
View file @
36f7a8a4
...
@@ -369,7 +369,7 @@ static void memcpy_from_page(char *to, struct page *page, size_t offset, size_t
...
@@ -369,7 +369,7 @@ static void memcpy_from_page(char *to, struct page *page, size_t offset, size_t
kunmap_atomic
(
from
);
kunmap_atomic
(
from
);
}
}
static
void
memcpy_to_page
(
struct
page
*
page
,
size_t
offset
,
char
*
from
,
size_t
len
)
static
void
memcpy_to_page
(
struct
page
*
page
,
size_t
offset
,
c
onst
c
har
*
from
,
size_t
len
)
{
{
char
*
to
=
kmap_atomic
(
page
);
char
*
to
=
kmap_atomic
(
page
);
memcpy
(
to
+
offset
,
from
,
len
);
memcpy
(
to
+
offset
,
from
,
len
);
...
@@ -383,9 +383,9 @@ static void memzero_page(struct page *page, size_t offset, size_t len)
...
@@ -383,9 +383,9 @@ static void memzero_page(struct page *page, size_t offset, size_t len)
kunmap_atomic
(
addr
);
kunmap_atomic
(
addr
);
}
}
size_t
copy_to_iter
(
void
*
addr
,
size_t
bytes
,
struct
iov_iter
*
i
)
size_t
copy_to_iter
(
const
void
*
addr
,
size_t
bytes
,
struct
iov_iter
*
i
)
{
{
char
*
from
=
addr
;
c
onst
c
har
*
from
=
addr
;
if
(
unlikely
(
bytes
>
i
->
count
))
if
(
unlikely
(
bytes
>
i
->
count
))
bytes
=
i
->
count
;
bytes
=
i
->
count
;
...
@@ -704,10 +704,10 @@ size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum,
...
@@ -704,10 +704,10 @@ size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum,
}
}
EXPORT_SYMBOL
(
csum_and_copy_from_iter
);
EXPORT_SYMBOL
(
csum_and_copy_from_iter
);
size_t
csum_and_copy_to_iter
(
void
*
addr
,
size_t
bytes
,
__wsum
*
csum
,
size_t
csum_and_copy_to_iter
(
const
void
*
addr
,
size_t
bytes
,
__wsum
*
csum
,
struct
iov_iter
*
i
)
struct
iov_iter
*
i
)
{
{
char
*
from
=
addr
;
c
onst
c
har
*
from
=
addr
;
__wsum
sum
,
next
;
__wsum
sum
,
next
;
size_t
off
=
0
;
size_t
off
=
0
;
if
(
unlikely
(
bytes
>
i
->
count
))
if
(
unlikely
(
bytes
>
i
->
count
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment