Skip to contentSkip to conversation

ext4: remove unused local variable "store" from ext4_readdir(...)

PATCH In review Giedrius Rekasius 2 participants 5 messages May 20, 2014 – May 21, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4: remove unused local variable "store" from ext4_readdir(...)

From: Giedrius Rekasius <[email protected]>

Remove unused local variable "store" from ext4_readdir(...)

Local variable "stored" is initialized however never used inside the function.

---
 fs/ext4/dir.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/ext4/dir.c +1 -2
index d638c57..ef1bed6 100644
@@ -105,7 +105,7 @@ int __ext4_check_dir_entry(const char *function, u
 static int ext4_readdir(struct file *file, struct dir_context *ctx)
 {
        unsigned int offset;
-       int i, stored;
+       int i;
        struct ext4_dir_entry_2 *de;
        int err;
        struct inode *inode = file_inode(file);
@@ -133,7 +133,6 @@ static int ext4_readdir(struct file *file, struct
                        return ret;
        }
 
-       stored = 0;
        offset = ctx->pos & (sb->s_blocksize - 1);
 
        while (ctx->pos < inode->i_size) {
#1 lore raw
Quoted 7 lines · Giedrius Rekasius

From: Giedrius Rekasius <[email protected]>

Remove unused local variable "store" from ext4_readdir(...)

Local variable "stored" is initialized however never used inside the function.

You email client is corrupting the patch so it doesn't apply.

Read Documentation/email-clients.txt (linux-next version).

regards,
dan carpenter

#2 lore raw
Quoted 5 lines · Dan Carpenter
Quoted 4 lines · Giedrius Rekasius

From: Giedrius Rekasius <[email protected]>

Remove unused local variable "store" from ext4_readdir(...)

Quoted 7 lines
Quoted 3 lines

Local variable "stored" is initialized however never used inside the function.

You email client is corrupting the patch so it doesn't apply.

Read Documentation/email-clients.txt (linux-next version).

Indeed the patch was corrupt, my apologies for that. Patch resubmission below.

From: Giedrius Rekasius <[email protected]>

Remove unused local variable "store" from ext4_readdir(...)

Local variable "stored" is initialized however never used inside the function.

---
 fs/ext4/dir.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/ext4/dir.c +1 -2
index d638c57..ef1bed6 100644
@@ -105,7 +105,7 @@ int __ext4_check_dir_entry(const char *function, unsigned int line,
 static int ext4_readdir(struct file *file, struct dir_context *ctx)
 {
 	unsigned int offset;
-	int i, stored;
+	int i;
 	struct ext4_dir_entry_2 *de;
 	int err;
 	struct inode *inode = file_inode(file);
@@ -133,7 +133,6 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx)
 			return ret;
 	}
 
-	stored = 0;
 	offset = ctx->pos & (sb->s_blocksize - 1);
 
 	while (ctx->pos < inode->i_size) {
#4 lore raw
Quoted 7 lines · Dan Carpenter

Better, but still not quite right. Read paragraph 2 from
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Documentation/email-clients.txt

Try applying this patch with git am, then review the log. It has our entire conversation preserved for ever in the git history.

https://www.google.com/search?q=how+to+send+a+v2+patch

Thank you for explanation Dan, I think I got it this time.

I'm going to resubmit this patch in a new thread because there is a typo in the subject.

Regards,
Giedrius