[PATCH 02/10] cifs: Make "resp_buf_type" initialization consistent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The majority of cifs_send_recv() do not initialize resp_buf_type, make
this consistent in all callers. Probably does not make a difference in
performance, but the consistency improves readability.

Signed-off-by: Volker Lendecke <vl@xxxxxxxxx>
---
 fs/cifs/cifssmb.c |  6 +++---
 fs/cifs/smb2pdu.c | 14 +++++++-------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index a43c78396dd8..1f02c66e5716 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1378,7 +1378,7 @@ CIFSSMBRead(const unsigned int xid, struct cifs_io_parms *io_parms,
 	READ_RSP *pSMBr = NULL;
 	char *pReadData = NULL;
 	int wct;
-	int resp_buf_type = 0;
+	int resp_buf_type;
 	struct kvec iov[1];
 	struct kvec rsp_iov;
 	__u32 pid = io_parms->pid;
@@ -1742,7 +1742,7 @@ CIFSSMBWrite2(const unsigned int xid, struct cifs_io_parms *io_parms,
 	WRITE_REQ *pSMB = NULL;
 	int wct;
 	int smb_hdr_len;
-	int resp_buf_type = 0;
+	int resp_buf_type;
 	__u32 pid = io_parms->pid;
 	__u16 netfid = io_parms->netfid;
 	__u64 offset = io_parms->offset;
@@ -1966,7 +1966,7 @@ CIFSSMBPosixLock(const unsigned int xid, struct cifs_tcon *tcon,
 	int rc = 0;
 	int timeout = 0;
 	int bytes_returned = 0;
-	int resp_buf_type = 0;
+	int resp_buf_type;
 	__u16 params, param_offset, offset, byte_count, count;
 	struct kvec iov[1];
 	struct kvec rsp_iov;
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 0e53265e1462..dede2d422c1f 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -2952,7 +2952,7 @@ SMB2_open(const unsigned int xid, struct cifs_open_parms *oparms, __le16 *path,
 	struct TCP_Server_Info *server = cifs_pick_channel(ses);
 	struct kvec iov[SMB2_CREATE_IOV_SIZE];
 	struct kvec rsp_iov = {NULL, 0};
-	int resp_buftype = CIFS_NO_BUFFER;
+	int resp_buftype;
 	int rc = 0;
 	int flags = 0;
 
@@ -3149,7 +3149,7 @@ SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,
 	struct TCP_Server_Info *server;
 	struct kvec iov[SMB2_IOCTL_IOV_SIZE];
 	struct kvec rsp_iov = {NULL, 0};
-	int resp_buftype = CIFS_NO_BUFFER;
+	int resp_buftype;
 	int rc = 0;
 	int flags = 0;
 
@@ -3330,7 +3330,7 @@ __SMB2_close(const unsigned int xid, struct cifs_tcon *tcon,
 	struct TCP_Server_Info *server = cifs_pick_channel(ses);
 	struct kvec iov[1];
 	struct kvec rsp_iov;
-	int resp_buftype = CIFS_NO_BUFFER;
+	int resp_buftype;
 	int rc = 0;
 	int flags = 0;
 	bool query_attrs = false;
@@ -3514,7 +3514,7 @@ query_info(const unsigned int xid, struct cifs_tcon *tcon,
 	struct kvec iov[1];
 	struct kvec rsp_iov;
 	int rc = 0;
-	int resp_buftype = CIFS_NO_BUFFER;
+	int resp_buftype;
 	struct cifs_ses *ses = tcon->ses;
 	struct TCP_Server_Info *server;
 	int flags = 0;
@@ -3693,7 +3693,7 @@ SMB2_change_notify(const unsigned int xid, struct cifs_tcon *tcon,
 	struct smb2_change_notify_rsp *smb_rsp;
 	struct kvec iov[1];
 	struct kvec rsp_iov = {NULL, 0};
-	int resp_buftype = CIFS_NO_BUFFER;
+	int resp_buftype;
 	int flags = 0;
 	int rc = 0;
 
@@ -3983,7 +3983,7 @@ SMB2_flush(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,
 	struct kvec iov[1];
 	struct kvec rsp_iov = {NULL, 0};
 	struct TCP_Server_Info *server = cifs_pick_channel(ses);
-	int resp_buftype = CIFS_NO_BUFFER;
+	int resp_buftype;
 	int flags = 0;
 	int rc = 0;
 
@@ -5016,7 +5016,7 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
 	struct smb_rqst rqst;
 	struct kvec iov[SMB2_QUERY_DIRECTORY_IOV_SIZE];
 	struct smb2_query_directory_rsp *rsp = NULL;
-	int resp_buftype = CIFS_NO_BUFFER;
+	int resp_buftype;
 	struct kvec rsp_iov;
 	int rc = 0;
 	struct cifs_ses *ses = tcon->ses;
-- 
2.30.2




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux