Commit 0108ce08 authored by Pierre Mariani's avatar Pierre Mariani Committed by Steve French

smb: client: Fix minor whitespace errors and warnings

Fixes no-op checkpatch errors and warnings.
Signed-off-by: default avatarPierre Mariani <pierre.mariani@gmail.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 0dd3ee31
...@@ -483,6 +483,7 @@ static int reconnect_target_unlocked(struct TCP_Server_Info *server, struct dfs_ ...@@ -483,6 +483,7 @@ static int reconnect_target_unlocked(struct TCP_Server_Info *server, struct dfs_
static int reconnect_dfs_server(struct TCP_Server_Info *server) static int reconnect_dfs_server(struct TCP_Server_Info *server)
{ {
struct dfs_cache_tgt_iterator *target_hint = NULL; struct dfs_cache_tgt_iterator *target_hint = NULL;
DFS_CACHE_TGT_LIST(tl); DFS_CACHE_TGT_LIST(tl);
int num_targets = 0; int num_targets = 0;
int rc = 0; int rc = 0;
...@@ -745,6 +746,7 @@ cifs_read_from_socket(struct TCP_Server_Info *server, char *buf, ...@@ -745,6 +746,7 @@ cifs_read_from_socket(struct TCP_Server_Info *server, char *buf,
{ {
struct msghdr smb_msg = {}; struct msghdr smb_msg = {};
struct kvec iov = {.iov_base = buf, .iov_len = to_read}; struct kvec iov = {.iov_base = buf, .iov_len = to_read};
iov_iter_kvec(&smb_msg.msg_iter, ITER_DEST, &iov, 1, to_read); iov_iter_kvec(&smb_msg.msg_iter, ITER_DEST, &iov, 1, to_read);
return cifs_readv_from_socket(server, &smb_msg); return cifs_readv_from_socket(server, &smb_msg);
...@@ -1400,11 +1402,13 @@ cifs_match_ipaddr(struct sockaddr *srcaddr, struct sockaddr *rhs) ...@@ -1400,11 +1402,13 @@ cifs_match_ipaddr(struct sockaddr *srcaddr, struct sockaddr *rhs)
case AF_INET: { case AF_INET: {
struct sockaddr_in *saddr4 = (struct sockaddr_in *)srcaddr; struct sockaddr_in *saddr4 = (struct sockaddr_in *)srcaddr;
struct sockaddr_in *vaddr4 = (struct sockaddr_in *)rhs; struct sockaddr_in *vaddr4 = (struct sockaddr_in *)rhs;
return (saddr4->sin_addr.s_addr == vaddr4->sin_addr.s_addr); return (saddr4->sin_addr.s_addr == vaddr4->sin_addr.s_addr);
} }
case AF_INET6: { case AF_INET6: {
struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *)srcaddr; struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *)srcaddr;
struct sockaddr_in6 *vaddr6 = (struct sockaddr_in6 *)rhs; struct sockaddr_in6 *vaddr6 = (struct sockaddr_in6 *)rhs;
return (ipv6_addr_equal(&saddr6->sin6_addr, &vaddr6->sin6_addr) return (ipv6_addr_equal(&saddr6->sin6_addr, &vaddr6->sin6_addr)
&& saddr6->sin6_scope_id == vaddr6->sin6_scope_id); && saddr6->sin6_scope_id == vaddr6->sin6_scope_id);
} }
...@@ -2599,8 +2603,8 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx) ...@@ -2599,8 +2603,8 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx)
rc = -EOPNOTSUPP; rc = -EOPNOTSUPP;
goto out_fail; goto out_fail;
} else { } else {
cifs_dbg(VFS, "Check vers= mount option. SMB3.11 " cifs_dbg(VFS,
"disabled but required for POSIX extensions\n"); "Check vers= mount option. SMB3.11 disabled but required for POSIX extensions\n");
rc = -EOPNOTSUPP; rc = -EOPNOTSUPP;
goto out_fail; goto out_fail;
} }
...@@ -2743,7 +2747,6 @@ cifs_put_tlink(struct tcon_link *tlink) ...@@ -2743,7 +2747,6 @@ cifs_put_tlink(struct tcon_link *tlink)
if (!IS_ERR(tlink_tcon(tlink))) if (!IS_ERR(tlink_tcon(tlink)))
cifs_put_tcon(tlink_tcon(tlink)); cifs_put_tcon(tlink_tcon(tlink));
kfree(tlink); kfree(tlink);
return;
} }
static int static int
...@@ -2884,6 +2887,7 @@ static inline void ...@@ -2884,6 +2887,7 @@ static inline void
cifs_reclassify_socket4(struct socket *sock) cifs_reclassify_socket4(struct socket *sock)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
BUG_ON(!sock_allow_reclassification(sk)); BUG_ON(!sock_allow_reclassification(sk));
sock_lock_init_class_and_name(sk, "slock-AF_INET-CIFS", sock_lock_init_class_and_name(sk, "slock-AF_INET-CIFS",
&cifs_slock_key[0], "sk_lock-AF_INET-CIFS", &cifs_key[0]); &cifs_slock_key[0], "sk_lock-AF_INET-CIFS", &cifs_key[0]);
...@@ -2893,6 +2897,7 @@ static inline void ...@@ -2893,6 +2897,7 @@ static inline void
cifs_reclassify_socket6(struct socket *sock) cifs_reclassify_socket6(struct socket *sock)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
BUG_ON(!sock_allow_reclassification(sk)); BUG_ON(!sock_allow_reclassification(sk));
sock_lock_init_class_and_name(sk, "slock-AF_INET6-CIFS", sock_lock_init_class_and_name(sk, "slock-AF_INET6-CIFS",
&cifs_slock_key[1], "sk_lock-AF_INET6-CIFS", &cifs_key[1]); &cifs_slock_key[1], "sk_lock-AF_INET6-CIFS", &cifs_key[1]);
...@@ -2927,15 +2932,18 @@ static int ...@@ -2927,15 +2932,18 @@ static int
bind_socket(struct TCP_Server_Info *server) bind_socket(struct TCP_Server_Info *server)
{ {
int rc = 0; int rc = 0;
if (server->srcaddr.ss_family != AF_UNSPEC) { if (server->srcaddr.ss_family != AF_UNSPEC) {
/* Bind to the specified local IP address */ /* Bind to the specified local IP address */
struct socket *socket = server->ssocket; struct socket *socket = server->ssocket;
rc = kernel_bind(socket, rc = kernel_bind(socket,
(struct sockaddr *) &server->srcaddr, (struct sockaddr *) &server->srcaddr,
sizeof(server->srcaddr)); sizeof(server->srcaddr));
if (rc < 0) { if (rc < 0) {
struct sockaddr_in *saddr4; struct sockaddr_in *saddr4;
struct sockaddr_in6 *saddr6; struct sockaddr_in6 *saddr6;
saddr4 = (struct sockaddr_in *)&server->srcaddr; saddr4 = (struct sockaddr_in *)&server->srcaddr;
saddr6 = (struct sockaddr_in6 *)&server->srcaddr; saddr6 = (struct sockaddr_in6 *)&server->srcaddr;
if (saddr6->sin6_family == AF_INET6) if (saddr6->sin6_family == AF_INET6)
...@@ -3165,6 +3173,7 @@ void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon, ...@@ -3165,6 +3173,7 @@ void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon,
if (!CIFSSMBQFSUnixInfo(xid, tcon)) { if (!CIFSSMBQFSUnixInfo(xid, tcon)) {
__u64 cap = le64_to_cpu(tcon->fsUnixInfo.Capability); __u64 cap = le64_to_cpu(tcon->fsUnixInfo.Capability);
cifs_dbg(FYI, "unix caps which server supports %lld\n", cap); cifs_dbg(FYI, "unix caps which server supports %lld\n", cap);
/* /*
* check for reconnect case in which we do not * check for reconnect case in which we do not
...@@ -3668,7 +3677,7 @@ CIFSTCon(const unsigned int xid, struct cifs_ses *ses, ...@@ -3668,7 +3677,7 @@ CIFSTCon(const unsigned int xid, struct cifs_ses *ses,
smb_buffer_response = smb_buffer; smb_buffer_response = smb_buffer;
header_assemble(smb_buffer, SMB_COM_TREE_CONNECT_ANDX, header_assemble(smb_buffer, SMB_COM_TREE_CONNECT_ANDX,
NULL /*no tid */ , 4 /*wct */ ); NULL /*no tid */, 4 /*wct */);
smb_buffer->Mid = get_next_mid(ses->server); smb_buffer->Mid = get_next_mid(ses->server);
smb_buffer->Uid = ses->Suid; smb_buffer->Uid = ses->Suid;
...@@ -3687,12 +3696,12 @@ CIFSTCon(const unsigned int xid, struct cifs_ses *ses, ...@@ -3687,12 +3696,12 @@ CIFSTCon(const unsigned int xid, struct cifs_ses *ses,
if (ses->server->sign) if (ses->server->sign)
smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
if (ses->capabilities & CAP_STATUS32) { if (ses->capabilities & CAP_STATUS32)
smb_buffer->Flags2 |= SMBFLG2_ERR_STATUS; smb_buffer->Flags2 |= SMBFLG2_ERR_STATUS;
}
if (ses->capabilities & CAP_DFS) { if (ses->capabilities & CAP_DFS)
smb_buffer->Flags2 |= SMBFLG2_DFS; smb_buffer->Flags2 |= SMBFLG2_DFS;
}
if (ses->capabilities & CAP_UNICODE) { if (ses->capabilities & CAP_UNICODE) {
smb_buffer->Flags2 |= SMBFLG2_UNICODE; smb_buffer->Flags2 |= SMBFLG2_UNICODE;
length = length =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment