IB/hfi1: Move structure definitions from user_exp_rcv.c to user_exp_rcv.h
authorHarish Chegondi <harish.chegondi@intel.com>
Tue, 22 Aug 2017 01:27:23 +0000 (18:27 -0700)
committerDoug Ledford <dledford@redhat.com>
Mon, 28 Aug 2017 23:12:22 +0000 (19:12 -0400)
Clean up user_exp_rcv.c file by moving structure definitions into header
file user_exp_rcv.h. Since these structure definitions depend on the
structure definitions in mmu_rb.h, move #include "mmu_rb.h" above
the include "user_exp_rcv.h" or include of header files that include
user_exp_rcv.h

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Harish Chegondi <harish.chegondi@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/file_ops.c
drivers/infiniband/hw/hfi1/user_exp_rcv.c
drivers/infiniband/hw/hfi1/user_exp_rcv.h
drivers/infiniband/hw/hfi1/user_sdma.c

index ab8eb2bf48d8c82427b9b9288ad88876704fa6b9..e0fd8fc0a7ab51e262784dd3b331a535d8ecf5f8 100644 (file)
 #include "device.h"
 #include "common.h"
 #include "trace.h"
+#include "mmu_rb.h"
 #include "user_sdma.h"
 #include "user_exp_rcv.h"
 #include "aspm.h"
-#include "mmu_rb.h"
 
 #undef pr_fmt
 #define pr_fmt(fmt) DRIVER_NAME ": " fmt
index 026790ee0e84869505ed8d8ab8f3299dbf1be54c..6f6c14df383e3cc76ec757032d6dbc27d66213db 100644 (file)
 #include <asm/page.h>
 #include <linux/string.h>
 
+#include "mmu_rb.h"
 #include "user_exp_rcv.h"
 #include "trace.h"
-#include "mmu_rb.h"
-
-struct tid_rb_node {
-       struct mmu_rb_node mmu;
-       unsigned long phys;
-       struct tid_group *grp;
-       u32 rcventry;
-       dma_addr_t dma_addr;
-       bool freed;
-       unsigned npages;
-       struct page *pages[0];
-};
-
-struct tid_pageset {
-       u16 idx;
-       u16 count;
-};
 
 static void unlock_exp_tids(struct hfi1_ctxtdata *uctxt,
                            struct exp_tid_set *set,
index 7461d11b01c42ac992298ff36de2320ff4d061f9..e383cc01a2bf6356179c39b8833e647bc83761ae 100644 (file)
 
 #include "exp_rcv.h"
 
+struct tid_pageset {
+       u16 idx;
+       u16 count;
+};
+
 struct tid_user_buf {
        unsigned long vaddr;
        unsigned long length;
@@ -60,6 +65,17 @@ struct tid_user_buf {
        unsigned int n_psets;
 };
 
+struct tid_rb_node {
+       struct mmu_rb_node mmu;
+       unsigned long phys;
+       struct tid_group *grp;
+       u32 rcventry;
+       dma_addr_t dma_addr;
+       bool freed;
+       unsigned int npages;
+       struct page *pages[0];
+};
+
 static inline int num_user_pages(unsigned long addr,
                                 unsigned long len)
 {
index 2837407d4daa4e1403ad07df6ffab736837247a2..8a1653ab2f658066081a4147bdf43e7559579de5 100644 (file)
 
 #include "hfi.h"
 #include "sdma.h"
+#include "mmu_rb.h"
 #include "user_sdma.h"
 #include "verbs.h"  /* for the headers */
 #include "common.h" /* for struct hfi1_tid_info */
 #include "trace.h"
-#include "mmu_rb.h"
 
 static uint hfi1_sdma_comp_ring_size = 128;
 module_param_named(sdma_comp_size, hfi1_sdma_comp_ring_size, uint, S_IRUGO);