Skip to content

Commit ac05b7a

Browse files
sudipm-mukherjeetorvalds
authored andcommitted
kernel/relay.c: drop unneeded initialization
The variable 'consumed' is initialized with the consumed count but immediately after that the consumed count is updated and assigned to 'consumed' again thus overwriting the previous value. So, drop the unneeded initialization. Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Link: https://lkml.kernel.org/r/20201005205727.1147-1-sudipm.mukherjee@gmail.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 3f388f2 commit ac05b7a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/relay.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ static int relay_file_read_avail(struct rchan_buf *buf)
10021002
size_t subbuf_size = buf->chan->subbuf_size;
10031003
size_t n_subbufs = buf->chan->n_subbufs;
10041004
size_t produced = buf->subbufs_produced;
1005-
size_t consumed = buf->subbufs_consumed;
1005+
size_t consumed;
10061006

10071007
relay_file_read_consume(buf, 0, 0);
10081008

0 commit comments

Comments
 (0)