staging: lustre: ldlm: remove ldlm_wire_policy_data_t typedef usage from code
authorAndreas Dilger <andreas.dilger@intel.com>
Wed, 23 Nov 2016 22:59:49 +0000 (17:59 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Nov 2016 20:45:15 +0000 (21:45 +0100)
Replace usage of ldlm_wire_policy_data_t with named enums
to conform to upstream coding style.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: http://review.whamcloud.com/15300
Reviewed-on: http://review.whamcloud.com/15301
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
drivers/staging/lustre/lustre/include/lustre_dlm.h
drivers/staging/lustre/lustre/ldlm/ldlm_extent.c
drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c
drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
drivers/staging/lustre/lustre/ldlm/ldlm_plain.c
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c

index 5c1fb6cd17dae7834cefc9b8ee86b3c16a30d225..6a4a7d81120252f7aefbc883b077bfc6a1a79062 100644 (file)
@@ -2623,11 +2623,11 @@ struct ldlm_flock_wire {
  * on the resource type.
  */
 
-typedef union {
+union ldlm_wire_policy_data {
        struct ldlm_extent l_extent;
        struct ldlm_flock_wire l_flock;
        struct ldlm_inodebits l_inodebits;
-} ldlm_wire_policy_data_t;
+};
 
 union ldlm_gl_desc {
        struct ldlm_gl_lquota_desc      lquota_desc;
@@ -2669,7 +2669,7 @@ struct ldlm_lock_desc {
        struct ldlm_resource_desc l_resource;
        enum ldlm_mode l_req_mode;
        enum ldlm_mode l_granted_mode;
-       ldlm_wire_policy_data_t l_policy_data;
+       union ldlm_wire_policy_data l_policy_data;
 };
 
 #define LDLM_LOCKREQ_HANDLES 2
index 02c90b0ad5f09568d24532b2401e187bbc1ff6ba..62304ba99171462bfd34cee291b77c512d9b76a1 100644 (file)
@@ -560,7 +560,7 @@ union ldlm_policy_data {
 };
 
 void ldlm_convert_policy_to_local(struct obd_export *exp, enum ldlm_type type,
-                                 const ldlm_wire_policy_data_t *wpolicy,
+                                 const union ldlm_wire_policy_data *wpolicy,
                                  union ldlm_policy_data *lpolicy);
 
 enum lvb_type {
index 78cd70d2f53648a49190aa2ad5d26b3ff9786a93..32b73ee62639b199fbb87c81d49425587baacb54 100644 (file)
@@ -240,7 +240,7 @@ void ldlm_extent_unlink_lock(struct ldlm_lock *lock)
        }
 }
 
-void ldlm_extent_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy,
+void ldlm_extent_policy_wire_to_local(const union ldlm_wire_policy_data *wpolicy,
                                      union ldlm_policy_data *lpolicy)
 {
        memset(lpolicy, 0, sizeof(*lpolicy));
@@ -250,7 +250,7 @@ void ldlm_extent_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy,
 }
 
 void ldlm_extent_policy_local_to_wire(const union ldlm_policy_data *lpolicy,
-                                     ldlm_wire_policy_data_t *wpolicy)
+                                     union ldlm_wire_policy_data *wpolicy)
 {
        memset(wpolicy, 0, sizeof(*wpolicy));
        wpolicy->l_extent.start = lpolicy->l_extent.start;
index 2683a7b52fd4d2fb9b997f2143157c1ae4732481..722160784f8355e78afbcfff54196667853c6a5b 100644 (file)
@@ -612,7 +612,7 @@ granted:
 }
 EXPORT_SYMBOL(ldlm_flock_completion_ast);
 
-void ldlm_flock_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy,
+void ldlm_flock_policy_wire_to_local(const union ldlm_wire_policy_data *wpolicy,
                                     union ldlm_policy_data *lpolicy)
 {
        memset(lpolicy, 0, sizeof(*lpolicy));
@@ -623,7 +623,7 @@ void ldlm_flock_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy,
 }
 
 void ldlm_flock_policy_local_to_wire(const union ldlm_policy_data *lpolicy,
-                                    ldlm_wire_policy_data_t *wpolicy)
+                                    union ldlm_wire_policy_data *wpolicy)
 {
        memset(wpolicy, 0, sizeof(*wpolicy));
        wpolicy->l_flock.lfw_start = lpolicy->l_flock.start;
index 11b45aebe57c356f91965ebbb8dd2f660a65081b..8e1709dc073c282641dd9c4b130b8035e8838244 100644 (file)
@@ -54,7 +54,7 @@
 #include "../include/lustre_lib.h"
 #include "ldlm_internal.h"
 
-void ldlm_ibits_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy,
+void ldlm_ibits_policy_wire_to_local(const union ldlm_wire_policy_data *wpolicy,
                                     union ldlm_policy_data *lpolicy)
 {
        memset(lpolicy, 0, sizeof(*lpolicy));
@@ -62,7 +62,7 @@ void ldlm_ibits_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy,
 }
 
 void ldlm_ibits_policy_local_to_wire(const union ldlm_policy_data *lpolicy,
-                                    ldlm_wire_policy_data_t *wpolicy)
+                                    union ldlm_wire_policy_data *wpolicy)
 {
        memset(wpolicy, 0, sizeof(*wpolicy));
        wpolicy->l_inodebits.bits = lpolicy->l_inodebits.bits;
index e2c3c6ec9ab98ffdb0b9429bfeb642311f18d27b..9085ee5febf1f6b88f18c499a4c75dca370ed218 100644 (file)
@@ -312,25 +312,25 @@ static inline int is_granted_or_cancelled(struct ldlm_lock *lock)
        return ret;
 }
 
