From: Andrew Morton <akpm@linux-foundation.org>

fs/cifs/cifsacl.c: In function 'parse_ace':
fs/cifs/cifsacl.c:40: warning: unused variable 'i'
fs/cifs/cifsacl.c: In function 'parse_sid':
fs/cifs/cifsacl.c:158: warning: unused variable 'i'

Cc: Steven French <sfrench@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/cifs/cifsacl.c |   22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff -puN fs/cifs/cifsacl.c~cifs-warning-fixes fs/cifs/cifsacl.c
--- a/fs/cifs/cifsacl.c~cifs-warning-fixes
+++ a/fs/cifs/cifsacl.c
@@ -37,9 +37,7 @@ static const struct cifs_sid sid_user =
 
 static void parse_ace(struct cifs_ace *pace, char *end_of_acl)
 {
-	int i;
 	int num_subauth;
-	 __u32 *psub_auth;
 
 	/* validate that we do not go past end of acl */
 	if (end_of_acl < (char *)pace + sizeof(struct cifs_ace)) {
@@ -48,9 +46,11 @@ static void parse_ace(struct cifs_ace *p
 	}
 
 	num_subauth = cpu_to_le32(pace->num_subauth);
-	if (num_subauth) {
-		psub_auth = (__u32 *)((char *)pace + sizeof(struct cifs_ace));
 #ifdef CONFIG_CIFS_DEBUG2
+	if (num_subauth) {
+		__u32 *psub_auth = (__u32 *)((char *)pace +
+					sizeof(struct cifs_ace));
+		int i;
 		cFYI(1, ("ACE revision %d num_subauth %d",
 			pace->revision, pace->num_subauth));
 		for (i = 0; i < num_subauth; ++i) {
@@ -62,9 +62,8 @@ static void parse_ace(struct cifs_ace *p
 			num auths and therefore go off the end */
 
 		cFYI(1, ("RID %d", le32_to_cpu(psub_auth[num_subauth-1])));
-#endif
 	}
-
+#endif
 	return;
 }
 
@@ -155,9 +154,7 @@ static void parse_dacl(struct cifs_acl *
 
 static int parse_sid(struct cifs_sid *psid, char *end_of_acl)
 {
-	int i;
 	int num_subauth;
-	__u32 *psub_auth;
 
 	/* BB need to add parm so we can store the SID BB */
 
@@ -168,9 +165,11 @@ static int parse_sid(struct cifs_sid *ps
 	}
 
 	num_subauth = cpu_to_le32(psid->num_subauth);
-	if (num_subauth) {
-		psub_auth = (__u32 *)((char *)psid + sizeof(struct cifs_sid));
 #ifdef CONFIG_CIFS_DEBUG2
+	if (num_subauth) {
+		__u32 *psub_auth = (__u32 *)((char *)psid +
+					sizeof(struct cifs_sid));
+		int i;
 		cFYI(1, ("SID revision %d num_auth %d First subauth 0x%x",
 			psid->revision, psid->num_subauth, psid->sub_auth[0]));
 
@@ -183,9 +182,8 @@ static int parse_sid(struct cifs_sid *ps
 			num auths and therefore go off the end */
 		cFYI(1, ("RID 0x%x",
 			le32_to_cpu(psid->sub_auth[psid->num_subauth])));
-#endif
 	}
-
+#endif
 	return 0;
 }
 
_

