Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1193883pxx; Tue, 27 Oct 2020 10:21:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyebR6S825WtIXhF+dQKHX+VyRC/QAZ39f562fOqChJrvKJ+YbpEK0LdIj5J7V9tLmwwAk/ X-Received: by 2002:a05:6402:1585:: with SMTP id c5mr3405081edv.278.1603819319288; Tue, 27 Oct 2020 10:21:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603819319; cv=none; d=google.com; s=arc-20160816; b=rtTwsTN2R+L4cmZjBgzIDieAQWgokPzb0sCV1mYCiFwKMpsS1m7z+rhC6glGD3H5GY oUyBC4iXSLlHD1NgB2vBwkLFnAW1K065Zuh9LKgmO3s7MEqD6Y3lE7e+92WJ5RSvdRPF 5KuSozb5DkVB4XraANMjdTUAObirBH8755Vd6rC17Jy1ykXAnDusaltlq5SugTzokeUH sX8Wvsx+82t5azWpGFz5yAvO3zPzoaomHXgWVqzDV4cLFiyEAbOhTM7f1Vu57GnP+NsH YAIId36fKXRR888w1TCde4wWsZTdBp1mcMkM5a0N0xzW4uDSHzqMHUhCsgq4eMVhVV72 xmjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=T0NQC8q5PZfZ/nsIJ5qKnoN7K1varb2/TGSSOiRrezY=; b=FVlHwFglz5hsxuLWiwedKPu3lZjlQgdA3kqR/S7xlq23MAR85ic6Eu+akSBf2ZyuMG Bm94NwMSLA/W3fpWwe0NtfSmdsn2inzq6QlpFNSC3TOJy3q7GbPllPr9RpNKHU8smLJt H+iGalNrVnirQ/QOTfAbAB08LIqJbHW70BnZPYwaLhnRwEFn2/ybFqNKrX/tTjW3cG9W fmhJUyecwHkdLhnoQZ6YRxxwQFejTJ6Y18CG1AmX8EBnfNAOJA4iEiCg7QDNM37clNlz 1LWTLnaYHVYYdQxQJfyje3ryIpPgiQw4maIyu8h4ueD/nAh3HdPu8vubcABIpOKZtUIs IU0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M1vwXINy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y11si1635895ejd.641.2020.10.27.10.21.37; Tue, 27 Oct 2020 10:21:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M1vwXINy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1811803AbgJ0Qmh (ORCPT + 99 others); Tue, 27 Oct 2020 12:42:37 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:40068 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1811194AbgJ0QiF (ORCPT ); Tue, 27 Oct 2020 12:38:05 -0400 Received: by mail-pf1-f194.google.com with SMTP id w21so1224327pfc.7; Tue, 27 Oct 2020 09:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=T0NQC8q5PZfZ/nsIJ5qKnoN7K1varb2/TGSSOiRrezY=; b=M1vwXINyKCI2zbkqZyjRXzOz+OiTTjv5+YsMO5WomPxQ3OpKFOn7449dzir9pXj29D N5LsWZQuc+CpSU0G6fApBL8OSc3ryHX6s4+fH7/jMVFh8f3/aTe3/XJ1Ptp/jgX7r+t9 9xZFjZp26qxDvFk9dfn92Za9iIbief2hH5kZJ6lYpp2Ug7hYAdAIIbpVGHbquuB8px5+ LJQUV0NFSXrXOEc1N2TBFJmfeEId/wIGYG3QrPBOWi9ebke753T1av3HH461g4YDBEmp Rt6Abuk4cHAhe3quvhm7Y+ucPdDhEs7s8FvMm4Xd2uPJGWC7E+Bo6tSPsXJgl9VVG1XI FABw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=T0NQC8q5PZfZ/nsIJ5qKnoN7K1varb2/TGSSOiRrezY=; b=T0KovKs6r2x/Qgd6mTlUitQ+6wDSJ7ET11exBu2ksQOdzZJ5QmDpTryBeYUhfZJamf 0gMjmfl6xdBvQTEXZkk1GituI/nIa1pfWPpug+ppnkoEBdVinqUzoAnMOT/zdCYGRQtL BqU/V3SFGh6x9XLbT8aTcJxd/lZzCkZTglaqUwtuJyT59/1kItg0LZdoo36N03SzscXt 4cjdr+p4duk67u5nwGxRu2DDh5t6ijnYdtZRWUX6G+hrJN4faDTT5wwbOm5/AyCXTQaM KK467OBhZEJT2Gjd3f58BdUEoXchw46aQF4fhu8xWJyp4O53JKFTp8/eIvtKOxz7A6pm 7XvQ== X-Gm-Message-State: AOAM532/wGcsnnyTkbX/YHwt061OJlfLKu5l3XWbWI44rE3muq5d2s2w 2YOEKJCIbZPkB13WZO3+7w== X-Received: by 2002:a63:5d61:: with SMTP id o33mr2564224pgm.295.1603816685018; Tue, 27 Oct 2020 09:38:05 -0700 (PDT) Received: from localhost.localdomain (n11212042025.netvigator.com. [112.120.42.25]) by smtp.gmail.com with ESMTPSA id b7sm3139676pfr.171.2020.10.27.09.38.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 09:38:04 -0700 (PDT) From: Peilin Ye To: Daniel Vetter , Greg Kroah-Hartman Cc: Bartlomiej Zolnierkiewicz , Jiri Slaby , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Peilin Ye Subject: [PATCH 4/5] fbcon: Avoid hard-coding built-in font charcount Date: Tue, 27 Oct 2020 12:37:29 -0400 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: <6c28279a10dbe7a7e5ac3e3a8dd7c67f8d63a9f2.1603788512.git.yepeilin.cs@gmail.com> References: <54f7d42e07eca2a2f13669575a9de88023ebc1ac.1603788512.git.yepeilin.cs@gmail.com> <6c28279a10dbe7a7e5ac3e3a8dd7c67f8d63a9f2.1603788512.git.yepeilin.cs@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fbcon_startup() and fbcon_init() are hard-coding the number of characters of our built-in fonts as 256. Recently, we included that information in our kernel font descriptor `struct font_desc`, so use `font->charcount` instead of a hard-coded value. This patch depends on patch "Fonts: Add charcount field to font_desc". Signed-off-by: Peilin Ye --- drivers/video/fbdev/core/fbcon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index cef437817b0d..e563847991b7 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -1004,7 +1004,7 @@ static const char *fbcon_startup(void) vc->vc_font.width = font->width; vc->vc_font.height = font->height; vc->vc_font.data = (void *)(p->fontdata = font->data); - vc->vc_font.charcount = 256; /* FIXME Need to support more fonts */ + vc->vc_font.charcount = font->charcount; } else { p->fontdata = vc->vc_font.data; } @@ -1083,8 +1083,7 @@ static void fbcon_init(struct vc_data *vc, int init) vc->vc_font.width = font->width; vc->vc_font.height = font->height; vc->vc_font.data = (void *)(p->fontdata = font->data); - vc->vc_font.charcount = 256; /* FIXME Need to - support more fonts */ + vc->vc_font.charcount = font->charcount; } } -- 2.25.1