staging: lustre: Replace typedef with struct
authorGargi Sharma <gs051095@gmail.com>
Tue, 28 Feb 2017 07:01:47 +0000 (12:31 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:17:08 +0000 (09:17 +0100)
As per the Linux kernel coding style guidelines, using typedef for a
structure type is not recommended. Hence, occurences of typedefs have
been removed. To find the occurences of the structures grep was used
and no uses were found.

Coccinelle script:

@r1@
type T;
@@

typedef struct { ... } T;

@script:python c1@
T2;
T << r1.T;
@@
coccinelle.T2=T;

@@
type r1.T;
identifier c1.T2;
@@
-typedef
struct
+ T2
{ ... }
-T
;

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/lustre_eacl.h

index 1e71a8638186d9d5adf6fc45637cab7c2f397e27..c198eda1405485ff09c79da83a42267de2015c6d 100644 (file)
 #include <linux/fs.h>
 #include <linux/posix_acl_xattr.h>
 
-typedef struct {
+struct ext_acl_xattr_entry {
        __u16              e_tag;
        __u16              e_perm;
        __u32              e_id;
        __u32              e_stat;
-} ext_acl_xattr_entry;
+};
 
-typedef struct {
-       __u32              a_count;
-       ext_acl_xattr_entry     a_entries[0];
-} ext_acl_xattr_header;
+struct ext_acl_xattr_header {
+       __u32 a_count;
+       struct ext_acl_xattr_entry a_entries[0];
+};
 
 #define CFS_ACL_XATTR_SIZE(count, prefix) \
        (sizeof(prefix ## _header) + (count) * sizeof(prefix ## _entry))