From patchwork Thu Nov 7 11:43:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Po-Hsu Lin X-Patchwork-Id: 1191097 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4781ms4JJlz9sPk; Thu, 7 Nov 2019 22:45:32 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1iSgEA-0001pq-Qp; Thu, 07 Nov 2019 11:45:26 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iSgE9-0001pB-3i for kernel-team@lists.ubuntu.com; Thu, 07 Nov 2019 11:45:25 +0000 Received: from mail-pl1-f198.google.com ([209.85.214.198]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iSgE8-0005eZ-Qb for kernel-team@lists.ubuntu.com; Thu, 07 Nov 2019 11:45:24 +0000 Received: by mail-pl1-f198.google.com with SMTP id x9so1506046plv.2 for ; Thu, 07 Nov 2019 03:45:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=zv0TTSbeA+EL2vIjVhSZe7X2qwjvvH0lehxXQ7v0rps=; b=XDU8BGs6Df9VdMkOYnrpKMlqJOXHOawxY8seBhinK+t/4NI3urT7mYpqr/LBVCHx94 nXS7Q3FyOgaOJuCFNerVvB0OUBpcv7ICf0cQvgmxinKwuVWt8peqn75e1ORsW8DjbK3b zVtPha0OER0StnPDoQpN1jAJZ6v3H41W3bZ+OMQ9CXkYx5zFKqTO4+qWZx8S6gwGiC+O sdSDZ2JhOxdhDsNhtth+NCnVKbO6BPX72BKOcxOZfm/hiLCYULFgVQw0UbKItcdQnLLK FAMejFRTT5ocmoGKCUuVnbqXDGHseO7ty7KHy9uz6YD4PsT44YxYMqkls7Kpjl1zED5U LVVQ== X-Gm-Message-State: APjAAAXPjV0z7GMnD1ynaXPKFatGv449y0buRwYR62NHTZp0HEtIxOo0 AWB42Eze3tt/2buqVq7tuB4kJdntv4pIarg+dJoYU2cAisPXEeiIjf7xyKDBPcGNk8oNU8aG7v8 U+jSLNLu1C31TnyYbjQW5qMzqXjCdxM6majtgTZrZ X-Received: by 2002:a17:902:9a8d:: with SMTP id w13mr3287750plp.330.1573127123169; Thu, 07 Nov 2019 03:45:23 -0800 (PST) X-Google-Smtp-Source: APXvYqxZsbfBTfNbyntTr8far8jHef0FcxcN+pFD4fjMaemCC0J0MBGn71ChNI7frnwuIDiQodZAEw== X-Received: by 2002:a17:902:9a8d:: with SMTP id w13mr3287707plp.330.1573127122627; Thu, 07 Nov 2019 03:45:22 -0800 (PST) Received: from Leggiero.taipei.internal (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id m19sm1963377pgh.31.2019.11.07.03.45.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2019 03:45:21 -0800 (PST) From: Po-Hsu Lin To: kernel-team@lists.ubuntu.com Subject: [X/B/D][SRU][PATCH 1/2] fonts: Fix coding style Date: Thu, 7 Nov 2019 19:43:57 +0800 Message-Id: <20191107114358.21868-2-po-hsu.lin@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191107114358.21868-1-po-hsu.lin@canonical.com> References: <20191107114358.21868-1-po-hsu.lin@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Takashi Iwai BugLink: https://bugs.launchpad.net/bugs/1851623 Fix indentation, spaces, and move EXPORT_SYMBOL line to the appropriate place as a preliminary work. No actual code change. Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman (cherry picked from commit aa1d19f1f96764e72155235ece22461599d0e7ac) Signed-off-by: Po-Hsu Lin --- lib/fonts/fonts.c | 83 +++++++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 43 deletions(-) diff --git a/lib/fonts/fonts.c b/lib/fonts/fonts.c index 9969358..269a829 100644 --- a/lib/fonts/fonts.c +++ b/lib/fonts/fonts.c @@ -25,51 +25,51 @@ static const struct font_desc *fonts[] = { #ifdef CONFIG_FONT_8x8 #undef NO_FONTS - &font_vga_8x8, + &font_vga_8x8, #endif #ifdef CONFIG_FONT_8x16 #undef NO_FONTS - &font_vga_8x16, + &font_vga_8x16, #endif #ifdef CONFIG_FONT_6x11 #undef NO_FONTS - &font_vga_6x11, + &font_vga_6x11, #endif #ifdef CONFIG_FONT_7x14 #undef NO_FONTS - &font_7x14, + &font_7x14, #endif #ifdef CONFIG_FONT_SUN8x16 #undef NO_FONTS - &font_sun_8x16, + &font_sun_8x16, #endif #ifdef CONFIG_FONT_SUN12x22 #undef NO_FONTS - &font_sun_12x22, + &font_sun_12x22, #endif #ifdef CONFIG_FONT_10x18 #undef NO_FONTS - &font_10x18, + &font_10x18, #endif #ifdef CONFIG_FONT_ACORN_8x8 #undef NO_FONTS - &font_acorn_8x8, + &font_acorn_8x8, #endif #ifdef CONFIG_FONT_PEARL_8x8 #undef NO_FONTS - &font_pearl_8x8, + &font_pearl_8x8, #endif #ifdef CONFIG_FONT_MINI_4x6 #undef NO_FONTS - &font_mini_4x6, + &font_mini_4x6, #endif #ifdef CONFIG_FONT_6x10 #undef NO_FONTS - &font_6x10, + &font_6x10, #endif #ifdef CONFIG_FONT_TER16x32 #undef NO_FONTS - &font_ter_16x32, + &font_ter_16x32, #endif }; @@ -90,16 +90,16 @@ static const struct font_desc *fonts[] = { * specified font. * */ - const struct font_desc *find_font(const char *name) { - unsigned int i; + unsigned int i; - for (i = 0; i < num_fonts; i++) - if (!strcmp(fonts[i]->name, name)) - return fonts[i]; - return NULL; + for (i = 0; i < num_fonts; i++) + if (!strcmp(fonts[i]->name, name)) + return fonts[i]; + return NULL; } +EXPORT_SYMBOL(find_font); /** @@ -116,44 +116,41 @@ const struct font_desc *find_font(const char *name) * chosen font. * */ - const struct font_desc *get_default_font(int xres, int yres, u32 font_w, u32 font_h) { - int i, c, cc; - const struct font_desc *f, *g; - - g = NULL; - cc = -10000; - for(i=0; ipref; + int i, c, cc; + const struct font_desc *f, *g; + + g = NULL; + cc = -10000; + for (i = 0; i < num_fonts; i++) { + f = fonts[i]; + c = f->pref; #if defined(__mc68000__) #ifdef CONFIG_FONT_PEARL_8x8 - if (MACH_IS_AMIGA && f->idx == PEARL8x8_IDX) - c = 100; + if (MACH_IS_AMIGA && f->idx == PEARL8x8_IDX) + c = 100; #endif #ifdef CONFIG_FONT_6x11 - if (MACH_IS_MAC && xres < 640 && f->idx == VGA6x11_IDX) - c = 100; + if (MACH_IS_MAC && xres < 640 && f->idx == VGA6x11_IDX) + c = 100; #endif #endif - if ((yres < 400) == (f->height <= 8)) - c += 1000; + if ((yres < 400) == (f->height <= 8)) + c += 1000; - if ((font_w & (1 << (f->width - 1))) && - (font_h & (1 << (f->height - 1)))) - c += 1000; + if ((font_w & (1 << (f->width - 1))) && + (font_h & (1 << (f->height - 1)))) + c += 1000; - if (c > cc) { - cc = c; - g = f; + if (c > cc) { + cc = c; + g = f; + } } - } - return g; + return g; } - -EXPORT_SYMBOL(find_font); EXPORT_SYMBOL(get_default_font); MODULE_AUTHOR("James Simmons ");