Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3185967pxx; Mon, 2 Nov 2020 02:15:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLLwh6U+riK1v7nqINAcRZ+QVdCVIYvbHsR1+lC0ah1jEOXhgOXkrY/ZwZQ4X4vK1xnwFY X-Received: by 2002:a17:906:2a09:: with SMTP id j9mr14301540eje.355.1604312154623; Mon, 02 Nov 2020 02:15:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604312154; cv=none; d=google.com; s=arc-20160816; b=OFfP186L4mKvDNMHnmVYTNQb4LTY+esl3RuVYTPQgmL0wj2OR3ch2WzFVYLsLqfvp+ 91XoDbrOxmTQaNyenbe6ZDH7d2PtmB9C/SKvt972SK4tckipGXxQIj5I2QAeihYpMwWq TEE6QmGCeKkovea1EbI597NR/dVRtZkda4LpiVgcJLKKCLr5QjqsyYXapy/yWi/7vD98 hEAWG1pH7p5JHeuoRxHEJpTfWN5I3peUMpqMRahLvEz2rNcO5yFCv9t8F9dohJ2wHn82 n5EdaUm5IewI3iIJEDaK6wFcLc2WrO8B2DVRn0XJSae6cuWoAvfniZxhVrhye43liRcB dAEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=qEpMw23gik0Zy4VDnek4EfIoIErvpNQjzilx/+sMN14=; b=zQjLZJHz0xc+tSwm9+Uu9Ri7gZqCneyR8TRS5MSTC9TifsoVD9wxvk33AfFMdPbm15 HM30gkRX2Kk9JdIjcE2XWLXOXfDMYJlyNxjfic/O43rlwN6m7bOQtgznxWdTssoubXrd 3SSIcJ8lVYj1wG9tkkuHqer6sl9ATBmIKwYKVZTTqzq6s246YawOPuR4ELYFIGzL8L70 zn9tpBLvnc6+IZXJYGduAEPY7wZcrIEDvCGz78nBjOqf3fPh0cQl/HsqxJHFje2BRyFc 6NNAEPoLxcaDy6O7Tdf7xpQnAJ9Bm1nKvhtsjjc5dYlC8dwwnAXzkXZ2ja1bUe4OZOA+ PtLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=c3dnaK1I; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch11si9542708ejb.399.2020.11.02.02.15.32; Mon, 02 Nov 2020 02:15:54 -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; dkim=pass header.i=@ffwll.ch header.s=google header.b=c3dnaK1I; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728520AbgKBKNw (ORCPT + 99 others); Mon, 2 Nov 2020 05:13:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728439AbgKBKNv (ORCPT ); Mon, 2 Nov 2020 05:13:51 -0500 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25D6EC061A47 for ; Mon, 2 Nov 2020 02:13:51 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id g12so13842775wrp.10 for ; Mon, 02 Nov 2020 02:13:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=qEpMw23gik0Zy4VDnek4EfIoIErvpNQjzilx/+sMN14=; b=c3dnaK1I7lvCJTtmqJQs/DPW2BW/maLvV/VYfg+kYeVwT6orwEGYCxHihWzDGdv775 cKwmIppr3+zF89JMQf9kzr8yMQ1Z2dP2k8DOj8EbE4600pB1eDpbWxenVHsKfN2J1AFA Eb7uO4Lr4MkdDsEpz7whYQJb9lrsSGgBY2/7k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=qEpMw23gik0Zy4VDnek4EfIoIErvpNQjzilx/+sMN14=; b=Yjmcll1nOpEHXDbspiUa+NcyhMQJnwf3PXQ3z4jEfB1rvezuERR9m+DjsAaTy6Yx9j RuFHtCC7gW90xM8Ysh2eFthJ/5vGycxuJly2EyA2AM1DSvduab1D3laf6XdxVvYmuJzf e44ThHU7Py+DuAL1+1zLHTpogra2qHhdB82IobNnZUdy2FZTL0LQ3MpNdUOAXnOafMLb apbPClkiktLUS/eGU2895Uo1g/DGnTqZFZ9Z0Rfwjl1WfKTxngYdfGwuksjpwxtbp2b6 BSkXWYGAlOsuVLDkwcnlvxqDp0P1p2CBMRuyUZgulP3jsQF2Rw+m1KzlMifNb//Ev/17 90Cg== X-Gm-Message-State: AOAM530SrIja8PdLgbAmUwuecZWZgkYSH0Fs4KD7BNLeM2pYwrS9OB6m 6oj6+oI2WN2IEHPltTvalctk+Q== X-Received: by 2002:adf:ea0b:: with SMTP id q11mr19504135wrm.80.1604312029917; Mon, 02 Nov 2020 02:13:49 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id s9sm24415586wrf.90.2020.11.02.02.13.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 02:13:49 -0800 (PST) Date: Mon, 2 Nov 2020 11:13:47 +0100 From: Daniel Vetter To: Jiri Slaby Cc: Peilin Ye , Daniel Vetter , Greg Kroah-Hartman , Thomas Winischhofer , 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 Subject: Re: [PATCH v2 1/2] console: Remove dummy con_font_op() callback implementations Message-ID: <20201102101347.GN401619@phenom.ffwll.local> Mail-Followup-To: Jiri Slaby , Peilin Ye , Greg Kroah-Hartman , Thomas Winischhofer , 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: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 5.7.0-1-amd64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 02, 2020 at 10:47:55AM +0100, Jiri Slaby wrote: > 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. Yup the behaviour change from 4) needs to be called out. I think this should then also be done as part of the large patch series to remove the dummy functions from all console drivers. I don't expect the errno change to cause trouble, and it's the more honest errno - changing fonts not supported is the truth. But if it is, we can patch that up appropriately when we get a regression report. That's kinda unavoidable with old crufty uapi like this one here. Also a bikeshed: Additional information like the patch changelog or reasons why you do something is imo best to include in the commit message itself. It ends up looking a bit less tidy sometimes, but often there's crucial information in these parts that was accidentally left out from the commit message. Thanks, Daniel > > > 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 -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch