summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2023-01-30 23:28:24 +0300
committerMike Snitzer <snitzer@kernel.org>2023-02-14 22:23:06 +0300
commit2f06cd12e11422e4a44ad4cb856c3ef0be9bd208 (patch)
treef617fefd025e8c91024fa149382106dbec21b7d0 /drivers/md
parent44bc08ed63db7a852bd1ba16611b700ee666091c (diff)
downloadlinux-2f06cd12e11422e4a44ad4cb856c3ef0be9bd208.tar.xz
dm: avoid initializing static variables
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-bufio.c2
-rw-r--r--drivers/md/dm-crypt.c2
-rw-r--r--drivers/md/dm-raid.c2
-rw-r--r--drivers/md/dm.c4
4 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
index 811ce990e72f..089a7892bd5d 100644
--- a/drivers/md/dm-bufio.c
+++ b/drivers/md/dm-bufio.c
@@ -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
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index ef97a28754cd..feb641a29679 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -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)
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index e4489f10aac2..2b2bf20e3ab3 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -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.
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index b8db3214c810..b9273c99d748 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -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);