cifs: fix printk format warnings
authorRandy Dunlap <rdunlap@xenotime.net>
Tue, 31 Jan 2012 03:50:01 +0000 (19:50 -0800)
committerSteve French <smfrench@gmail.com>
Tue, 31 Jan 2012 13:42:08 +0000 (07:42 -0600)
Fix printk format warnings for ssize_t variables:

fs/cifs/connect.c:2145:3: warning: format '%ld' expects type 'long int', but argument 3 has type 'ssize_t'
fs/cifs/connect.c:2152:3: warning: format '%ld' expects type 'long int', but argument 3 has type 'ssize_t'
fs/cifs/connect.c:2160:3: warning: format '%ld' expects type 'long int', but argument 3 has type 'ssize_t'
fs/cifs/connect.c:2170:3: warning: format '%ld' expects type 'long int', but argument 3 has type 'ssize_t'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Jeff Layton <jlayton@redhat.com>
Cc: linux-cifs@vger.kernel.org

fs/cifs/connect.c

index 026d6464335bd1e9af8a278eadc2e339212cf6a9..9c288653e6d6a6f6d6bdb813f41f23f1cd5552c4 100644 (file)
@@ -2142,14 +2142,14 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses)
 
        len = delim - payload;
        if (len > MAX_USERNAME_SIZE || len <= 0) {
-               cFYI(1, "Bad value from username search (len=%ld)", len);
+               cFYI(1, "Bad value from username search (len=%zd)", len);
                rc = -EINVAL;
                goto out_key_put;
        }
 
        vol->username = kstrndup(payload, len, GFP_KERNEL);
        if (!vol->username) {
-               cFYI(1, "Unable to allocate %ld bytes for username", len);
+               cFYI(1, "Unable to allocate %zd bytes for username", len);
                rc = -ENOMEM;
                goto out_key_put;
        }
@@ -2157,7 +2157,7 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses)
 
        len = key->datalen - (len + 1);
        if (len > MAX_PASSWORD_SIZE || len <= 0) {
-               cFYI(1, "Bad len for password search (len=%ld)", len);
+               cFYI(1, "Bad len for password search (len=%zd)", len);
                rc = -EINVAL;
                kfree(vol->username);
                vol->username = NULL;
@@ -2167,7 +2167,7 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses)
        ++delim;
        vol->password = kstrndup(delim, len, GFP_KERNEL);
        if (!vol->password) {
-               cFYI(1, "Unable to allocate %ld bytes for password", len);
+               cFYI(1, "Unable to allocate %zd bytes for password", len);
                rc = -ENOMEM;
                kfree(vol->username);
                vol->username = NULL;