[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140806141343.GA15659@himangi-Dell>
Date: Wed, 6 Aug 2014 19:43:43 +0530
From: Himangi Saraogi <himangi774@...il.com>
To: Dave Chinner <david@...morbit.com>, xfs@....sgi.com,
linux-kernel@...r.kernel.org
Cc: Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH] xfs: Remove typedef xfs_uu_t
The Linux kernel coding style guidelines suggest not using typedefs
for structure types. This patch gets rid of the typedef for xfs_uu_t.
Also the names of the struct is changed to drop the _t, to make the
name look less typedef-like.
The following Coccinelle semantic patch detects the case.
@tn1@
type td;
@@
typedef struct { ... } td;
@script:python tf@
td << tn1.td;
tdres;
@@
coccinelle.tdres = td;
@@
type tn1.td;
identifier tf.tdres;
@@
-typedef
struct
+ tdres
{ ... }
-td
;
@@
type tn1.td;
identifier tf.tdres;
@@
(
-td
+ struct tdres
|
const
- td
+ struct tdres
)
Signed-off-by: Himangi Saraogi <himangi774@...il.com>
Acked-by: Julia Lawall <julia.lawall@...6.fr>
---
fs/xfs/uuid.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/xfs/uuid.c b/fs/xfs/uuid.c
index b83f76b..1f21d8f 100644
--- a/fs/xfs/uuid.c
+++ b/fs/xfs/uuid.c
@@ -18,13 +18,13 @@
#include <xfs.h>
/* IRIX interpretation of an uuid_t */
-typedef struct {
+struct xfs_uu {
__be32 uu_timelow;
__be16 uu_timemid;
__be16 uu_timehi;
__be16 uu_clockseq;
__be16 uu_node[3];
-} xfs_uu_t;
+};
/*
* uuid_getnodeuniq - obtain the node unique fields of a UUID.
@@ -35,7 +35,7 @@ typedef struct {
void
uuid_getnodeuniq(uuid_t *uuid, int fsid [2])
{
- xfs_uu_t *uup = (xfs_uu_t *)uuid;
+ struct xfs_uu *uup = (struct xfs_uu *)uuid;
fsid[0] = (be16_to_cpu(uup->uu_clockseq) << 16) |
be16_to_cpu(uup->uu_timemid);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists