diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-08-08 07:52:57 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-08-13 11:55:44 -0400 |
commit | 4de17aea5ceffe6d8350fde9d903a02037b221c6 (patch) | |
tree | 6004243239134b6a5d0adad3e3753f551b539460 | |
parent | bad87216fb8426302cd53a5fcfdd45c3a5d54383 (diff) |
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: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r-- | net/ceph/crush/mapper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ceph/crush/mapper.c b/net/ceph/crush/mapper.c index 417df675c71b..3f323ed9df52 100644 --- a/net/ceph/crush/mapper.c +++ b/net/ceph/crush/mapper.c | |||
@@ -514,7 +514,7 @@ static int crush_choose_firstn(const struct crush_map *map, | |||
514 | in, work->work[-1-in->id], | 514 | in, work->work[-1-in->id], |
515 | x, r, | 515 | x, r, |
516 | (choose_args ? | 516 | (choose_args ? |
517 | &choose_args[-1-in->id] : 0), | 517 | &choose_args[-1-in->id] : NULL), |
518 | outpos); | 518 | outpos); |
519 | if (item >= map->max_devices) { | 519 | if (item >= map->max_devices) { |
520 | dprintk(" bad item %d\n", item); | 520 | dprintk(" bad item %d\n", item); |
@@ -725,7 +725,7 @@ static void crush_choose_indep(const struct crush_map *map, | |||
725 | in, work->work[-1-in->id], | 725 | in, work->work[-1-in->id], |
726 | x, r, | 726 | x, r, |
727 | (choose_args ? | 727 | (choose_args ? |
728 | &choose_args[-1-in->id] : 0), | 728 | &choose_args[-1-in->id] : NULL), |
729 | outpos); | 729 | outpos); |
730 | if (item >= map->max_devices) { | 730 | if (item >= map->max_devices) { |
731 | dprintk(" bad item %d\n", item); | 731 | dprintk(" bad item %d\n", item); |