Skip to contentSkip to conversation

xprtrdma: removed unnecessary headers from verbs.c

PATCH Superseded Tanzir Hasan 2 participants 6 messages Dec 26, 2023 – Dec 27, 2023

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xprtrdma: removed unnecessary headers from verbs.c

asm-generic/barrier.h and asm/bitops.h are already brought into the header and the file can still be built with their removal.

---
 net/sunrpc/xprtrdma/verbs.c | 3 ---
 1 file changed, 3 deletions(-)
net/sunrpc/xprtrdma/verbs.c +0 -3
index 28c0771c4e8c..5436560dda85 100644
@@ -55,9 +55,6 @@
 #include <linux/sunrpc/svc_rdma.h>
 #include <linux/log2.h>
 
-#include <asm-generic/barrier.h>
-#include <asm/bitops.h>
-
 #include <rdma/ib_cm.h>
 
 #include "xprt_rdma.h"

---
base-commit: fbafc3e621c3f4ded43720fdb1d6ce1728ec664e
change-id: 20231226-verbs-30800631d3f1

Best regards,

Signature · 1 line
Tanzir Hasan <[email protected]>
#1 lore raw

Hi,

Quoted 2 lines · Tanzir Hasan

asm-generic/barrier.h and asm/bitops.h are already brought into the header and the file can still be built with their removal.

Brought into which header?

Does this conflict with Rule #1 in Documentation/process/submit-checklist.rst ?

Quoted 26 lines
---
 net/sunrpc/xprtrdma/verbs.c | 3 ---
 1 file changed, 3 deletions(-)
net/sunrpc/xprtrdma/verbs.c +0 -4
index 28c0771c4e8c..5436560dda85 100644
@@ -55,9 +55,6 @@
 #include <linux/sunrpc/svc_rdma.h>
 #include <linux/log2.h>
 
-#include <asm-generic/barrier.h>
-#include <asm/bitops.h>
-
 #include <rdma/ib_cm.h>
 
 #include "xprt_rdma.h"
 
---

base-commit: fbafc3e621c3f4ded43720fdb1d6ce1728ec664e
change-id: 20231226-verbs-30800631d3f1

Best regards,

Signature · 1 line
#Randy
#2 lore raw
Quoted 8 lines · Randy Dunlap

Hi,

Quoted 2 lines · Tanzir Hasan

asm-generic/barrier.h and asm/bitops.h are already brought into the header and the file can still be built with their removal.

Brought into which header?

Hi Randy,

Sorry for the poor explanation. I see that I left out the specific header. The inclusion of linux/sunrpc/svc_rdma.h brings in linux/sunrpc/rpc_rdma.h This brings in linux/bitops.h which is preferred over asm/bitops.h

Quoted 1 line

Does this conflict with Rule #1 in Documentation/process/submit-checklist.rst ?

Yes, this conflicts with Rule #1. A better version of this patch would be to add linux/bitops.h to this file directly. The main reason this patch exists is to clear
out the asm-generic file since those are not preferred. I can do this by either including just linux/bitops.h or including both linux/bitops.h and asm/barrier.h.
Would the second approach conform better with Rule #1?

Thanks,
Tanzir

#3 lore raw

Hi Tanzir,

Quoted 17 lines · Tanzir Hasan
Quoted 8 lines · Randy Dunlap

Hi,

Quoted 2 lines · Tanzir Hasan

asm-generic/barrier.h and asm/bitops.h are already brought into the header and the file can still be built with their removal.

Brought into which header?

Hi Randy,

Sorry for the poor explanation. I see that I left out the specific header. The inclusion of linux/sunrpc/svc_rdma.h brings in linux/sunrpc/rpc_rdma.h This brings in linux/bitops.h which is preferred over asm/bitops.h

Quoted 1 line

Does this conflict with Rule #1 in Documentation/process/submit-checklist.rst ?

Quoted 7 lines

Yes, this conflicts with Rule #1. A better version of this patch would be to add linux/bitops.h to this file directly. The main reason this patch exists is to clear
out the asm-generic file since those are not preferred. I can do this by either including just linux/bitops.h or including both linux/bitops.h and asm/barrier.h.
Would the second approach conform better with Rule #1?

Yes, it would IMO.

Where can I find your current working list of what/how to #include?

Thanks.

Signature · 1 line
#Randy
#4 lore raw

Hi Randy,

Quoted 1 line

Where can I find your current working list of what/how to #include?

Here is my current working list of what to #include.

#include <linux/bitops.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/sunrpc/addr.h>
#include <linux/sunrpc/svc_rdma.h>
#include <linux/log2.h>

#include <asm/barrier.h>

#include <rdma/ib_cm.h>

#include "xprt_rdma.h"
#include <trace/events/rpcrdma.h>

There was a discussion here about when to include asm/asm-generics:
https://lore.kernel.org/llvm/20231215210344.GA3096493@ZenIV/

If I misunderstood your question please let me know.

Best,
Tanzir

#5 lore raw
Quoted 16 lines · Tanzir Hasan

Hi Randy,

Quoted 1 line

Where can I find your current working list of what/how to #include?

Here is my current working list of what to #include.

#include <linux/bitops.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/sunrpc/addr.h>
#include <linux/sunrpc/svc_rdma.h>
#include <linux/log2.h>

#include <asm/barrier.h>

#include <rdma/ib_cm.h>

Quoted 7 lines

#include "xprt_rdma.h"
#include <trace/events/rpcrdma.h>

There was a discussion here about when to include asm/asm-generics:
https://lore.kernel.org/llvm/20231215210344.GA3096493@ZenIV/

If I misunderstood your question please let me know.

Yes, more the latter link for general info rather than the specific info for this one source file.

Thanks.

Signature · 1 line
#Randy