Message ID | 20201109125105.551734-7-damien.lemoal@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/6] null_blk: Fix zone size initialization | expand |
On 11/9/20 4:51 AM, Damien Le Moal wrote: > Move null_blk driver code into the new sub-directory > drivers/block/null_blk. Is this perhaps something that has been proposed before (see also https://lore.kernel.org/linux-block/20200621204257.16006-1-bvanassche@acm.org/)? Please address the following review comment that was posted by Jens: "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." Thanks, Bart.
On 2020/11/10 11:57, Bart Van Assche wrote: > On 11/9/20 4:51 AM, Damien Le Moal wrote: >> Move null_blk driver code into the new sub-directory >> drivers/block/null_blk. > > Is this perhaps something that has been proposed before (see also > https://lore.kernel.org/linux-block/20200621204257.16006-1-bvanassche@acm.org/)? > > Please address the following review comment that was posted by Jens: > "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." > > Thanks, Thanks for the pointer Bart. Will send a V2 correcting this. Can I add a "Suggested-by" tag with your name ? > > Bart. >
On 11/9/20 8:57 PM, Damien Le Moal wrote:
> Can I add a "Suggested-by" tag with your name ?
Sure, that would be welcome.
Thanks,
Bart.
diff --git a/drivers/block/Makefile b/drivers/block/Makefile index e1f63117ee94..a3170859e01d 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) += null_blk/ skd-y := skd_main.o swim_mod-y := swim.o swim_asm.o diff --git a/drivers/block/null_blk/Makefile b/drivers/block/null_blk/Makefile new file mode 100644 index 000000000000..a0b7bd066fea --- /dev/null +++ b/drivers/block/null_blk/Makefile @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 + +# needed for trace events +ccflags-y += -I$(src) + +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
Move null_blk driver code into the new sub-directory drivers/block/null_blk. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> --- drivers/block/Makefile | 7 +------ drivers/block/null_blk/Makefile | 11 +++++++++++ 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 7 files changed, 12 insertions(+), 6 deletions(-) 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%)