* [PATCH 0/2] nbd: two cleanup
@ 2020-06-01 1:16 Dongli Zhang
2020-06-01 1:16 ` [PATCH 1/2] nbd: append module param and description following corresponding variables Dongli Zhang
2020-06-01 1:16 ` [PATCH 2/2] nbd: remove unused 'NBD_MAGIC' Dongli Zhang
0 siblings, 2 replies; 3+ messages in thread
From: Dongli Zhang @ 2020-06-01 1:16 UTC (permalink / raw)
To: nbd, linux-block; +Cc: josef, axboe, linux-kernel
This is just cleanup without functional change.
Thank you very much!
Dongli Zhang
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] nbd: append module param and description following corresponding variables
2020-06-01 1:16 [PATCH 0/2] nbd: two cleanup Dongli Zhang
@ 2020-06-01 1:16 ` Dongli Zhang
2020-06-01 1:16 ` [PATCH 2/2] nbd: remove unused 'NBD_MAGIC' Dongli Zhang
1 sibling, 0 replies; 3+ messages in thread
From: Dongli Zhang @ 2020-06-01 1:16 UTC (permalink / raw)
To: nbd, linux-block; +Cc: josef, axboe, linux-kernel
A lot of drivers append the module parameter and its description following
the corresponding variables (e.g., 'g_submit_queues' in null or
'admin_timeout' in nvme).
This patch would do the same for 'nbds_max' and 'max_part' in nbd driver.
This makes it much more friendly to cscope when reading the code.
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
---
drivers/block/nbd.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 43cff01a5a67..74c1363702f5 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -146,7 +146,13 @@ static struct dentry *nbd_dbg_dir;
#define NBD_DEF_BLKSIZE 1024
static unsigned int nbds_max = 16;
+module_param(nbds_max, int, 0444);
+MODULE_PARM_DESC(nbds_max, "number of network block devices to initialize (default: 16)");
+
static int max_part = 16;
+module_param(max_part, int, 0444);
+MODULE_PARM_DESC(max_part, "number of partitions per device (default: 16)");
+
static int part_shift;
static int nbd_dev_dbg_init(struct nbd_device *nbd);
@@ -2444,8 +2450,3 @@ module_exit(nbd_cleanup);
MODULE_DESCRIPTION("Network Block Device");
MODULE_LICENSE("GPL");
-
-module_param(nbds_max, int, 0444);
-MODULE_PARM_DESC(nbds_max, "number of network block devices to initialize (default: 16)");
-module_param(max_part, int, 0444);
-MODULE_PARM_DESC(max_part, "number of partitions per device (default: 16)");
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] nbd: remove unused 'NBD_MAGIC'
2020-06-01 1:16 [PATCH 0/2] nbd: two cleanup Dongli Zhang
2020-06-01 1:16 ` [PATCH 1/2] nbd: append module param and description following corresponding variables Dongli Zhang
@ 2020-06-01 1:16 ` Dongli Zhang
1 sibling, 0 replies; 3+ messages in thread
From: Dongli Zhang @ 2020-06-01 1:16 UTC (permalink / raw)
To: nbd, linux-block; +Cc: josef, axboe, linux-kernel
Remove 'NBD_MAGIC' as it is not used since commit 5ea8d10802ec ("nbd:
separate out the config information").
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
---
drivers/block/nbd.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 74c1363702f5..83435ce141a8 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -141,8 +141,6 @@ static struct dentry *nbd_dbg_dir;
#define nbd_name(nbd) ((nbd)->disk->disk_name)
-#define NBD_MAGIC 0x68797548
-
#define NBD_DEF_BLKSIZE 1024
static unsigned int nbds_max = 16;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-01 1:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-01 1:16 [PATCH 0/2] nbd: two cleanup Dongli Zhang
2020-06-01 1:16 ` [PATCH 1/2] nbd: append module param and description following corresponding variables Dongli Zhang
2020-06-01 1:16 ` [PATCH 2/2] nbd: remove unused 'NBD_MAGIC' Dongli Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).