null_blk: Move the null_blk source files into a subdirectory
diff mbox series

Message ID 20200621204257.16006-1-bvanassche@acm.org
State New
Headers show
Series
  • null_blk: Move the null_blk source files into a subdirectory
Related show

Commit Message

Bart Van Assche June 21, 2020, 8:42 p.m. UTC
Since the number of source files of the null_blk driver keeps growing,
move these source files into a new subdirectory.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Daniel Wagner <dwagner@suse.de>
Cc: Dongli Zhang <dongli.zhang@oracle.com>
Cc: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/block/Kconfig                         | 8 +-------
 drivers/block/Makefile                        | 7 +------
 drivers/block/null_blk/Kconfig                | 9 +++++++++
 drivers/block/null_blk/Makefile               | 8 ++++++++
 drivers/block/{ => null_blk}/null_blk.h       | 0
 drivers/block/{ => null_blk}/null_blk_main.c  | 0
 drivers/block/{ => null_blk}/null_blk_trace.c | 0
 drivers/block/{ => null_blk}/null_blk_trace.h | 0
 drivers/block/{ => null_blk}/null_blk_zoned.c | 0
 9 files changed, 19 insertions(+), 13 deletions(-)
 create mode 100644 drivers/block/null_blk/Kconfig
 create mode 100644 drivers/block/null_blk/Makefile
 rename drivers/block/{ => null_blk}/null_blk.h (100%)
 rename drivers/block/{ => null_blk}/null_blk_main.c (100%)
 rename drivers/block/{ => null_blk}/null_blk_trace.c (100%)
 rename drivers/block/{ => null_blk}/null_blk_trace.h (100%)
 rename drivers/block/{ => null_blk}/null_blk_zoned.c (100%)

Comments

Damien Le Moal June 21, 2020, 11:57 p.m. UTC | #1
On 2020/06/22 5:43, Bart Van Assche wrote:
> Since the number of source files of the null_blk driver keeps growing,
> move these source files into a new subdirectory.

Makes sense.

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>

