Whamcloud - gitweb
LU-13274 uapi: make lnet UAPI headers C99 compliant
[fs/lustre-release.git] / lnet / include / uapi / linux / lnet / lnet-dlc.h
index a1d2d0c..bba8aa3 100644 (file)
 #define __UAPI_LNET_DLC_H_
 
 #include <linux/types.h>
-/*
- * This is due to us being out of kernel and the way the OpenSFS branch
- * handles CFLAGS.
- */
-#ifdef __KERNEL__
-# include <uapi/linux/lnet/libcfs_ioctl.h>
-# include <uapi/linux/lnet/lnet-types.h>
-#else
-# include <linux/lnet/libcfs_ioctl.h>
-# include <linux/lnet/lnet-types.h>
-#endif
+#include <linux/lnet/libcfs_ioctl.h>
+#include <linux/lnet/lnet-types.h>
 
 #define MAX_NUM_SHOW_ENTRIES   32
 #define LNET_MAX_STR_LEN       128
 #define LNET_RT_MULTI_HOP      (1 << 1)
 
 /*
+ * sparse kernel source annotations
+ */
+#ifndef __user
+#define __user
+#endif
+
+/*
  * To allow for future enhancements to extend the tunables
  * add a hdr to this structure, so that the version can be set
  * and checked for backwards compatibility. Newer versions of LNet
@@ -124,7 +122,7 @@ struct lnet_ioctl_ping_data {
        __u32 op_param;
        __u32 ping_count;
        __u32 ping_flags;
-       bool mr_info;
+       __u32 mr_info;
        struct lnet_process_id ping_id;
        struct lnet_process_id __user *ping_buf;
 };
@@ -264,7 +262,7 @@ struct lnet_ioctl_peer_cfg {
        lnet_nid_t prcfg_prim_nid;
        lnet_nid_t prcfg_cfg_nid;
        __u32 prcfg_count;
-       bool prcfg_mr;
+       __u32 prcfg_mr;
        __u32 prcfg_state;
        __u32 prcfg_size;
        void __user *prcfg_bulk;
@@ -272,16 +270,16 @@ struct lnet_ioctl_peer_cfg {
 
 struct lnet_ioctl_reset_health_cfg {
        struct libcfs_ioctl_hdr rh_hdr;
-       enum lnet_health_type rh_type;
-       bool rh_all;
-       int rh_value;
+       enum lnet_health_type rh_type:32;
+       __u16 rh_all:1;
+       __s16 rh_value;
        lnet_nid_t rh_nid;
 };
 
 struct lnet_ioctl_recovery_list {
        struct libcfs_ioctl_hdr rlst_hdr;
-       enum lnet_health_type rlst_type;
-       int rlst_num_nids;
+       enum lnet_health_type rlst_type:32;
+       __u32 rlst_num_nids;
        lnet_nid_t rlst_nid_array[LNET_MAX_SHOW_NUM_NID];
 };