提交 1ea049b2 编写于 作者: J Johannes Berg 提交者: Jens Axboe

bvec: avoid variable shadowing warning

Due to the (indirect) nesting of min(..., min(...)), sparse will
show a variable shadowing warning whenever bvec.h is included.

Avoid that by assigning the inner min() to a temporary variable first.
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 005411ea
......@@ -74,7 +74,8 @@ static inline void bvec_iter_advance(const struct bio_vec *bv,
"Attempted to advance past end of bvec iter\n");
while (bytes) {
unsigned len = min(bytes, bvec_iter_len(bv, *iter));
unsigned iter_len = bvec_iter_len(bv, *iter);
unsigned len = min(bytes, iter_len);
bytes -= len;
iter->bi_size -= len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册