Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3998661pxu; Mon, 12 Oct 2020 07:02:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfOUq+f4BEQS68SnjqgSZ14yQXIHty5IvgxYw+5ZPrVy0sfNMaMOKkI5FnFYBaghTAHixr X-Received: by 2002:a17:906:e116:: with SMTP id gj22mr29375579ejb.313.1602511222176; Mon, 12 Oct 2020 07:00:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602511222; cv=none; d=google.com; s=arc-20160816; b=PRlWdbG7lmmx15ICczpGXnm4/d2yBIQ8W7J5HqZ2noulyGSPdkMSiRJ8qtK/ULAzZ3 5Maz1PTjNIHStw3Mur6EG2zRVZrmWf8bN1Pb7DNk73fYZA8hpmyb1+zg+7uTZLM0nO0v l6CMUeetQhUrwMLRHLEqrW/7pGbz3af5uwFHYMoPZTHy5i2sZ8seHYCNRoK6n/PQTG6O 7mK638o5c2Zqfx2sEuzgo7608G4T8vf1DKduXUrNfZfa70OPG0zJLCy1bBry9lQD4CBl BxtjVUvafpIvqjiW7rlBFwpr44jzWkiqBr62Z4vRSTvF9wg+2qsnNqnhcInORpg8MDeH AXqg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qaTHjvHPbEqlaLt3zcIU01gX3Fww/sfMz2VEWdoX2qI=; b=t015G9y4FnJFnTTEAvYm0pV8c2rRdHwMh3zqBcvGeBk3Vl5ALfmYkrqpEiw2MHfJlM 5pK1ivzUNDcQEVA1Yu0nwLZrjtP74marZ8bODZ1SBgUG85GHRe6mjGY4n3tWoN/zf0Mj MXiDpeqmwGwo1eKkZbill2RymOVS94ZWPeBqgmKOf29rY1lw1M4Na0ow18bT5pNyzAsP pbQVuBSY1ywFnLaJ/DnQDOXGFWGDl0OgwrLKkAN7doSChcoE2L6iI/dbbTCJ3kXJkALv tL5j74hT9xzYwA6jXr42P/l8hU+L9wOPSKVEV6jv4OXqCpSl3r5WfEo85OSCUOGL2EZr mAOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JedCLmbV; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jr18si11827025ejb.45.2020.10.12.06.59.57; Mon, 12 Oct 2020 07:00:22 -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=@kernel.org header.s=default header.b=JedCLmbV; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390123AbgJLN44 (ORCPT + 99 others); Mon, 12 Oct 2020 09:56:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:49244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389395AbgJLNns (ORCPT ); Mon, 12 Oct 2020 09:43:48 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 49E3A206D9; Mon, 12 Oct 2020 13:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602510226; bh=LJ2flt7nWpz2GXElbHKjH4iNpHzys7pEADYWNQjaCYQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JedCLmbVJzBs4J+nCDiVQOe2uq9KlSvGqCWNVMDlZjOrGX/2QSeWb7JGo/U5WcAtj Jit9lEALazmTbZ0d77W8ovIzKXZK6+QmMeujxNx1O0WurjaUlgSUrBqByCxnDzE+dM qrCgsUYhaUV941mT6vzDMvTQS2RjzBTD+jzFPMFM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peilin Ye , Daniel Vetter Subject: [PATCH 5.8 001/124] fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h Date: Mon, 12 Oct 2020 15:30:05 +0200 Message-Id: <20201012133146.911937643@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012133146.834528783@linuxfoundation.org> References: <20201012133146.834528783@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peilin Ye commit bb0890b4cd7f8203e3aa99c6d0f062d6acdaad27 upstream. drivers/video/console/newport_con.c is borrowing FONT_EXTRA_WORDS macros from drivers/video/fbdev/core/fbcon.h. To keep things simple, move all definitions into . Since newport_con now uses four extra words, initialize the fourth word in newport_set_font() properly. Cc: stable@vger.kernel.org Signed-off-by: Peilin Ye Reviewed-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/7fb8bc9b0abc676ada6b7ac0e0bd443499357267.1600953813.git.yepeilin.cs@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/video/console/newport_con.c | 7 +------ drivers/video/fbdev/core/fbcon.h | 7 ------- drivers/video/fbdev/core/fbcon_rotate.c | 1 + drivers/video/fbdev/core/tileblit.c | 1 + include/linux/font.h | 8 ++++++++ 5 files changed, 11 insertions(+), 13 deletions(-) --- a/drivers/video/console/newport_con.c +++ b/drivers/video/console/newport_con.c @@ -35,12 +35,6 @@ #define FONT_DATA ((unsigned char *)font_vga_8x16.data) -/* borrowed from fbcon.c */ -#define REFCOUNT(fd) (((int *)(fd))[-1]) -#define FNTSIZE(fd) (((int *)(fd))[-2]) -#define FNTCHARCNT(fd) (((int *)(fd))[-3]) -#define FONT_EXTRA_WORDS 3 - static unsigned char *font_data[MAX_NR_CONSOLES]; static struct newport_regs *npregs; @@ -522,6 +516,7 @@ static int newport_set_font(int unit, st FNTSIZE(new_data) = size; FNTCHARCNT(new_data) = op->charcount; REFCOUNT(new_data) = 0; /* usage counter */ + FNTSUM(new_data) = 0; p = new_data; for (i = 0; i < op->charcount; i++) { --- a/drivers/video/fbdev/core/fbcon.h +++ b/drivers/video/fbdev/core/fbcon.h @@ -152,13 +152,6 @@ static inline int attr_col_ec(int shift, #define attr_bgcol_ec(bgshift, vc, info) attr_col_ec(bgshift, vc, info, 0) #define attr_fgcol_ec(fgshift, vc, info) attr_col_ec(fgshift, vc, info, 1) -/* Font */ -#define REFCOUNT(fd) (((int *)(fd))[-1]) -#define FNTSIZE(fd) (((int *)(fd))[-2]) -#define FNTCHARCNT(fd) (((int *)(fd))[-3]) -#define FNTSUM(fd) (((int *)(fd))[-4]) -#define FONT_EXTRA_WORDS 4 - /* * Scroll Method */ --- a/drivers/video/fbdev/core/fbcon_rotate.c +++ b/drivers/video/fbdev/core/fbcon_rotate.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "fbcon.h" #include "fbcon_rotate.h" --- a/drivers/video/fbdev/core/tileblit.c +++ b/drivers/video/fbdev/core/tileblit.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include "fbcon.h" --- a/include/linux/font.h +++ b/include/linux/font.h @@ -59,4 +59,12 @@ extern const struct font_desc *get_defau /* Max. length for the name of a predefined font */ #define MAX_FONT_NAME 32 +/* Extra word getters */ +#define REFCOUNT(fd) (((int *)(fd))[-1]) +#define FNTSIZE(fd) (((int *)(fd))[-2]) +#define FNTCHARCNT(fd) (((int *)(fd))[-3]) +#define FNTSUM(fd) (((int *)(fd))[-4]) + +#define FONT_EXTRA_WORDS 4 + #endif /* _VIDEO_FONT_H */