Commit 7d83dc5e authored by Steve French's avatar Steve French

Fix sparse tool compile warnings for cifs

Signed-off-by: Steve French (sfrench@us.ibm.com>
parent 981a1ad3
......@@ -400,7 +400,7 @@ cifsFYI_read(char *page, char **start, off_t off, int count,
return len;
}
static int
cifsFYI_write(struct file *file, const char *buffer,
cifsFYI_write(struct file *file, const char __user *buffer,
unsigned long count, void *data)
{
char c;
......@@ -439,7 +439,7 @@ oplockEnabled_read(char *page, char **start, off_t off,
return len;
}
static int
oplockEnabled_write(struct file *file, const char *buffer,
oplockEnabled_write(struct file *file, const char __user *buffer,
unsigned long count, void *data)
{
char c;
......@@ -479,7 +479,7 @@ quotaEnabled_read(char *page, char **start, off_t off,
return len;
}
static int
quotaEnabled_write(struct file *file, const char *buffer,
quotaEnabled_write(struct file *file, const char __user *buffer,
unsigned long count, void *data)
{
char c;
......@@ -519,7 +519,7 @@ linuxExtensionsEnabled_read(char *page, char **start, off_t off,
return len;
}
static int
linuxExtensionsEnabled_write(struct file *file, const char *buffer,
linuxExtensionsEnabled_write(struct file *file, const char __user *buffer,
unsigned long count, void *data)
{
char c;
......@@ -559,7 +559,7 @@ lookupFlag_read(char *page, char **start, off_t off,
return len;
}
static int
lookupFlag_write(struct file *file, const char *buffer,
lookupFlag_write(struct file *file, const char __user *buffer,
unsigned long count, void *data)
{
char c;
......@@ -597,7 +597,7 @@ traceSMB_read(char *page, char **start, off_t off, int count,
return len;
}
static int
traceSMB_write(struct file *file, const char *buffer,
traceSMB_write(struct file *file, const char __user *buffer,
unsigned long count, void *data)
{
char c;
......@@ -636,7 +636,7 @@ multiuser_mount_read(char *page, char **start, off_t off,
return len;
}
static int
multiuser_mount_write(struct file *file, const char *buffer,
multiuser_mount_write(struct file *file, const char __user *buffer,
unsigned long count, void *data)
{
char c;
......@@ -675,7 +675,7 @@ extended_security_read(char *page, char **start, off_t off,
return len;
}
static int
extended_security_write(struct file *file, const char *buffer,
extended_security_write(struct file *file, const char __user *buffer,
unsigned long count, void *data)
{
char c;
......@@ -714,7 +714,7 @@ ntlmv2_enabled_read(char *page, char **start, off_t off,
return len;
}
static int
ntlmv2_enabled_write(struct file *file, const char *buffer,
ntlmv2_enabled_write(struct file *file, const char __user *buffer,
unsigned long count, void *data)
{
char c;
......@@ -753,7 +753,7 @@ packet_signing_enabled_read(char *page, char **start, off_t off,
return len;
}
static int
packet_signing_enabled_write(struct file *file, const char *buffer,
packet_signing_enabled_write(struct file *file, const char __user *buffer,
unsigned long count, void *data)
{
char c;
......
......@@ -426,7 +426,7 @@ cifs_get_sb(struct file_system_type *fs_type,
}
static ssize_t
cifs_read_wrapper(struct file * file, char *read_data, size_t read_size,
cifs_read_wrapper(struct file * file, char __user *read_data, size_t read_size,
loff_t * poffset)
{
if(file == NULL)
......@@ -455,7 +455,7 @@ cifs_read_wrapper(struct file * file, char *read_data, size_t read_size,
}
static ssize_t
cifs_write_wrapper(struct file * file, const char *write_data,
cifs_write_wrapper(struct file * file, const char __user *write_data,
size_t write_size, loff_t * poffset)
{
ssize_t written;
......
......@@ -85,7 +85,7 @@ extern struct dentry_operations cifs_dentry_ops;
/* Functions related to symlinks */
extern int cifs_follow_link(struct dentry *direntry, struct nameidata *nd);
extern int cifs_readlink(struct dentry *direntry, char *buffer, int buflen);
extern int cifs_readlink(struct dentry *direntry, char __user *buffer, int buflen);
extern int cifs_symlink(struct inode *inode, struct dentry *direntry,
const char *symname);
extern int cifs_removexattr(struct dentry *, const char *);
......
......@@ -1559,7 +1559,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses,
bcc_ptr +=
pSMBr->resp.SecurityBlobLength;
if (smb_buffer->Flags2 &= SMBFLG2_UNICODE) {
if (smb_buffer->Flags2 & SMBFLG2_UNICODE) {
if ((long) (bcc_ptr) % 2) {
remaining_words =
(BCC(smb_buffer_response)
......@@ -1812,7 +1812,7 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses,
pSMBr->resp.SecurityBlobLength));
}
if (smb_buffer->Flags2 &= SMBFLG2_UNICODE) {
if (smb_buffer->Flags2 & SMBFLG2_UNICODE) {
if ((long) (bcc_ptr) % 2) {
remaining_words =
(BCC(smb_buffer_response)
......@@ -2123,7 +2123,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
ses->server->secMode |=
SECMODE_SIGN_ENABLED;
if (smb_buffer->Flags2 &= SMBFLG2_UNICODE) {
if (smb_buffer->Flags2 & SMBFLG2_UNICODE) {
if ((long) (bcc_ptr) % 2) {
remaining_words =
(BCC(smb_buffer_response)
......@@ -2519,7 +2519,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
cFYI(1,
("NTLMSSP response to Authenticate "));
if (smb_buffer->Flags2 &= SMBFLG2_UNICODE) {
if (smb_buffer->Flags2 & SMBFLG2_UNICODE) {
if ((long) (bcc_ptr) % 2) {
remaining_words =
(BCC(smb_buffer_response)
......@@ -2718,7 +2718,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
/* skip service field (NB: this field is always ASCII) */
bcc_ptr += length + 1;
strncpy(tcon->treeName, tree, MAX_TREE_SIZE);
if (smb_buffer->Flags2 &= SMBFLG2_UNICODE) {
if (smb_buffer->Flags2 & SMBFLG2_UNICODE) {
length = UniStrnlen((wchar_t *) bcc_ptr, 512);
if (((long) bcc_ptr + (2 * length)) -
(long) pByteArea(smb_buffer_response) <=
......
......@@ -210,7 +210,7 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname)
}
int
cifs_readlink(struct dentry *direntry, char *pBuffer, int buflen)
cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
{
struct inode *inode = direntry->d_inode;
int rc = -EACCES;
......
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