xprtrdma: removed unnecessary headers from verbs.c
Subsystems (4)
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
@@ -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]>
Hi,
Quoted 2 lines · Tanzir Hasan
asm-generic/barrier.handasm/bitops.hare 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
Suggested-by Al Viro <[email protected]>Signed-off-by Tanzir Hasan <[email protected]>--- net/sunrpc/xprtrdma/verbs.c | 3 --- 1 file changed, 3 deletions(-)net/sunrpc/xprtrdma/verbs.c +0
-4@@ -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-30800631d3f1Best regards,
Signature · 1 line
#Randy
Quoted 8 lines · Randy Dunlap
Hi,
Quoted 2 lines · Tanzir Hasan
asm-generic/barrier.handasm/bitops.hare 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
Hi Tanzir,
Quoted 17 lines · Tanzir Hasan
Quoted 8 lines · Randy Dunlap
Hi,
Quoted 2 lines · Tanzir Hasan
asm-generic/barrier.handasm/bitops.hare 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.hbrings inlinux/sunrpc/rpc_rdma.hThis brings inlinux/bitops.hwhich is preferred overasm/bitops.hQuoted 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.hto 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 justlinux/bitops.hor including bothlinux/bitops.handasm/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
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
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