Skip to contentSkip to conversation

security/selinux/ss/mls.c : fix sparse warnings

PATCH New Alexey Dobriyan 1 participant 1 message Mar 9, 2005

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

PATCH 1/1 security/selinux/ss/mls.c : fix sparse warnings

security/selinux/ss/mls.c +10 -7
Index: linux-2.6.11-bk3-sparse/security/selinux/ss/mls.c
===================================================================
@@ -402,7 +402,7 @@ void mls_user_destroy(struct user_datum 
 
 int mls_read_perm(struct perm_datum *perdatum, void *fp)
 {
-	u32 buf[1];
+	__le32 buf[1];
 	int rc;
 
 	rc = next_entry(buf, fp, sizeof buf);
@@ -455,7 +455,8 @@ bad:
  */
 static int mls_read_range_helper(struct mls_range *r, void *fp)
 {
-	u32 buf[2], items;
+	__le32 buf[2];
+	u32 items;
 	int rc;
 
 	rc = next_entry(buf, fp, sizeof(u32));
@@ -522,7 +523,7 @@ int mls_read_range(struct context *c, vo
 int mls_read_class(struct class_datum *cladatum, void *fp)
 {
 	struct mls_perms *p = &cladatum->mlsperms;
-	u32 buf[4];
+	__le32 buf[4];
 	int rc;
 
 	rc = next_entry(buf, fp, sizeof buf);
@@ -542,7 +543,7 @@ int mls_read_user(struct user_datum *usr
 	struct mls_range_list *r, *l;
 	int rc;
 	u32 nel, i;
-	u32 buf[1];
+	__le32 buf[1];
 
 	rc = next_entry(buf, fp, sizeof buf);
 	if (rc < 0)
@@ -575,7 +576,7 @@ out:
 
 int mls_read_nlevels(struct policydb *p, void *fp)
 {
-	u32 buf[1];
+	__le32 buf[1];
 	int rc;
 
 	rc = next_entry(buf, fp, sizeof buf);
@@ -664,7 +665,8 @@ int sens_read(struct policydb *p, struct
 	char *key = NULL;
 	struct level_datum *levdatum;
 	int rc;
-	u32 buf[2], len;
+	__le32 buf[2];
+	u32 len;
 
 	levdatum = kmalloc(sizeof(*levdatum), GFP_ATOMIC);
 	if (!levdatum) {
@@ -712,7 +714,8 @@ int cat_read(struct policydb *p, struct 
 	char *key = NULL;
 	struct cat_datum *catdatum;
 	int rc;
-	u32 buf[3], len;
+	__le32 buf[3];
+	u32 len;
 
 	catdatum = kmalloc(sizeof(*catdatum), GFP_ATOMIC);
 	if (!catdatum) {

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors