From patchwork Fri Dec 27 02:39:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wang yanqing X-Patchwork-Id: 3407961 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2BB2D9F380 for ; Fri, 27 Dec 2013 02:40:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 69F382013A for ; Fri, 27 Dec 2013 02:40:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 62CC52012B for ; Fri, 27 Dec 2013 02:40:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754347Ab3L0CkX (ORCPT ); Thu, 26 Dec 2013 21:40:23 -0500 Received: from mail-pd0-f174.google.com ([209.85.192.174]:36015 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754066Ab3L0CkW (ORCPT ); Thu, 26 Dec 2013 21:40:22 -0500 Received: by mail-pd0-f174.google.com with SMTP id x10so8467595pdj.5 for ; Thu, 26 Dec 2013 18:40:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; bh=AZkjFgj5xv2It60TpMhQiooY8sM2jIUgesVX3dIOiYc=; b=yI+VdyZf6pnVPmVOHA+fg/7TKZqlfsValX8MtJVdAoFfnzaLQK7sDi1NVCT2pzARGR kup6GMif/0+vcS0pMsfKD94q/rcgewOpnzv8wVAT9sHq15iIffqNeDEF4R1LMgQdzAiS wFqMtoE8sr9UnMtden3FLWw2d6/AlV12tO6l9DrPHh/H+EgSlZdyX/CAlGxz6fw7wp9T PoJ4+77c3NfZTvKTbcgkEvuQ749v6GqAZb7vBo+UGGl5S3c4aOIoJgriA7MbKJ98XQs4 CqzAKu5dlajiiOjdopqYEf0hPwJGwfsaFOGPMOMC1LBRkBFVz29IYPu/V//aRs4bvy4z TU9g== X-Received: by 10.66.142.42 with SMTP id rt10mr47633064pab.1.1388112021945; Thu, 26 Dec 2013 18:40:21 -0800 (PST) Received: from udknight.localhost ([36.192.185.157]) by mx.google.com with ESMTPSA id uf2sm58277626pbc.28.2013.12.26.18.40.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Dec 2013 18:40:21 -0800 (PST) Received: from udknight.localhost (udknight.localhost [127.0.0.1]) by udknight.localhost (8.14.4/8.14.4) with ESMTP id rBR2dPL9003955; Fri, 27 Dec 2013 10:39:25 +0800 Received: (from root@localhost) by udknight.localhost (8.14.4/8.14.4/Submit) id rBR2dIbP003940; Fri, 27 Dec 2013 10:39:18 +0800 Date: Fri, 27 Dec 2013 10:39:18 +0800 From: Wang YanQing 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 Message-ID: <20131227023917.GA3908@udknight> Mail-Followup-To: Wang YanQing , tomi.valkeinen@ti.com, 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 MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Break out as soon as we find a mapped entry con2fb_map. Signed-off-by: Wang YanQing --- 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) {