Skip to contentSkip to conversation

staging: lustre: Fix variable type declaration after refactoring

PATCH Superseded Quentin Lambert 3 participants 4 messages Dec 8, 2016 – Dec 19, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: lustre: Fix variable type declaration after refactoring

A recent clean-up declared och_flags as a int rather than fmode_t. This lead to the following sparse warning:

drivers/staging/lustre/lustre/llite/file.c:106:30: warning: restricted fmode_t degrades to integer

This patch fixes this issue.

Fixes 1200991234f7 ("staging: lustre: cleanup lustre_lib.h")
---
 drivers/staging/lustre/lustre/include/obd.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/include/obd.h +1 -1
@@ -889,7 +889,7 @@ struct obd_client_handle {
 	struct md_open_data	*och_mod;
 	struct lustre_handle	 och_lease_handle; /* open lock for lease */
 	__u32			 och_magic;
-	int			 och_flags;
+	fmode_t			 och_flags;
 };
 
 #define OBD_CLIENT_HANDLE_MAGIC 0xd15ea5ed
#1 lore raw
Quoted 9 lines · Quentin Lambert

A recent clean-up declared och_flags as a int rather than fmode_t. This lead to the following sparse warning:

drivers/staging/lustre/lustre/llite/file.c:106:30: warning: restricted fmode_t degrades to integer

This patch fixes this issue.

Fixes 1200991234f7 ("staging: lustre: cleanup lustre_lib.h")
       0a1200991234f7

Fixes hash is wrong. It should start with "0a".

regards,
dan carpenter

#2 lore raw

PATCH v2 1/1 staging: lustre: Fix variable type declaration after refactoring

In reply to Quentin Lambert

A recent clean-up declared och_flags as a int rather than fmode_t. This lead to the following sparse warning:

drivers/staging/lustre/lustre/llite/file.c:106:30: warning: restricted fmode_t degrades to integer

This patch fixes this issue.

Fixes 0a1200991234f7 ("staging: lustre: cleanup lustre_lib.h")

---
v2: fixes the referenced sha

 drivers/staging/lustre/lustre/include/obd.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/include/obd.h +1 -1
@@ -889,7 +889,7 @@ struct obd_client_handle {
 	struct md_open_data	*och_mod;
 	struct lustre_handle	 och_lease_handle; /* open lock for lease */
 	__u32			 och_magic;
-	int			 och_flags;
+	fmode_t			 och_flags;
 };
 
 #define OBD_CLIENT_HANDLE_MAGIC 0xd15ea5ed
Acked-by on v2 1/1
#3 lore raw
Quoted 8 lines

A recent clean-up declared och_flags as a int rather than fmode_t. This lead to the following sparse warning:

drivers/staging/lustre/lustre/llite/file.c:106:30: warning: restricted fmode_t degrades to integer

This patch fixes this issue.

Quoted 20 lines
Fixes 0a1200991234f7 ("staging: lustre: cleanup lustre_lib.h")

---
v2: fixes the referenced sha

 drivers/staging/lustre/lustre/include/obd.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/include/obd.h +1 -1
@@ -889,7 +889,7 @@ struct obd_client_handle {
 	struct md_open_data	*och_mod;
 	struct lustre_handle	 och_lease_handle; /* open lock for lease */
 	__u32			 och_magic;
-	int			 och_flags;
+	fmode_t			 och_flags;
 };
 
 #define OBD_CLIENT_HANDLE_MAGIC 0xd15ea5ed