Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3173431pxx; Mon, 2 Nov 2020 01:49:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJyET25hOq6KTS00RL1zjqQ/tKiAVjupJjVJg8/BW08JUsamr/zrvcKSyHiwLqE6t/7hnBvT X-Received: by 2002:a50:ab07:: with SMTP id s7mr15488980edc.287.1604310580669; Mon, 02 Nov 2020 01:49:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604310580; cv=none; d=google.com; s=arc-20160816; b=OZZ/xeW7CwdGCa1G4CugXeDAUrPJ90NIVzBwc8nCMlOQhXAvrM7WRCgCDP70VVqq43 GDxgw1WpMJ+3+QLMFRjDAkfbUNmdbiaYUZi/u3/apG+uugKtyR5ZmT60Ibmts2HBlCtg CNjS2zNYT40SbW+xClzz7QLZ+tM5UWgIir0vxS8DEWPFPVv1gru+uLI2tXEUkHNiGwIE ligViZWZyPNGcgxvO//7EltEbDeIrVdx4OHp3lNugNd8n6dXSWAaraL5Wf5X9wqhKPHV XpYGiRR5+XzVjHHNA7357u5anTRdtarz50LwqbYC5zENvTQotYRqFj/JfpU3Vkx3VJ8Q KIzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=aBL58c34rn6nb4fMXeoXHFwH4EN0oABK7+YoRvnww4A=; b=nKlVceMzXOO2WfBYzIp5xzU8Z14/80N/UfvZj1oXDlQPa0TiVu1wq1r8W52NMP89gg IanShsLG50BTBBf+7omxzd7T23j2/9skRF5KmlbPVqUq0kMyOUufkHrFgfKTEYsxuR6s TVEE8muR+oQjUhUweIUJtFSYkFQ0xLPnPLRxiFCzcYVwojQ4EYQu9Q546GehD/fsyPc+ gW20ev1yXLFnOTXmwaYx/s4pHzsO9sqASooQnS7Fwf3EGCfEJM9oaHGHTLZHNXnX5P+/ MxzpvBDx8bc8/Av1gIU9FLRwlygXI8mnoeqORd3klXv2v2diKg3d86ZfLhP1Xc5zsAcr WHVQ== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r15si10154526ejy.36.2020.11.02.01.49.17; Mon, 02 Nov 2020 01:49:40 -0800 (PST) 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; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728339AbgKBJsA (ORCPT + 99 others); Mon, 2 Nov 2020 04:48:00 -0500 Received: from mail-ej1-f66.google.com ([209.85.218.66]:44269 "EHLO mail-ej1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728156AbgKBJsA (ORCPT ); Mon, 2 Nov 2020 04:48:00 -0500 Received: by mail-ej1-f66.google.com with SMTP id j24so17958517ejc.11; Mon, 02 Nov 2020 01:47:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=aBL58c34rn6nb4fMXeoXHFwH4EN0oABK7+YoRvnww4A=; b=FVehcp7B6jXGPG4/aN81kjLJETFIFCmrbhc5fml2g4dyLdCGhON77jh5+XiD66KtyU /n/kaO0rxUIJHy8SBcxyseo6/JEKhdOtk/UrbabSxUSKTWcGIC9XZkS/EZs+5R2LQ9WX mTtV7KbNritZLToxLA5S6qTcuYBCveNeYgwwiCdN7u00reusjUjp9rqnQzKvMIUFX9q2 UuyhpepNsbwpjXiKA5vz+4RYe2cPmwYhJsYBYM5ElC844aPYlWh7foyQfAgXbVSTHWFs bUK6BHD4KOx24pC50qUuj+KsbfL3WYWCsSpvZEmgYDYPgu2XLhz0yqRP1+PPcR5qma1s pxeg== X-Gm-Message-State: AOAM531jiRG5hXvYxyysZpFFyTfb0Hq6i+neqPQOlWXh9RxpSmy8IcPq +GxEfQCH0+VFOlg9a1TFkIKKoUC1B7c2JA== X-Received: by 2002:a17:906:580e:: with SMTP id m14mr14018843ejq.237.1604310477608; Mon, 02 Nov 2020 01:47:57 -0800 (PST) Received: from ?IPv6:2a0b:e7c0:0:107::70f? ([2a0b:e7c0:0:107::70f]) by smtp.gmail.com with ESMTPSA id e13sm8525101ejh.65.2020.11.02.01.47.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Nov 2020 01:47:56 -0800 (PST) Subject: Re: [PATCH v2 1/2] console: Remove dummy con_font_op() callback implementations To: Peilin Ye , Daniel Vetter , Greg Kroah-Hartman , Thomas Winischhofer Cc: Bartlomiej Zolnierkiewicz , Nicolas Pitre , "Gustavo A . R . Silva" , Tetsuo Handa , George Kennedy , Nathan Chancellor , Peter Rosin , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org References: From: Jiri Slaby Message-ID: Date: Mon, 2 Nov 2020 10:47:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02. 11. 20, 10:36, Peilin Ye wrote: > `struct console_font` is a UAPI structure, thus ideally should not be > used for kernel internal abstraction. Remove some dummy .con_font_set, > .con_font_default and .con_font_copy `struct consw` callback > implementations, to make it cleaner. ESEMANTIC_ERROR. 1) What do you refer to with the last "it"? 2) What's the purpose of mentioning struct console_font at all? 3) Could you clarify whether you checked it is safe to remove the hooks? 4) All the hooks now return ENOSYS for both consoles (and not 0). Is this intentional? I know answers to the first 3 questions, but you need to elaborate a bit in the commit log to connect those sentences. Esp. for people not dealing with the code on a daily basis. Ad 4) I am not sure. > Suggested-by: Daniel Vetter > Signed-off-by: Peilin Ye > --- > Change in v2: > - [v2 2/2] no longer Cc: stable, so do not Cc: stable > > Context: https://lore.kernel.org/lkml/CAKMK7uFY2zv0adjKJ_ORVFT7Zzwn075MaU0rEU7_FuqENLR=UA@mail.gmail.com/ > > drivers/usb/misc/sisusbvga/sisusb_con.c | 21 --------------------- > drivers/video/console/dummycon.c | 20 -------------------- > 2 files changed, 41 deletions(-) > > diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c > index c63e545fb105..dfa0d5ce6012 100644 > --- a/drivers/usb/misc/sisusbvga/sisusb_con.c > +++ b/drivers/usb/misc/sisusbvga/sisusb_con.c > @@ -1345,24 +1345,6 @@ static int sisusbdummycon_blank(struct vc_data *vc, int blank, int mode_switch) > return 0; > } > > -static int sisusbdummycon_font_set(struct vc_data *vc, > - struct console_font *font, > - unsigned int flags) > -{ > - return 0; > -} > - > -static int sisusbdummycon_font_default(struct vc_data *vc, > - struct console_font *font, char *name) > -{ > - return 0; > -} > - > -static int sisusbdummycon_font_copy(struct vc_data *vc, int con) > -{ > - return 0; > -} > - > static const struct consw sisusb_dummy_con = { > .owner = THIS_MODULE, > .con_startup = sisusbdummycon_startup, > @@ -1375,9 +1357,6 @@ static const struct consw sisusb_dummy_con = { > .con_scroll = sisusbdummycon_scroll, > .con_switch = sisusbdummycon_switch, > .con_blank = sisusbdummycon_blank, > - .con_font_set = sisusbdummycon_font_set, > - .con_font_default = sisusbdummycon_font_default, > - .con_font_copy = sisusbdummycon_font_copy, > }; > > int > diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c > index 2a0d0bda7faa..f1711b2f9ff0 100644 > --- a/drivers/video/console/dummycon.c > +++ b/drivers/video/console/dummycon.c > @@ -124,23 +124,6 @@ static int dummycon_switch(struct vc_data *vc) > return 0; > } > > -static int dummycon_font_set(struct vc_data *vc, struct console_font *font, > - unsigned int flags) > -{ > - return 0; > -} > - > -static int dummycon_font_default(struct vc_data *vc, > - struct console_font *font, char *name) > -{ > - return 0; > -} > - > -static int dummycon_font_copy(struct vc_data *vc, int con) > -{ > - return 0; > -} > - > /* > * The console `switch' structure for the dummy console > * > @@ -159,8 +142,5 @@ const struct consw dummy_con = { > .con_scroll = dummycon_scroll, > .con_switch = dummycon_switch, > .con_blank = dummycon_blank, > - .con_font_set = dummycon_font_set, > - .con_font_default = dummycon_font_default, > - .con_font_copy = dummycon_font_copy, > }; > EXPORT_SYMBOL_GPL(dummy_con); > -- js suse labs