10 #include <linux/kernel.h>
11 #include <linux/module.h>
42 }
while (sg_dwiter_next(miter));
48 static inline bool needs_unaligned_copy(
const void *
ptr)
50 #ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
53 return ((ptr -
NULL) & 3) != 0;
61 if (sg_dwiter_is_at_end(miter))
66 if (
likely(len >= 4 && !needs_unaligned_copy(
97 if (
likely(sg_dwiter_get_next_block(miter, &ptr)))
98 return ptr ? *ptr : 0;
100 return sg_dwiter_read_buffer(miter);
106 size_t len, left = 4;
117 }
while (sg_dwiter_next(miter));
137 if (
likely(sg_dwiter_get_next_block(miter, &ptr))) {
143 sg_dwiter_write_slow(miter, data);