Migrate tracepoint instrumentation to TP_FIELDS
[lttng-modules.git] / lib / ringbuffer / backend.h
index b11545c7c698124a72df4920f6cbcdf8a9cb8af5..e3a0a81afb7a5b6f8bc327dce3c3847ec0a8e0b1 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;
 
@@ -211,7 +209,7 @@ size_t lib_ring_buffer_do_strcpy_from_user_inatomic(const struct lib_ring_buffer
                int ret;
                char c;
 
-               ret = __get_user(c, &src[count]);
+               ret = __copy_from_user_inatomic(&c, src + count, 1);
                if (ret || !c)
                        break;
                lib_ring_buffer_do_copy(config, &dest[count], &c, 1);
@@ -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;
This page took 0.02287 seconds and 4 git commands to generate.