提交 4de17aea 编写于 作者: Y YueHaibing 提交者: Ilya Dryomov

crush: fix using plain integer as NULL warning

Fixes the following sparse warnings:

net/ceph/crush/mapper.c:517:76: warning: Using plain integer as NULL pointer
net/ceph/crush/mapper.c:728:68: warning: Using plain integer as NULL pointer
Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
Reviewed-by: NIlya Dryomov <idryomov@gmail.com>
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
上级 bad87216
...@@ -514,7 +514,7 @@ static int crush_choose_firstn(const struct crush_map *map, ...@@ -514,7 +514,7 @@ static int crush_choose_firstn(const struct crush_map *map,
in, work->work[-1-in->id], in, work->work[-1-in->id],
x, r, x, r,
(choose_args ? (choose_args ?
&choose_args[-1-in->id] : 0), &choose_args[-1-in->id] : NULL),
outpos); outpos);
if (item >= map->max_devices) { if (item >= map->max_devices) {
dprintk(" bad item %d\n", item); dprintk(" bad item %d\n", item);
...@@ -725,7 +725,7 @@ static void crush_choose_indep(const struct crush_map *map, ...@@ -725,7 +725,7 @@ static void crush_choose_indep(const struct crush_map *map,
in, work->work[-1-in->id], in, work->work[-1-in->id],
x, r, x, r,
(choose_args ? (choose_args ?
&choose_args[-1-in->id] : 0), &choose_args[-1-in->id] : NULL),
outpos); outpos);
if (item >= map->max_devices) { if (item >= map->max_devices) {
dprintk(" bad item %d\n", item); dprintk(" bad item %d\n", item);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册