diff options
author | Dominique Martinet <[email protected]> | 2023-05-03 16:49:28 +0900 |
---|---|---|
committer | Eric Van Hensbergen <[email protected]> | 2023-07-20 19:14:50 +0000 |
commit | f41b402d2572e93bee85669ed05eb5e1f3725704 (patch) | |
tree | 450f96bdf470dc2286005d929296e0a854c4991b /tools/perf/scripts/python/bin/syscall-counts-record | |
parent | 4a73edab69d3a6623f03817fe950a2d9585f80e4 (diff) |
9p: virtio: skip incrementing unused variable
Fix the following scan-build warning:
net/9p/trans_virtio.c:504:3: warning: Value stored to 'in' is never read [deadcode.DeadStores]
in += pack_sg_list_p(chan->sg, out + in, VIRTQUEUE_NUM,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'm honestly not 100% sure about this one; I'm tempted to think we
could (should?) just check the return value of pack_sg_list_p to skip
the in_sgs++ and setting sgs[] if it didn't process anything, but I'm
not sure it should ever happen so this is probably fine as is.
Just removing the assignment at least makes it clear the return value
isn't used, so it's an improvement in terms of readability.
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Dominique Martinet <[email protected]>
Signed-off-by: Eric Van Hensbergen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/syscall-counts-record')
0 files changed, 0 insertions, 0 deletions