From: Mathieu Desnoyers Date: Mon, 14 Apr 2014 20:06:35 +0000 (-0400) Subject: Cleanup: lib ringbuffer: pagecpy has unsigned semantic X-Git-Tag: v2.5.0-rc1~8 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=bfe529f90b1354246b5d8a18f49e30595c612041;p=lttng-modules.git Cleanup: lib ringbuffer: pagecpy has unsigned semantic Same for lib_ring_buffer_read() orig_len. Signed-off-by: Mathieu Desnoyers --- diff --git a/lib/ringbuffer/backend.h b/lib/ringbuffer/backend.h index b11545c7..aadc9c37 100644 --- a/lib/ringbuffer/backend.h +++ b/lib/ringbuffer/backend.h @@ -90,9 +90,8 @@ void lib_ring_buffer_write(const struct lib_ring_buffer_config *config, { struct lib_ring_buffer_backend *bufb = &ctx->buf->backend; struct channel_backend *chanb = &ctx->chan->backend; - size_t sbidx, index; + size_t sbidx, index, pagecpy; size_t offset = ctx->buf_offset; - ssize_t pagecpy; struct lib_ring_buffer_backend_pages *rpages; unsigned long sb_bindex, id; @@ -138,9 +137,8 @@ void lib_ring_buffer_memset(const struct lib_ring_buffer_config *config, struct lib_ring_buffer_backend *bufb = &ctx->buf->backend; struct channel_backend *chanb = &ctx->chan->backend; - size_t sbidx, index; + size_t sbidx, index, pagecpy; size_t offset = ctx->buf_offset; - ssize_t pagecpy; struct lib_ring_buffer_backend_pages *rpages; unsigned long sb_bindex, id; @@ -306,9 +304,8 @@ void lib_ring_buffer_copy_from_user_inatomic(const struct lib_ring_buffer_config { struct lib_ring_buffer_backend *bufb = &ctx->buf->backend; struct channel_backend *chanb = &ctx->chan->backend; - size_t sbidx, index; + size_t sbidx, index, pagecpy; size_t offset = ctx->buf_offset; - ssize_t pagecpy; struct lib_ring_buffer_backend_pages *rpages; unsigned long sb_bindex, id; unsigned long ret; diff --git a/lib/ringbuffer/backend_internal.h b/lib/ringbuffer/backend_internal.h index 958328a7..35b26f77 100644 --- a/lib/ringbuffer/backend_internal.h +++ b/lib/ringbuffer/backend_internal.h @@ -52,16 +52,16 @@ void lib_ring_buffer_backend_exit(void); extern void _lib_ring_buffer_write(struct lib_ring_buffer_backend *bufb, size_t offset, const void *src, size_t len, - ssize_t pagecpy); + size_t pagecpy); extern void _lib_ring_buffer_memset(struct lib_ring_buffer_backend *bufb, size_t offset, int c, size_t len, - ssize_t pagecpy); + size_t pagecpy); extern void _lib_ring_buffer_strcpy(struct lib_ring_buffer_backend *bufb, size_t offset, const char *src, size_t len, size_t pagecpy, int pad); extern void _lib_ring_buffer_copy_from_user_inatomic(struct lib_ring_buffer_backend *bufb, size_t offset, const void *src, - size_t len, ssize_t pagecpy); + size_t len, size_t pagecpy); extern void _lib_ring_buffer_strcpy_from_user_inatomic(struct lib_ring_buffer_backend *bufb, size_t offset, const char __user *src, size_t len, size_t pagecpy, int pad); diff --git a/lib/ringbuffer/ring_buffer_backend.c b/lib/ringbuffer/ring_buffer_backend.c index 8e1a796a..f7ed20df 100644 --- a/lib/ringbuffer/ring_buffer_backend.c +++ b/lib/ringbuffer/ring_buffer_backend.c @@ -478,7 +478,7 @@ void channel_backend_free(struct channel_backend *chanb) * @pagecpy : page size copied so far */ void _lib_ring_buffer_write(struct lib_ring_buffer_backend *bufb, size_t offset, - const void *src, size_t len, ssize_t pagecpy) + const void *src, size_t len, size_t pagecpy) { struct channel_backend *chanb = &bufb->chan->backend; const struct lib_ring_buffer_config *config = &chanb->config; @@ -524,7 +524,7 @@ EXPORT_SYMBOL_GPL(_lib_ring_buffer_write); */ void _lib_ring_buffer_memset(struct lib_ring_buffer_backend *bufb, size_t offset, - int c, size_t len, ssize_t pagecpy) + int c, size_t len, size_t pagecpy) { struct channel_backend *chanb = &bufb->chan->backend; const struct lib_ring_buffer_config *config = &chanb->config; @@ -654,7 +654,7 @@ EXPORT_SYMBOL_GPL(_lib_ring_buffer_strcpy); void _lib_ring_buffer_copy_from_user_inatomic(struct lib_ring_buffer_backend *bufb, size_t offset, const void __user *src, size_t len, - ssize_t pagecpy) + size_t pagecpy) { struct channel_backend *chanb = &bufb->chan->backend; const struct lib_ring_buffer_config *config = &chanb->config; @@ -795,8 +795,7 @@ size_t lib_ring_buffer_read(struct lib_ring_buffer_backend *bufb, size_t offset, { struct channel_backend *chanb = &bufb->chan->backend; const struct lib_ring_buffer_config *config = &chanb->config; - size_t index; - ssize_t pagecpy, orig_len; + size_t index, pagecpy, orig_len; struct lib_ring_buffer_backend_pages *rpages; unsigned long sb_bindex, id;