mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: peterz@infradead.org, mingo@kernel.org
Cc: Waiman.Long@hp.com, jason.low2@hpe.com, wanpeng.li@hotmail.com,
	dave@stgolabs.net, linux-kernel@vger.kernel.org,
	Davidlohr Bueso <dbueso@suse.de>
Subject: [PATCH 2/3] locking/rwsem: Remove a few useless comments
Date: Fri,  5 Aug 2016 01:04:44 -0700	[thread overview]
Message-ID: <1470384285-32163-3-git-send-email-dave@stgolabs.net> (raw)
In-Reply-To: <1470384285-32163-1-git-send-email-dave@stgolabs.net>

Our rwsem code (xadd, at least) is rather well documented, but
there are a few really annoying comments in there that serve
no purpose and we shouldn't bother with them.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
---
 kernel/locking/rwsem-xadd.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/kernel/locking/rwsem-xadd.c b/kernel/locking/rwsem-xadd.c
index b03623172277..e02fe3289b5a 100644
--- a/kernel/locking/rwsem-xadd.c
+++ b/kernel/locking/rwsem-xadd.c
@@ -234,7 +234,6 @@ struct rw_semaphore __sched *rwsem_down_read_failed(struct rw_semaphore *sem)
 	struct task_struct *tsk = current;
 	WAKE_Q(wake_q);
 
-	/* set up my own style of waitqueue */
 	waiter.task = tsk;
 	waiter.type = RWSEM_WAITING_FOR_READ;
 
@@ -613,7 +612,6 @@ struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem)
 	raw_spin_lock_irqsave(&sem->wait_lock, flags);
 locked:
 
-	/* do nothing if list empty */
 	if (!list_empty(&sem->wait_list))
 		__rwsem_mark_wake(sem, RWSEM_WAKE_ANY, &wake_q);
 
@@ -637,7 +635,6 @@ struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem)
 
 	raw_spin_lock_irqsave(&sem->wait_lock, flags);
 
-	/* do nothing if list empty */
 	if (!list_empty(&sem->wait_list))
 		__rwsem_mark_wake(sem, RWSEM_WAKE_READ_OWNED, &wake_q);
 
-- 
2.6.6

  parent reply	other threads:[~2016-08-05  8:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05  8:04 [PATCH 0/3] locking/rwsem: __rwsem_mark_wake() improvements Davidlohr Bueso
2016-08-05  8:04 ` [PATCH 1/3] locking/rwsem: Return void in __rwsem_mark_wake() Davidlohr Bueso
2016-08-18 11:00   ` [tip:locking/core] " tip-bot for Davidlohr Bueso
2016-08-18 13:41   ` tip-bot for Davidlohr Bueso
2016-08-05  8:04 ` Davidlohr Bueso [this message]
2016-08-18 11:00   ` [tip:locking/core] locking/rwsem: Remove a few useless comments tip-bot for Davidlohr Bueso
2016-08-18 13:42   ` tip-bot for Davidlohr Bueso
2016-08-05  8:04 ` [PATCH 3/3] locking/rwsem: Scan the wait_list for readers only once Davidlohr Bueso
2016-08-06  6:05   ` Ingo Molnar
2016-08-08 16:37     ` Davidlohr Bueso
2016-08-18 11:01   ` [tip:locking/core] " tip-bot for Davidlohr Bueso
2016-08-18 13:42   ` tip-bot for Davidlohr Bueso

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=1470384285-32163-3-git-send-email-dave@stgolabs.net \
    --to=dave@stgolabs.net \
    --cc=Waiman.Long@hp.com \
    --cc=dbueso@suse.de \
    --cc=jason.low2@hpe.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=wanpeng.li@hotmail.com \
    /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

all inboxes | Powered by JetHome®