-typedef void (*ldlm_policy_wire_to_local_t)(const ldlm_wire_policy_data_t *,
+typedef void (*ldlm_policy_wire_to_local_t)(const union ldlm_wire_policy_data *,
                                            union ldlm_policy_data *);
 
 typedef void (*ldlm_policy_local_to_wire_t)(const union ldlm_policy_data *,
-                                           ldlm_wire_policy_data_t *);
+                                           union ldlm_wire_policy_data *);
 
-void ldlm_plain_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy,
+void ldlm_plain_policy_wire_to_local(const union ldlm_wire_policy_data *wpolicy,
                                     union ldlm_policy_data *lpolicy);
 void ldlm_plain_policy_local_to_wire(const union ldlm_policy_data *lpolicy,
-                                    ldlm_wire_policy_data_t *wpolicy);
-void ldlm_ibits_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy,
+                                    union ldlm_wire_policy_data *wpolicy);
+void ldlm_ibits_policy_wire_to_local(const union ldlm_wire_policy_data *wpolicy,
                                     union ldlm_policy_data *lpolicy);
 void ldlm_ibits_policy_local_to_wire(const union ldlm_policy_data *lpolicy,
-                                    ldlm_wire_policy_data_t *wpolicy);
-void ldlm_extent_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy,
+                                    union ldlm_wire_policy_data *wpolicy);
+void ldlm_extent_policy_wire_to_local(const union ldlm_wire_policy_data *wpolicy,
                                      union ldlm_policy_data *lpolicy);
 void ldlm_extent_policy_local_to_wire(const union ldlm_policy_data *lpolicy,
-                                     ldlm_wire_policy_data_t *wpolicy);
-void ldlm_flock_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy,
+                                     union ldlm_wire_policy_data *wpolicy);
+void ldlm_flock_policy_wire_to_local(const union ldlm_wire_policy_data *wpolicy,
                                     union ldlm_policy_data *lpolicy);
 void ldlm_flock_policy_local_to_wire(const union ldlm_policy_data *lpolicy,
-                                    ldlm_wire_policy_data_t *wpolicy);
+                                    union ldlm_wire_policy_data *wpolicy);
index 3dc0a06bb58fc0beea63b189b4f1a5125c08c99b..15eeb2b3491ddf7f54c67b291ce3365adff29a60 100644 (file)
@@ -82,7 +82,7 @@ static ldlm_policy_local_to_wire_t ldlm_policy_local_to_wire[] = {
  */
 static void ldlm_convert_policy_to_wire(enum ldlm_type type,
                                        const union ldlm_policy_data *lpolicy,
-                                       ldlm_wire_policy_data_t *wpolicy)
+                                       union ldlm_wire_policy_data *wpolicy)
 {
        ldlm_policy_local_to_wire_t convert;
 
@@ -95,7 +95,7 @@ static void ldlm_convert_policy_to_wire(enum ldlm_type type,
  * Converts lock policy from on the wire lock_desc format to local format
  */
 void ldlm_convert_policy_to_local(struct obd_export *exp, enum ldlm_type type,
-                                 const ldlm_wire_policy_data_t *wpolicy,
+                                 const union ldlm_wire_policy_data *wpolicy,
                                  union ldlm_policy_data *lpolicy)
 {
        ldlm_policy_wire_to_local_t convert;
index 2603293cc3ddcb6960cd6dceae444abe00ac16c4..862ea0a1dc97cbcbc602885be5407c74c8060615 100644 (file)
 
 #include "ldlm_internal.h"
 
-void ldlm_plain_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy,
+void ldlm_plain_policy_wire_to_local(const union ldlm_wire_policy_data *wpolicy,
                                     union ldlm_policy_data *lpolicy)
 {
        /* No policy for plain locks */
 }
 
 void ldlm_plain_policy_local_to_wire(const union ldlm_policy_data *lpolicy,
-                                    ldlm_wire_policy_data_t *wpolicy)
+                                    union ldlm_wire_policy_data *wpolicy)
 {
        /* No policy for plain locks */
 }
index 39c4e1835666490d874b057f368fcc3518242244..2c9debbc691e5b57b5c4f4c70bc44dd73e740813 100644 (file)
@@ -2012,7 +2012,7 @@ static void lustre_swab_ldlm_res_id(struct ldlm_res_id *id)
                __swab64s(&id->name[i]);
 }
 
-static void lustre_swab_ldlm_policy_data(ldlm_wire_policy_data_t *d)
+static void lustre_swab_ldlm_policy_data(union ldlm_wire_policy_data *d)
 {
        /* the lock data is a union and the first two fields are always an
         * extent so it's ok to process an LDLM_EXTENT and LDLM_FLOCK lock