diff mbox series

[rdma-core,6/7] libhns: The content of the header file should be protected with #define

Message ID 20211109124103.54326-7-liangwenpeng@huawei.com (mailing list archive)
State Not Applicable
Headers show
Series libhns: Cleanup about removing redundant code and cleaning up static alarms | expand

Commit Message

Wenpeng Liang Nov. 9, 2021, 12:41 p.m. UTC
From: Xinhao Liu <liuxinhao5@hisilicon.com>

Header files should be protected with #define to prevent repeated
inclusion.

Signed-off-by: Xinhao Liu <liuxinhao5@hisilicon.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
---
 providers/hns/hns_roce_u_db.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/providers/hns/hns_roce_u_db.h b/providers/hns/hns_roce_u_db.h
index b44e64d4..c3dd583a 100644
--- a/providers/hns/hns_roce_u_db.h
+++ b/providers/hns/hns_roce_u_db.h
@@ -30,13 +30,13 @@ 
  * SOFTWARE.
  */
 
+#ifndef _HNS_ROCE_U_DB_H
+#define _HNS_ROCE_U_DB_H
+
 #include <linux/types.h>
 
 #include "hns_roce_u.h"
 
-#ifndef _HNS_ROCE_U_DB_H
-#define _HNS_ROCE_U_DB_H
-
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 #define HNS_ROCE_PAIR_TO_64(val) ((uint64_t) val[1] << 32 | val[0])
 #elif __BYTE_ORDER == __BIG_ENDIAN