> 
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Daniel Wagner <dwagner@suse.de>
> Cc: Dongli Zhang <dongli.zhang@oracle.com>
> Cc: Damien Le Moal <damien.lemoal@wdc.com>
> Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> Cc: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  drivers/block/Kconfig                         | 8 +-------
>  drivers/block/Makefile                        | 7 +------
>  drivers/block/null_blk/Kconfig                | 9 +++++++++
>  drivers/block/null_blk/Makefile               | 8 ++++++++
>  drivers/block/{ => null_blk}/null_blk.h       | 0
>  drivers/block/{ => null_blk}/null_blk_main.c  | 0
>  drivers/block/{ => null_blk}/null_blk_trace.c | 0
>  drivers/block/{ => null_blk}/null_blk_trace.h | 0
>  drivers/block/{ => null_blk}/null_blk_zoned.c | 0
>  9 files changed, 19 insertions(+), 13 deletions(-)
>  create mode 100644 drivers/block/null_blk/Kconfig
>  create mode 100644 drivers/block/null_blk/Makefile
>  rename drivers/block/{ => null_blk}/null_blk.h (100%)
>  rename drivers/block/{ => null_blk}/null_blk_main.c (100%)
>  rename drivers/block/{ => null_blk}/null_blk_trace.c (100%)
>  rename drivers/block/{ => null_blk}/null_blk_trace.h (100%)
>  rename drivers/block/{ => null_blk}/null_blk_zoned.c (100%)
> 
> diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
> index ecceaaa1a66f..262326973ee0 100644
> --- a/drivers/block/Kconfig
> +++ b/drivers/block/Kconfig
> @@ -16,13 +16,7 @@ menuconfig BLK_DEV
>  
>  if BLK_DEV
>  
> -config BLK_DEV_NULL_BLK
> -	tristate "Null test block driver"
> -	select CONFIGFS_FS
> -
> -config BLK_DEV_NULL_BLK_FAULT_INJECTION
> -	bool "Support fault injection for Null test block driver"
> -	depends on BLK_DEV_NULL_BLK && FAULT_INJECTION
> +source "drivers/block/null_blk/Kconfig"
>  
>  config BLK_DEV_FD
>  	tristate "Normal floppy disk support"
> diff --git a/drivers/block/Makefile b/drivers/block/Makefile
> index e1f63117ee94..31bc2cfa342f 100644
> --- a/drivers/block/Makefile
> +++ b/drivers/block/Makefile
> @@ -41,12 +41,7 @@ obj-$(CONFIG_BLK_DEV_RSXX) += rsxx/
>  obj-$(CONFIG_ZRAM) += zram/
>  obj-$(CONFIG_BLK_DEV_RNBD)	+= rnbd/
>  
> -obj-$(CONFIG_BLK_DEV_NULL_BLK)	+= null_blk.o
> -null_blk-objs	:= null_blk_main.o
> -ifeq ($(CONFIG_BLK_DEV_ZONED), y)
> -null_blk-$(CONFIG_TRACING) += null_blk_trace.o
> -endif
> -null_blk-$(CONFIG_BLK_DEV_ZONED) += null_blk_zoned.o
> +obj-$(CONFIG_BLK_DEV)		+= null_blk/
>  
>  skd-y		:= skd_main.o
>  swim_mod-y	:= swim.o swim_asm.o
> diff --git a/drivers/block/null_blk/Kconfig b/drivers/block/null_blk/Kconfig
> new file mode 100644
> index 000000000000..1ce02a3572bd
> --- /dev/null
> +++ b/drivers/block/null_blk/Kconfig
> @@ -0,0 +1,9 @@
> +# SPDX-License-Identifier: GPL-2.0
> +
> +config BLK_DEV_NULL_BLK
> +	tristate "Null test block driver"
> +	select CONFIGFS_FS
> +
> +config BLK_DEV_NULL_BLK_FAULT_INJECTION
> +	bool "Support fault injection for Null test block driver"
> +	depends on BLK_DEV_NULL_BLK && FAULT_INJECTION
> diff --git a/drivers/block/null_blk/Makefile b/drivers/block/null_blk/Makefile
> new file mode 100644
> index 000000000000..a93a16d5ba23
> --- /dev/null
> +++ b/drivers/block/null_blk/Makefile
> @@ -0,0 +1,8 @@
> +# SPDX-License-Identifier: GPL-2.0
> +
> +obj-$(CONFIG_BLK_DEV_NULL_BLK)	+= null_blk.o
> +null_blk-objs			:= null_blk_main.o
> +ifeq ($(CONFIG_BLK_DEV_ZONED), y)
> +null_blk-$(CONFIG_TRACING)	+= null_blk_trace.o
> +endif
> +null_blk-$(CONFIG_BLK_DEV_ZONED) += null_blk_zoned.o
> diff --git a/drivers/block/null_blk.h b/drivers/block/null_blk/null_blk.h
> similarity index 100%
> rename from drivers/block/null_blk.h
> rename to drivers/block/null_blk/null_blk.h
> diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk/null_blk_main.c
> similarity index 100%
> rename from drivers/block/null_blk_main.c
> rename to drivers/block/null_blk/null_blk_main.c
> diff --git a/drivers/block/null_blk_trace.c b/drivers/block/null_blk/null_blk_trace.c
> similarity index 100%
> rename from drivers/block/null_blk_trace.c
> rename to drivers/block/null_blk/null_blk_trace.c
> diff --git a/drivers/block/null_blk_trace.h b/drivers/block/null_blk/null_blk_trace.h
> similarity index 100%
> rename from drivers/block/null_blk_trace.h
> rename to drivers/block/null_blk/null_blk_trace.h
> diff --git a/drivers/block/null_blk_zoned.c b/drivers/block/null_blk/null_blk_zoned.c
> similarity index 100%
> rename from drivers/block/null_blk_zoned.c
> rename to drivers/block/null_blk/null_blk_zoned.c
>
Jens Axboe June 22, 2020, 3:03 a.m. UTC | #2
On 6/21/20 2:42 PM, Bart Van Assche wrote:
> Since the number of source files of the null_blk driver keeps growing,
> move these source files into a new subdirectory.
> 
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Daniel Wagner <dwagner@suse.de>
> Cc: Dongli Zhang <dongli.zhang@oracle.com>
> Cc: Damien Le Moal <damien.lemoal@wdc.com>
> Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> Cc: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  drivers/block/Kconfig                         | 8 +-------
>  drivers/block/Makefile                        | 7 +------
>  drivers/block/null_blk/Kconfig                | 9 +++++++++
>  drivers/block/null_blk/Makefile               | 8 ++++++++
>  drivers/block/{ => null_blk}/null_blk.h       | 0
>  drivers/block/{ => null_blk}/null_blk_main.c  | 0
>  drivers/block/{ => null_blk}/null_blk_trace.c | 0
>  drivers/block/{ => null_blk}/null_blk_trace.h | 0
>  drivers/block/{ => null_blk}/null_blk_zoned.c | 0
>  9 files changed, 19 insertions(+), 13 deletions(-)
>  create mode 100644 drivers/block/null_blk/Kconfig
>  create mode 100644 drivers/block/null_blk/Makefile
>  rename drivers/block/{ => null_blk}/null_blk.h (100%)
>  rename drivers/block/{ => null_blk}/null_blk_main.c (100%)
>  rename drivers/block/{ => null_blk}/null_blk_trace.c (100%)
>  rename drivers/block/{ => null_blk}/null_blk_trace.h (100%)
>  rename drivers/block/{ => null_blk}/null_blk_zoned.c (100%)

