CIFS: Fix sparse warnings
authorSteve French <smfrench@gmail.com>
Thu, 2 Mar 2017 21:42:48 +0000 (15:42 -0600)
committerSteve French <smfrench@gmail.com>
Fri, 3 Mar 2017 05:11:54 +0000 (23:11 -0600)
Fix two minor sparse compile check warnings

Signed-off-by: Steve French <steve.french@primarydata.com>
Acked-by: Pavel Shilovsky <pshilov@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
fs/cifs/cifs_unicode.h
fs/cifs/cifssmb.c

index 479bc0a941f35f79056dedc45ab99825669f1e6e..3d7298cc0aeb357899dfcd9216d5b76f17cc64d9 100644 (file)
@@ -130,10 +130,10 @@ wchar_t cifs_toupper(wchar_t in);
  * Returns:
  *     Address of the first string
  */
-static inline wchar_t *
-UniStrcat(wchar_t *ucs1, const wchar_t *ucs2)
+static inline __le16 *
+UniStrcat(__le16 *ucs1, const __le16 *ucs2)
 {
-       wchar_t *anchor = ucs1; /* save a pointer to start of ucs1 */
+       __le16 *anchor = ucs1;  /* save a pointer to start of ucs1 */
 
        while (*ucs1++) ;       /* To end of first string */
        ucs1--;                 /* Return to the null */
index 5005c7995b6a1a29c59a6cd6628fd16b2864462e..066950671929682399974fb4fb8641cf78c60855 100644 (file)
@@ -4886,7 +4886,7 @@ getDFSRetry:
                                 le16_to_cpu(pSMBr->t2.DataCount),
                                 num_of_nodes, target_nodes, nls_codepage,
                                 remap, search_name,
-                                pSMBr->hdr.Flags2 & SMBFLG2_UNICODE);
+                                (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) != 0);
 
 GetDFSRefExit:
        cifs_buf_release(pSMB);