public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] jffs2: remove unneeded kfree.
@ 2015-04-07  8:06 fangwei
  2015-07-06 22:23 ` Brian Norris
  0 siblings, 1 reply; 5+ messages in thread
From: fangwei @ 2015-04-07  8:06 UTC (permalink / raw)
  To: dwmw2, linux-mtd

c->oobbuf hasn't been kmalloced in jffs2_dataflash_setup, so
there is no need to free it.

Signed-off-by: Wei Fang <fangwei1@huawei.com>
---
 fs/jffs2/wbuf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
index 09ed551..63f31c0 100644
--- a/fs/jffs2/wbuf.c
+++ b/fs/jffs2/wbuf.c
@@ -1274,7 +1274,6 @@ int jffs2_dataflash_setup(struct jffs2_sb_info *c) {
 #ifdef CONFIG_JFFS2_FS_WBUF_VERIFY
        c->wbuf_verify = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
        if (!c->wbuf_verify) {
-               kfree(c->oobbuf);
                kfree(c->wbuf);
                return -ENOMEM;
        }
-- 
1.8.3.1

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

* [PATCH] jffs2: remove unneeded kfree
@ 2015-06-25  7:29 Wei Fang
  2015-07-06 22:27 ` Brian Norris
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Fang @ 2015-06-25  7:29 UTC (permalink / raw)
  To: computersforpeace, dwmw2; +Cc: linux-mtd

c->oobbuf hasn't been kmalloced in jffs2_dataflash_setup, so
there is no need to free it.

Signed-off-by: Wei Fang <fangwei1@huawei.com>
---
 fs/jffs2/wbuf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
index 09ed551..63f31c0 100644
--- a/fs/jffs2/wbuf.c
+++ b/fs/jffs2/wbuf.c
@@ -1274,7 +1274,6 @@ int jffs2_dataflash_setup(struct jffs2_sb_info *c) {
 #ifdef CONFIG_JFFS2_FS_WBUF_VERIFY
        c->wbuf_verify = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
        if (!c->wbuf_verify) {
-               kfree(c->oobbuf);
                kfree(c->wbuf);
                return -ENOMEM;
        }
-- 1.8.3.1

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

* Re: [PATCH] jffs2: remove unneeded kfree.
  2015-04-07  8:06 fangwei
@ 2015-07-06 22:23 ` Brian Norris
  2015-07-07  1:43   ` Wei Fang
  0 siblings, 1 reply; 5+ messages in thread
From: Brian Norris @ 2015-07-06 22:23 UTC (permalink / raw)
  To: fangwei; +Cc: dwmw2, linux-mtd

On Tue, Apr 07, 2015 at 04:06:59PM +0800, fangwei wrote:
> c->oobbuf hasn't been kmalloced in jffs2_dataflash_setup, so
> there is no need to free it.
> 
> Signed-off-by: Wei Fang <fangwei1@huawei.com>
> ---
>  fs/jffs2/wbuf.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
> index 09ed551..63f31c0 100644
> --- a/fs/jffs2/wbuf.c
> +++ b/fs/jffs2/wbuf.c
> @@ -1274,7 +1274,6 @@ int jffs2_dataflash_setup(struct jffs2_sb_info *c) {
>  #ifdef CONFIG_JFFS2_FS_WBUF_VERIFY
>         c->wbuf_verify = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
>         if (!c->wbuf_verify) {
> -               kfree(c->oobbuf);
>                 kfree(c->wbuf);
>                 return -ENOMEM;
>         }

Your patches are whitespace damaged and cannot be applied. Please fix
your mailer and resend. Consider retesting by sending to yourself and
try using git-am. If all else fails, git-send-email is your friend.

Thanks,
Brian

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

* Re: [PATCH] jffs2: remove unneeded kfree
  2015-06-25  7:29 [PATCH] jffs2: remove unneeded kfree Wei Fang
@ 2015-07-06 22:27 ` Brian Norris
  0 siblings, 0 replies; 5+ messages in thread
From: Brian Norris @ 2015-07-06 22:27 UTC (permalink / raw)
  To: Wei Fang; +Cc: dwmw2, linux-mtd

On Thu, Jun 25, 2015 at 03:29:37PM +0800, Wei Fang wrote:
> c->oobbuf hasn't been kmalloced in jffs2_dataflash_setup, so
> there is no need to free it.
> 
> Signed-off-by: Wei Fang <fangwei1@huawei.com>
> ---
>  fs/jffs2/wbuf.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
> index 09ed551..63f31c0 100644
> --- a/fs/jffs2/wbuf.c
> +++ b/fs/jffs2/wbuf.c
> @@ -1274,7 +1274,6 @@ int jffs2_dataflash_setup(struct jffs2_sb_info *c) {
>  #ifdef CONFIG_JFFS2_FS_WBUF_VERIFY
>         c->wbuf_verify = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
>         if (!c->wbuf_verify) {
> -               kfree(c->oobbuf);
>                 kfree(c->wbuf);
>                 return -ENOMEM;
>         }

I just realized I responded to your email from months ago. But I see you
sent the same patch here. Both are similarly whitespace damaged. Please
fix and test on your end before resending again.

Thanks,
Brian

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

* Re: [PATCH] jffs2: remove unneeded kfree.
  2015-07-06 22:23 ` Brian Norris
@ 2015-07-07  1:43   ` Wei Fang
  0 siblings, 0 replies; 5+ messages in thread
From: Wei Fang @ 2015-07-07  1:43 UTC (permalink / raw)
  To: Brian Norris; +Cc: dwmw2, linux-mtd

Hi Brian,

Sorry, my bad, I configed my editor with expandtab. I'll
fix it and test it in my end, then resend it.

Thanks,
Wei

On 2015/7/7 6:23, Brian Norris wrote:
> On Tue, Apr 07, 2015 at 04:06:59PM +0800, fangwei wrote:
>> c->oobbuf hasn't been kmalloced in jffs2_dataflash_setup, so
>> there is no need to free it.
>>
>> Signed-off-by: Wei Fang <fangwei1@huawei.com>
>> ---
>>  fs/jffs2/wbuf.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
>> index 09ed551..63f31c0 100644
>> --- a/fs/jffs2/wbuf.c
>> +++ b/fs/jffs2/wbuf.c
>> @@ -1274,7 +1274,6 @@ int jffs2_dataflash_setup(struct jffs2_sb_info *c) {
>>  #ifdef CONFIG_JFFS2_FS_WBUF_VERIFY
>>         c->wbuf_verify = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
>>         if (!c->wbuf_verify) {
>> -               kfree(c->oobbuf);
>>                 kfree(c->wbuf);
>>                 return -ENOMEM;
>>         }
> 
> Your patches are whitespace damaged and cannot be applied. Please fix
> your mailer and resend. Consider retesting by sending to yourself and
> try using git-am. If all else fails, git-send-email is your friend.
> 
> Thanks,
> Brian
> 
> 

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

end of thread, other threads:[~2015-07-07  1:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-25  7:29 [PATCH] jffs2: remove unneeded kfree Wei Fang
2015-07-06 22:27 ` Brian Norris
  -- strict thread matches above, loose matches on Subject: below --
2015-04-07  8:06 fangwei
2015-07-06 22:23 ` Brian Norris
2015-07-07  1:43   ` Wei Fang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox