All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] bugfix for block_dev_kernel/ltp_block_dev.c
@ 2021-05-10  9:56 dongshijiang
  2021-05-10 16:52 ` Petr Vorel
  0 siblings, 1 reply; 2+ messages in thread
From: dongshijiang @ 2021-05-10  9:56 UTC (permalink / raw)
  To: ltp

Add genhd.h and blkdev.h to ltp_block_dev.c.

Failed at compile time on kernel 5.12 due to change of register_blkdev function definition from linux/fs.h to linux/genhd.h and failure of test case tc05,The reason is that the BLKDEV_MAJOR_MAX definition was changed from fs.h to blkdev.h

Signed-off-by: dongshijiang <dongshijiang@inspur.com>
---
 .../device-drivers/block/block_dev_kernel/ltp_block_dev.c       | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/testcases/kernel/device-drivers/block/block_dev_kernel/ltp_block_dev.c b/testcases/kernel/device-drivers/block/block_dev_kernel/ltp_block_dev.c
index c7c8683a2..17047c0d5 100644
--- a/testcases/kernel/device-drivers/block/block_dev_kernel/ltp_block_dev.c
+++ b/testcases/kernel/device-drivers/block/block_dev_kernel/ltp_block_dev.c
@@ -12,6 +12,8 @@
 #include <linux/module.h>
 #include <linux/device.h>
 #include <linux/fs.h>
+#include <linux/genhd.h>
+#include <linux/blkdev.h>

 MODULE_AUTHOR("M?rton N?meth <nm127@freemail.hu>");
 MODULE_AUTHOR("Copyright (c) 2013 Oracle and/or its affiliates");
--
2.18.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [LTP] [PATCH] bugfix for block_dev_kernel/ltp_block_dev.c
  2021-05-10  9:56 [LTP] [PATCH] bugfix for block_dev_kernel/ltp_block_dev.c dongshijiang
@ 2021-05-10 16:52 ` Petr Vorel
  0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2021-05-10 16:52 UTC (permalink / raw)
  To: ltp

Hi,

> Add genhd.h and blkdev.h to ltp_block_dev.c.

> Failed at compile time on kernel 5.12 due to change of register_blkdev function definition from linux/fs.h to linux/genhd.h and failure of test case tc05,The reason is that the BLKDEV_MAJOR_MAX definition was changed from fs.h to blkdev.h

Good catch, merged with slightly changed commit message.
Thanks!

Maybe we should not ignore build error for kernel module to catch these API
changes earlier.

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-10 16:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10  9:56 [LTP] [PATCH] bugfix for block_dev_kernel/ltp_block_dev.c dongshijiang
2021-05-10 16:52 ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.