From: Wang YanQing <udknight@gmail.com>
To: tomi.valkeinen@ti.com
Cc: plagnioj@jcrosoft.com, airlied@redhat.com,
gregkh@linuxfoundation.org, akpm@linux-foundation.org,
kamal@whence.com, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] fbcon: trivial optimization for fbcon_exit
Date: Fri, 27 Dec 2013 02:39:18 +0000 [thread overview]
Message-ID: <20131227023917.GA3908@udknight> (raw)
Break out as soon as we find a mapped entry con2fb_map.
Signed-off-by: Wang YanQing <udknight@gmail.com>
---
drivers/video/console/fbcon.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index cd8a802..f39931f 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -3547,8 +3547,10 @@ static void fbcon_exit(void)
"no"));
for (j = first_fb_vc; j <= last_fb_vc; j++) {
- if (con2fb_map[j] = i)
+ if (con2fb_map[j] = i) {
mapped = 1;
+ break;
+ }
}
if (mapped) {
--
1.8.3.4.8.g69490f3.dirty
WARNING: multiple messages have this Message-ID (diff)
From: Wang YanQing <udknight@gmail.com>
To: tomi.valkeinen@ti.com
Cc: plagnioj@jcrosoft.com, airlied@redhat.com,
gregkh@linuxfoundation.org, akpm@linux-foundation.org,
kamal@whence.com, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] fbcon: trivial optimization for fbcon_exit
Date: Fri, 27 Dec 2013 10:39:18 +0800 [thread overview]
Message-ID: <20131227023917.GA3908@udknight> (raw)
Break out as soon as we find a mapped entry con2fb_map.
Signed-off-by: Wang YanQing <udknight@gmail.com>
---
drivers/video/console/fbcon.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index cd8a802..f39931f 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -3547,8 +3547,10 @@ static void fbcon_exit(void)
"no"));
for (j = first_fb_vc; j <= last_fb_vc; j++) {
- if (con2fb_map[j] == i)
+ if (con2fb_map[j] == i) {
mapped = 1;
+ break;
+ }
}
if (mapped) {
--
1.8.3.4.8.g69490f3.dirty
next reply other threads:[~2013-12-27 2:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-27 2:39 Wang YanQing [this message]
2013-12-27 2:39 ` [PATCH] fbcon: trivial optimization for fbcon_exit Wang YanQing
2014-01-08 9:48 ` Tomi Valkeinen
2014-01-08 9:48 ` Tomi Valkeinen
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=20131227023917.GA3908@udknight \
--to=udknight@gmail.com \
--cc=airlied@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=kamal@whence.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=plagnioj@jcrosoft.com \
--cc=tomi.valkeinen@ti.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 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.