projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove warnings
[lttng-modules.git]
/
lib
/
ringbuffer
/
ring_buffer_backend.c
diff --git
a/lib/ringbuffer/ring_buffer_backend.c
b/lib/ringbuffer/ring_buffer_backend.c
index 2ddb9f991bc9cc763e9008c8237683ba38edb542..a9513d1c07e3072fc9e6f6dcd5418554a1af8255 100644
(file)
--- a/
lib/ringbuffer/ring_buffer_backend.c
+++ b/
lib/ringbuffer/ring_buffer_backend.c
@@
-311,7
+311,8
@@
int channel_backend_init(struct channel_backend *chanb,
return -EPERM;
/* Check that the subbuffer size is larger than a page. */
return -EPERM;
/* Check that the subbuffer size is larger than a page. */
- CHAN_WARN_ON(chanb, subbuf_size < PAGE_SIZE);
+ if (subbuf_size < PAGE_SIZE)
+ return -EINVAL;
/*
* Make sure the number of subbuffers and subbuffer size are power of 2.
/*
* Make sure the number of subbuffers and subbuffer size are power of 2.
@@
-568,11
+569,10
@@
int __lib_ring_buffer_copy_to_user(struct lib_ring_buffer_backend *bufb,
struct channel_backend *chanb = &bufb->chan->backend;
const struct lib_ring_buffer_config *config = chanb->config;
size_t index;
struct channel_backend *chanb = &bufb->chan->backend;
const struct lib_ring_buffer_config *config = chanb->config;
size_t index;
- ssize_t pagecpy
, orig_len
;
+ ssize_t pagecpy;
struct lib_ring_buffer_backend_pages *rpages;
unsigned long sb_bindex, id;
struct lib_ring_buffer_backend_pages *rpages;
unsigned long sb_bindex, id;
- orig_len = len;
offset &= chanb->buf_size - 1;
index = (offset & (chanb->subbuf_size - 1)) >> PAGE_SHIFT;
if (unlikely(!len))
offset &= chanb->buf_size - 1;
index = (offset & (chanb->subbuf_size - 1)) >> PAGE_SHIFT;
if (unlikely(!len))
This page took
0.023483 seconds
and
4
git commands to generate.