* [PATCH] fbcon: trivial optimization for fbcon_exit
@ 2013-12-27 2:39 Wang YanQing
2014-01-08 9:48 ` Tomi Valkeinen
0 siblings, 1 reply; 2+ messages in thread
From: Wang YanQing @ 2013-12-27 2:39 UTC (permalink / raw)
To: tomi.valkeinen
Cc: plagnioj, airlied, gregkh, akpm, kamal, linux-fbdev, linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fbcon: trivial optimization for fbcon_exit
2013-12-27 2:39 [PATCH] fbcon: trivial optimization for fbcon_exit Wang YanQing
@ 2014-01-08 9:48 ` Tomi Valkeinen
0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2014-01-08 9:48 UTC (permalink / raw)
To: Wang YanQing
Cc: plagnioj, airlied, gregkh, akpm, kamal, linux-fbdev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 764 bytes --]
On 2013-12-27 04:39, Wang YanQing wrote:
> 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) {
>
Thanks, queued for 3.14.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-08 9:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-27 2:39 [PATCH] fbcon: trivial optimization for fbcon_exit Wang YanQing
2014-01-08 9:48 ` Tomi Valkeinen
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).