]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dm vdo: fix sparse 'warning: Using plain integer as NULL pointer'
authorMike Snitzer <snitzer@kernel.org>
Tue, 6 Feb 2024 02:04:17 +0000 (21:04 -0500)
committerMike Snitzer <snitzer@kernel.org>
Tue, 20 Feb 2024 18:43:18 +0000 (13:43 -0500)
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
drivers/md/dm-vdo/index.c
drivers/md/dm-vdo/vdo.c

index e343a973881d646bba547da4aa5cac9b84495eef..1596f6ba43a5a2706d0718d49986f774c77fc39e 100644 (file)
@@ -732,18 +732,18 @@ static void close_chapters(void *arg)
 
 static void stop_chapter_writer(struct chapter_writer *writer)
 {
-       struct thread *writer_thread = 0;
+       struct thread *writer_thread = NULL;
 
        uds_lock_mutex(&writer->mutex);
-       if (writer->thread != 0) {
+       if (writer->thread != NULL) {
                writer_thread = writer->thread;
-               writer->thread = 0;
+               writer->thread = NULL;
                writer->stop = true;
                uds_broadcast_cond(&writer->cond);
        }
        uds_unlock_mutex(&writer->mutex);
 
-       if (writer_thread != 0)
+       if (writer_thread != NULL)
                uds_join_threads(writer_thread);
 }
 
index 1ead769f015036cf0ebd41be31156beec35d830c..e0eddd4007b8ba0beaeb2eb1849f424a33dc5f02 100644 (file)
@@ -889,7 +889,8 @@ int vdo_synchronous_flush(struct vdo *vdo)
        int result;
        struct bio bio;
 
-       bio_init(&bio, vdo_get_backing_device(vdo), 0, 0, REQ_OP_WRITE | REQ_PREFLUSH);
+       bio_init(&bio, vdo_get_backing_device(vdo), NULL, 0,
+                REQ_OP_WRITE | REQ_PREFLUSH);
        submit_bio_wait(&bio);
        result = blk_status_to_errno(bio.bi_status);