linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: remove unused local variable "store" from ext4_readdir(...)
@ 2014-05-20 14:41 Giedrius Rekasius
  2014-05-20 20:08 ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: Giedrius Rekasius @ 2014-05-20 14:41 UTC (permalink / raw)
  To: Theodore Ts'o
  Cc: Andreas Dilger, linux-ext4, linux-kernel, kernel-janitors,
	linux-fsdevel

From: Giedrius Rekasius <giedrius.rekasius@gmail.com>

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

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

Signed-off-by: Giedrius Rekasius <giedrius.rekasius@gmail.com>
---
 fs/ext4/dir.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index d638c57..ef1bed6 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -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) {

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ext4: remove unused local variable "store" from ext4_readdir(...)
  2014-05-20 14:41 [PATCH] ext4: remove unused local variable "store" from ext4_readdir(...) Giedrius Rekasius
@ 2014-05-20 20:08 ` Dan Carpenter
  2014-05-21 13:41   ` Giedrius Rekasius
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2014-05-20 20:08 UTC (permalink / raw)
  To: Giedrius Rekasius
  Cc: Theodore Ts'o, Andreas Dilger, linux-ext4, linux-kernel,
	kernel-janitors, linux-fsdevel

On Tue, May 20, 2014 at 03:41:13PM +0100, Giedrius Rekasius wrote:
> From: Giedrius Rekasius <giedrius.rekasius@gmail.com>
> 
> Remove unused local variable "store" from ext4_readdir(...)
> 
> Local variable "stored" is initialized however never used inside the function.
> 
> Signed-off-by: Giedrius Rekasius <giedrius.rekasius@gmail.com>

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

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

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ext4: remove unused local variable "store" from ext4_readdir(...)
  2014-05-20 20:08 ` Dan Carpenter
@ 2014-05-21 13:41   ` Giedrius Rekasius
  2014-05-21 13:51     ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: Giedrius Rekasius @ 2014-05-21 13:41 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Theodore Ts'o, Andreas Dilger, linux-ext4, linux-kernel,
	kernel-janitors, linux-fsdevel

On Tue, May 20, 2014 at 11:08:27PM +0300, Dan Carpenter wrote:
> On Tue, May 20, 2014 at 03:41:13PM +0100, Giedrius Rekasius wrote:
> > From: Giedrius Rekasius <giedrius.rekasius@gmail.com>
> > 
> > Remove unused local variable "store" from ext4_readdir(...)
> > 
> > Local variable "stored" is initialized however never used inside the function.
> > 
> > Signed-off-by: Giedrius Rekasius <giedrius.rekasius@gmail.com>
> 
> 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 <giedrius.rekasius@gmail.com>

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

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

Signed-off-by: Giedrius Rekasius <giedrius.rekasius@gmail.com>
---
 fs/ext4/dir.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index d638c57..ef1bed6 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -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) {

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ext4: remove unused local variable "store" from ext4_readdir(...)
  2014-05-21 13:41   ` Giedrius Rekasius
@ 2014-05-21 13:51     ` Dan Carpenter
  2014-05-21 15:16       ` Giedrius Rekasius
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2014-05-21 13:51 UTC (permalink / raw)
  To: Giedrius Rekasius
  Cc: Theodore Ts'o, Andreas Dilger, linux-ext4, linux-kernel,
	kernel-janitors, linux-fsdevel

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

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ext4: remove unused local variable "store" from ext4_readdir(...)
  2014-05-21 13:51     ` Dan Carpenter
@ 2014-05-21 15:16       ` Giedrius Rekasius
  0 siblings, 0 replies; 5+ messages in thread
From: Giedrius Rekasius @ 2014-05-21 15:16 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Theodore Ts'o, Andreas Dilger, linux-ext4, linux-kernel,
	kernel-janitors, linux-fsdevel

On Wed, May 21, 2014 at 04:51:30PM +0300, Dan Carpenter wrote:
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-05-21 15:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-20 14:41 [PATCH] ext4: remove unused local variable "store" from ext4_readdir(...) Giedrius Rekasius
2014-05-20 20:08 ` Dan Carpenter
2014-05-21 13:41   ` Giedrius Rekasius
2014-05-21 13:51     ` Dan Carpenter
2014-05-21 15:16       ` Giedrius Rekasius

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).