I'm all for this since, but why not name them null_blk/main.c etc?  A
bit annoying/redundant to have them be drivers/block/null_blk/null_main.c
and so forth.

Probably have null_blk.h be the exception.
Johannes Thumshirn June 22, 2020, 7:03 a.m. UTC | #3
With the name change that Jens requested,
Reviewed-by: Johannes Thumshirn <johannes.thunshirn@wdc.com>

Patch
diff mbox series

diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index ecceaaa1a66f..262326973ee0 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -16,13 +16,7 @@  menuconfig BLK_DEV
 
 if BLK_DEV
 
-config BLK_DEV_NULL_BLK
-	tristate "Null test block driver"
-	select CONFIGFS_FS
-
-config BLK_DEV_NULL_BLK_FAULT_INJECTION
-	bool "Support fault injection for Null test block driver"
-	depends on BLK_DEV_NULL_BLK && FAULT_INJECTION
+source "drivers/block/null_blk/Kconfig"
 
 config BLK_DEV_FD
 	tristate "Normal floppy disk support"
diff --git a/drivers/block/Makefile b/drivers/block/Makefile
index e1f63117ee94..31bc2cfa342f 100644
--- a/drivers/block/Makefile
+++ b/drivers/block/Makefile
@@ -41,12 +41,7 @@  obj-$(CONFIG_BLK_DEV_RSXX) += rsxx/
 obj-$(CONFIG_ZRAM) += zram/
 obj-$(CONFIG_BLK_DEV_RNBD)	+= rnbd/
 
-obj-$(CONFIG_BLK_DEV_NULL_BLK)	+= null_blk.o
-null_blk-objs	:= null_blk_main.o
-ifeq ($(CONFIG_BLK_DEV_ZONED), y)
-null_blk-$(CONFIG_TRACING) += null_blk_trace.o
-endif
-null_blk-$(CONFIG_BLK_DEV_ZONED) += null_blk_zoned.o
+obj-$(CONFIG_BLK_DEV)		+= null_blk/
 
 skd-y		:= skd_main.o
 swim_mod-y	:= swim.o swim_asm.o
diff --git a/drivers/block/null_blk/Kconfig b/drivers/block/null_blk/Kconfig
new file mode 100644
index 000000000000..1ce02a3572bd
--- /dev/null
+++ b/drivers/block/null_blk/Kconfig
@@ -0,0 +1,9 @@ 
+# SPDX-License-Identifier: GPL-2.0
+
+config BLK_DEV_NULL_BLK
+	tristate "Null test block driver"
+	select CONFIGFS_FS
+
+config BLK_DEV_NULL_BLK_FAULT_INJECTION
+	bool "Support fault injection for Null test block driver"
+	depends on BLK_DEV_NULL_BLK && FAULT_INJECTION
diff --git a/drivers/block/null_blk/Makefile b/drivers/block/null_blk/Makefile
new file mode 100644
index 000000000000..a93a16d5ba23
--- /dev/null
+++ b/drivers/block/null_blk/Makefile
@@ -0,0 +1,8 @@ 
+# SPDX-License-Identifier: GPL-2.0
+
+obj-$(CONFIG_BLK_DEV_NULL_BLK)	+= null_blk.o
+null_blk-objs			:= null_blk_main.o
+ifeq ($(CONFIG_BLK_DEV_ZONED), y)
+null_blk-$(CONFIG_TRACING)	+= null_blk_trace.o
+endif
+null_blk-$(CONFIG_BLK_DEV_ZONED) += null_blk_zoned.o
diff --git a/drivers/block/null_blk.h b/drivers/block/null_blk/null_blk.h
similarity index 100%
rename from drivers/block/null_blk.h
rename to drivers/block/null_blk/null_blk.h
diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk/null_blk_main.c
similarity index 100%
rename from drivers/block/null_blk_main.c
rename to drivers/block/null_blk/null_blk_main.c
diff --git a/drivers/block/null_blk_trace.c b/drivers/block/null_blk/null_blk_trace.c
similarity index 100%
rename from drivers/block/null_blk_trace.c
rename to drivers/block/null_blk/null_blk_trace.c
diff --git a/drivers/block/null_blk_trace.h b/drivers/block/null_blk/null_blk_trace.h
similarity index 100%
rename from drivers/block/null_blk_trace.h
rename to drivers/block/null_blk/null_blk_trace.h
diff --git a/drivers/block/null_blk_zoned.c b/drivers/block/null_blk/null_blk_zoned.c
similarity index 100%
rename from drivers/block/null_blk_zoned.c
rename to drivers/block/null_blk/null_blk_zoned.c