dm: avoid initializing static variables
authorHeinz Mauelshagen <heinzm@redhat.com>
Mon, 30 Jan 2023 20:28:24 +0000 (21:28 +0100)
committerMike Snitzer <snitzer@kernel.org>
Tue, 14 Feb 2023 19:23:06 +0000 (14:23 -0500)
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm-bufio.c
drivers/md/dm-crypt.c
drivers/md/dm-raid.c
drivers/md/dm.c

index 811ce990e72faf5ea06ceee4aa811a1925487b08..089a7892bd5d03b38168a4bf7c856288d3e49d0a 100644 (file)
@@ -216,7 +216,7 @@ static DEFINE_SPINLOCK(global_spinlock);
 
 static LIST_HEAD(global_queue);
 
-static unsigned long global_num = 0;
+static unsigned long global_num;
 
 /*
  * Buffers are freed after this timeout
index ef97a28754cd9127dcdc4dff8dceaa4ce8ca30b9..feb641a29679ae239d448974dc185be903bf9f07 100644 (file)
@@ -230,7 +230,7 @@ struct crypt_config {
 #define POOL_ENTRY_SIZE        512
 
 static DEFINE_SPINLOCK(dm_crypt_clients_lock);
-static unsigned int dm_crypt_clients_n = 0;
+static unsigned int dm_crypt_clients_n;
 static volatile unsigned long dm_crypt_pages_per_client;
 #define DM_CRYPT_MEMORY_PERCENT                        2
 #define DM_CRYPT_MIN_PAGES_PER_CLIENT          (BIO_MAX_VECS * 16)
index e4489f10aac2d0998b64a843e8195836f3a7ab55..2b2bf20e3ab3d0a7841d5bddd81046f7e8b41a03 100644 (file)
@@ -30,7 +30,7 @@
  */
 #define        MIN_RAID456_JOURNAL_SPACE (4*2048)
 
-static bool devices_handle_discard_safely = false;
+static bool devices_handle_discard_safely;
 
 /*
  * The following flags are used by dm-raid.c to set up the array state.
index b8db3214c8106a002c7c8136e4cf4d38050650fb..b9273c99d74890732d822292516ff281b8662973 100644 (file)
@@ -50,8 +50,8 @@
 
 static const char *_name = DM_NAME;
 
-static unsigned int major = 0;
-static unsigned int _major = 0;
+static unsigned int major;
+static unsigned int _major;
 
 static DEFINE_IDR(_minor_idr);