All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerard Lledo <gerard.lledo@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-mtd@lists.infradead.org,
	Gerard Lledo <gerard.lledo@gmail.com>,
	dwmw2@infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] [JFFS2] jffs2_start_garbage_collect_thread() return value cleanup
Date: Tue,  2 Jun 2009 15:11:26 +0300	[thread overview]
Message-ID: <1243944686-7039-2-git-send-email-gerard.lledo@gmail.com> (raw)
In-Reply-To: <1243944686-7039-1-git-send-email-gerard.lledo@gmail.com>

There is no user of this return value in the kernel.  Change it to return void
instead.
---
 fs/jffs2/background.c |    7 +------
 fs/jffs2/os-linux.h   |    2 +-
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c
index 3ff50da..3ae7e5c 100644
--- a/fs/jffs2/background.c
+++ b/fs/jffs2/background.c
@@ -30,10 +30,9 @@ void jffs2_garbage_collect_trigger(struct jffs2_sb_info *c)
 }
 
 /* This must only ever be called when no GC thread is currently running */
-int jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c)
+void jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c)
 {
 	struct task_struct *tsk;
-	int ret = 0;
 
 	BUG_ON(c->gc_task);
 
@@ -44,15 +43,11 @@ int jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c)
 	if (IS_ERR(tsk)) {
 		printk(KERN_WARNING "fork failed for JFFS2 garbage collect thread: %ld\n", -PTR_ERR(tsk));
 		complete(&c->gc_thread_exit);
-		ret = PTR_ERR(tsk);
 	} else {
 		/* Wait for it... */
 		D1(printk(KERN_DEBUG "JFFS2: Garbage collect thread is pid %d\n", tsk->pid));
 		wait_for_completion(&c->gc_thread_start);
-		ret = tsk->pid;
 	}
-
-	return ret;
 }
 
 void jffs2_stop_garbage_collect_thread(struct jffs2_sb_info *c)
diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
index 2228380..f3184ac 100644
--- a/fs/jffs2/os-linux.h
+++ b/fs/jffs2/os-linux.h
@@ -151,7 +151,7 @@ static inline void jffs2_erase_pending_trigger(struct jffs2_sb_info *c)
 }
 
 /* background.c */
-int jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c);
+void jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c);
 void jffs2_stop_garbage_collect_thread(struct jffs2_sb_info *c);
 void jffs2_garbage_collect_trigger(struct jffs2_sb_info *c);
 
-- 
1.5.6.5

WARNING: multiple messages have this Message-ID (diff)
From: Gerard Lledo <gerard.lledo@gmail.com>
To: akpm@linux-foundation.org
Cc: dwmw2@infradead.org, linux-mtd@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Gerard Lledo <gerard.lledo@gmail.com>
Subject: [PATCH] [JFFS2] jffs2_start_garbage_collect_thread() return value cleanup
Date: Tue,  2 Jun 2009 15:11:26 +0300	[thread overview]
Message-ID: <1243944686-7039-2-git-send-email-gerard.lledo@gmail.com> (raw)
In-Reply-To: <1243944686-7039-1-git-send-email-gerard.lledo@gmail.com>

There is no user of this return value in the kernel.  Change it to return void
instead.
---
 fs/jffs2/background.c |    7 +------
 fs/jffs2/os-linux.h   |    2 +-
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c
index 3ff50da..3ae7e5c 100644
--- a/fs/jffs2/background.c
+++ b/fs/jffs2/background.c
@@ -30,10 +30,9 @@ void jffs2_garbage_collect_trigger(struct jffs2_sb_info *c)
 }
 
 /* This must only ever be called when no GC thread is currently running */
-int jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c)
+void jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c)
 {
 	struct task_struct *tsk;
-	int ret = 0;
 
 	BUG_ON(c->gc_task);
 
@@ -44,15 +43,11 @@ int jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c)
 	if (IS_ERR(tsk)) {
 		printk(KERN_WARNING "fork failed for JFFS2 garbage collect thread: %ld\n", -PTR_ERR(tsk));
 		complete(&c->gc_thread_exit);
-		ret = PTR_ERR(tsk);
 	} else {
 		/* Wait for it... */
 		D1(printk(KERN_DEBUG "JFFS2: Garbage collect thread is pid %d\n", tsk->pid));
 		wait_for_completion(&c->gc_thread_start);
-		ret = tsk->pid;
 	}
-
-	return ret;
 }
 
 void jffs2_stop_garbage_collect_thread(struct jffs2_sb_info *c)
diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
index 2228380..f3184ac 100644
--- a/fs/jffs2/os-linux.h
+++ b/fs/jffs2/os-linux.h
@@ -151,7 +151,7 @@ static inline void jffs2_erase_pending_trigger(struct jffs2_sb_info *c)
 }
 
 /* background.c */
-int jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c);
+void jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c);
 void jffs2_stop_garbage_collect_thread(struct jffs2_sb_info *c);
 void jffs2_garbage_collect_trigger(struct jffs2_sb_info *c);
 
-- 
1.5.6.5


  reply	other threads:[~2009-06-02 12:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-29  8:19 [PATCH] [JFFS2] Move jffs2_gcd_mtd threads to the new kthread API Gerard Lledo
2009-05-29  8:19 ` Gerard Lledo
2009-05-29  8:19 ` Gerard Lledo
2009-06-01 23:20 ` [PATCH] [JFFS2] Move jffs2_gcd_mtd threads to the new kthread Andrew Morton
2009-06-01 23:20   ` [PATCH] [JFFS2] Move jffs2_gcd_mtd threads to the new kthread API Andrew Morton
2009-06-01 23:20   ` Andrew Morton
2009-06-02 11:32   ` [PATCH] [JFFS2] Move jffs2_gcd_mtd threads to the new kthread Gerard Lledo
2009-06-02 11:32     ` [PATCH] [JFFS2] Move jffs2_gcd_mtd threads to the new kthread API Gerard Lledo
2009-06-02 11:32     ` Gerard Lledo
2009-06-02 12:11     ` Gerard Lledo
2009-06-02 12:11       ` Gerard Lledo
2009-06-02 12:11       ` Gerard Lledo [this message]
2009-06-02 12:11         ` [PATCH] [JFFS2] jffs2_start_garbage_collect_thread() return value cleanup Gerard Lledo
2009-06-02 22:11         ` Andrew Morton
2009-06-02 22:11           ` Andrew Morton
2009-06-03  6:09           ` Gerard Lledo
2009-06-03  6:09             ` Gerard Lledo
2009-06-24 10:09         ` David Woodhouse
2009-06-25  3:00           ` Andrew Morton
2009-06-25  3:00             ` Andrew Morton

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=1243944686-7039-2-git-send-email-gerard.lledo@gmail.com \
    --to=gerard.lledo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.