Cleanup: lib ringbuffer: pagecpy has unsigned semantic
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 14 Apr 2014 20:06:35 +0000 (16:06 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 16 Apr 2014 21:13:19 +0000 (17:13 -0400)
Same for lib_ring_buffer_read() orig_len.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/ringbuffer/backend.h
lib/ringbuffer/backend_internal.h
lib/ringbuffer/ring_buffer_backend.c

index b11545c7c698124a72df4920f6cbcdf8a9cb8af5..aadc9c37b1d2b3f7870a2ad87f184ae736c0aafc 100644 (file)
@@ -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;
index 958328a76ad15abb3ca1e82992d659529042b61b..35b26f77190edb9d1588f9ace92866f304fe1053 100644 (file)
@@ -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);
index 8e1a796a55071abb6f388b2c9ed11cc34b7ed845..f7ed20df19869b767fd23f568c87e5831956ead2 100644 (file)
@@ -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;
 
This page took 0.028614 seconds and 4 git commands to generate.