2021-03-25 01:27:30

by Jiabing Wan

[permalink] [raw]
Subject: [PATCH] include: linux: lightnvm: Remove duplicate include

ifdef CONFIG_NVM, linux/blkdev.h and uapi/linux/lightnvm.h
would be included twice. So remove them.
By the way, I find that struct nvm_rq is declared twice.
If removing the duplicated declaration really makes sense, it would
be much clean up work to do in inlude/linux.

Signed-off-by: Wan Jiabing <[email protected]>
---
include/linux/lightnvm.h | 3 ---
1 file changed, 3 deletions(-)

diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index 1db223710b28..1ddb41ee71eb 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -112,10 +112,8 @@ struct nvm_dev_ops {

#ifdef CONFIG_NVM

-#include <linux/blkdev.h>
#include <linux/file.h>
#include <linux/dmapool.h>
-#include <uapi/linux/lightnvm.h>

enum {
/* HW Responsibilities */
@@ -276,7 +274,6 @@ struct nvm_target {

#define NVM_MAX_VLBA (64) /* max logical blocks in a vector command */

-struct nvm_rq;
typedef void (nvm_end_io_fn)(struct nvm_rq *);

struct nvm_rq {
--
2.25.1