From: "Justin P. Mattock" <justinmattock@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: zippel@linux-m68k.org, linux-fsdevel@vger.kernel.org,
rusty@rustcorp.com.au, linux-audit@redhat.com
Subject: [PATCH 3/6]cifs Fix variable not set warnings
Date: Fri, 11 Jun 2010 13:41:06 -0700 [thread overview]
Message-ID: <1276288869-16815-4-git-send-email-justinmattock@gmail.com> (raw)
In-Reply-To: <1276288869-16815-1-git-send-email-justinmattock@gmail.com>
The patch below fixes the warning messages from
gcc 4.6.0 and compiling the kernel.
CC [M] fs/cifs/file.o
fs/cifs/file.c: In function 'cifs_partialpagewrite':
fs/cifs/file.c:1315:23: warning: variable 'pTcon' set but not used
CC [M] fs/cifs/dir.o
fs/cifs/dir.c: In function 'cifs_lookup':
fs/cifs/dir.c:641:15: warning: variable 'filp' set but not used
CC [M] fs/cifs/cifssmb.o
fs/cifs/cifssmb.c: In function 'CIFSSMBSetFileSize':
fs/cifs/cifssmb.c:4855:8: warning: variable 'data_offset' set but not used
CC [M] fs/cifs/cifs_debug.o
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
---
fs/cifs/cifssmb.c | 4 +---
fs/cifs/dir.c | 4 +---
fs/cifs/file.c | 6 +-----
3 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index c65c341..ca872c3 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -4852,7 +4852,6 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size,
__u16 fid, __u32 pid_of_opener, bool SetAllocation)
{
struct smb_com_transaction2_sfi_req *pSMB = NULL;
- char *data_offset;
struct file_end_of_file_info *parm_data;
int rc = 0;
__u16 params, param_offset, offset, byte_count, count;
@@ -4876,8 +4875,7 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size,
param_offset = offsetof(struct smb_com_transaction2_sfi_req, Fid) - 4;
offset = param_offset + params;
- data_offset = (char *) (&pSMB->hdr.Protocol) + offset;
-
+
count = sizeof(struct file_end_of_file_info);
pSMB->MaxParameterCount = cpu_to_le16(2);
/* BB find exact max SMB PDU from sess structure BB */
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 391816b..cd409c0 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -638,8 +638,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
struct cifsTconInfo *pTcon;
struct inode *newInode = NULL;
char *full_path = NULL;
- struct file *filp;
-
+
xid = GetXid();
cFYI(1, "parent inode = 0x%p name is: %s and dentry = 0x%p",
@@ -734,7 +733,6 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
direntry->d_op = &cifs_dentry_ops;
d_add(direntry, newInode);
if (posix_open)
- filp = lookup_instantiate_filp(nd, direntry, NULL);
/* since paths are not looked up by component - the parent
directories are presumed to be good here */
renew_parental_timestamps(direntry);
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 75541af..bbb66d5 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1311,8 +1311,6 @@ static int cifs_partialpagewrite(struct page *page, unsigned from, unsigned to)
char *write_data;
int rc = -EFAULT;
int bytes_written = 0;
- struct cifs_sb_info *cifs_sb;
- struct cifsTconInfo *pTcon;
struct inode *inode;
struct cifsFileInfo *open_file;
@@ -1320,9 +1318,7 @@ static int cifs_partialpagewrite(struct page *page, unsigned from, unsigned to)
return -EFAULT;
inode = page->mapping->host;
- cifs_sb = CIFS_SB(inode->i_sb);
- pTcon = cifs_sb->tcon;
-
+
offset += (loff_t)from;
write_data = kmap(page);
write_data += from;
--
1.7.1.rc1.21.gf3bd6
next prev parent reply other threads:[~2010-06-11 20:41 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-11 20:41 [PATCH 0/6] Fix gcc warnings of unused variables etc Justin P. Mattock
2010-06-11 20:41 ` [PATCH 1/6]scripts:conf.c Fix warning: variable 'type' set but not used Justin P. Mattock
2010-06-11 22:19 ` Michal Marek
2010-06-11 22:24 ` Justin P. Mattock
2010-06-11 20:41 ` [PATCH 2/6]kernel:audit.c Fix warning: variable 'nlh' " Justin P. Mattock
2010-06-11 21:14 ` Geert Uytterhoeven
2010-06-11 22:03 ` Justin P. Mattock
2010-06-19 4:45 ` Justin P. Mattock
2010-06-19 8:06 ` Geert Uytterhoeven
2010-06-19 13:29 ` Justin P. Mattock
2010-06-11 20:41 ` Justin P. Mattock [this message]
2010-06-20 13:22 ` [PATCH 3/6]cifs Fix variable not set warnings Alessandro Guido
2010-06-20 13:29 ` Justin P. Mattock
2010-06-11 20:41 ` [PATCH 4/6]hfs Fix variable set but not used Justin P. Mattock
2010-06-11 20:41 ` [PATCH 5/6]kernel:module.c variable 'nowarn' " Justin P. Mattock
2010-06-11 21:17 ` Geert Uytterhoeven
2010-06-11 22:06 ` Justin P. Mattock
2010-06-19 5:04 ` Justin P. Mattock
2010-06-19 8:08 ` Geert Uytterhoeven
2010-06-19 13:41 ` Justin P. Mattock
2010-06-19 19:10 ` Justin P. Mattock
2010-06-19 19:45 ` Geert Uytterhoeven
2010-06-19 20:10 ` Justin P. Mattock
2010-06-19 20:23 ` Geert Uytterhoeven
2010-06-19 20:26 ` Justin P. Mattock
2010-06-11 20:41 ` [PATCH 6/6]afs:fsclient.c Fix variable 'bp' " Justin P. Mattock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1276288869-16815-4-git-send-email-justinmattock@gmail.com \
--to=justinmattock@gmail.com \
--cc=linux-audit@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=zippel@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).