Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3217769pxx; Mon, 2 Nov 2020 03:17:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1tBo4I8NDxgA7GCFNUQMLT4L4CNamLxYLqsPM2XEJ2wtIhr3lTjA3owWmJQ3gndgabOjB X-Received: by 2002:aa7:c1d3:: with SMTP id d19mr16669218edp.293.1604315828763; Mon, 02 Nov 2020 03:17:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604315828; cv=none; d=google.com; s=arc-20160816; b=aYV60+rd4Hi/eyXCfD+EH2VP3JEbtJe1jJzlMjxTq3zBHw7V88qEWyFpKfe3V0RT6V p/oS1QR+AHKC4sxFBbgZRsyTOdnfIKGJssVpTrK0IXTqFzu3asyiFRoW0BVt7WI5zISY kSC9hbA9p7tof/egqLwW5cSMffSQnyfY5kBTY9oprhCtWgXVRdSfx24p0d6+pY9iV1iT GARddT0HHNuAZlyINJgfm04pWIMWo67vhb+tjR76hXLR9pWksQr5Lt9m0Qb0BdDWOoub RMKDxIoxZYDIiAGI8IqWCGJhDZyVReasMeQo/9YMMoXe71Yaer/UOlkoSsVSr/WeiK2S CLpw== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=qCgiqZXGNwvNh2nZMtUDnqrlrZqGGd0+W48CRCFS5Bo=; b=OzrMsxjBfiPdDzHcsVyrkEVNwqQlTGA5wMMkb0a8FwjrLclKzkdt7oLbNLt4ypGkil tyB6g5PnW+osE5SZladQiCOufL5c7hWFarucyIHtDCN8Gwlckyt6zXOzCyThYFJI2O45 GzKJPRIV/ejC1c3eyE2pKy1DYtH2oNQk/mIammCw1O8rgHcPGSh0KD68dBzkY0+/JnYQ vt1EEznbTDoQZIHkwLM0IFV2OUywy2cT3Kw+n036chDtgiv0gGLuI/uY/V/xGmqowMci 9PQtDX8TbHg5CxkGuRr5/L44C7Klqfx/vIUA1EEYfj+qsq/hD3LgwHHr/BkwAkDPNS0u G1Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="g3oyj/8B"; 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 b12si6864858ejz.656.2020.11.02.03.16.45; Mon, 02 Nov 2020 03:17:08 -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=@gmail.com header.s=20161025 header.b="g3oyj/8B"; 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 S1728562AbgKBLNB (ORCPT + 99 others); Mon, 2 Nov 2020 06:13:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728545AbgKBLM6 (ORCPT ); Mon, 2 Nov 2020 06:12:58 -0500 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC88DC061A04; Mon, 2 Nov 2020 03:12:57 -0800 (PST) Received: by mail-pf1-x443.google.com with SMTP id o129so10826729pfb.1; Mon, 02 Nov 2020 03:12:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qCgiqZXGNwvNh2nZMtUDnqrlrZqGGd0+W48CRCFS5Bo=; b=g3oyj/8BectFHMWdpOJLUmTdLl6ao46UPyBqt4FGqyBVKmWGt5uTsIVrZlIeUg1kKp BBgtWX3kj4FS86SKaIeAwtMdHwt92nFpIAVanSryUOtS79J+OMzAjXRuwKG7yRz4Q2Jd 2YqA+/Rr5omjYftodpgfkeo2fVcimWdr9Jty4R5BaiXWsIpYYbdvxyxNOt83QtgY1Em8 nkFfjzgRFv1w4XLjnRsfzoTnaxg0gl6R+7Kt4wD0XKpn9prfm6SeaZyIjvU+i9TjGvvR mKotJYuoYwAmT7GuZn9jTBKaZtrrWzYZMqWdL9nsHHVapaaDei+Htw61qhtLV7EF9d8E 5+QQ== 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:references :mime-version:content-disposition:in-reply-to; bh=qCgiqZXGNwvNh2nZMtUDnqrlrZqGGd0+W48CRCFS5Bo=; b=QILySlQ2EtXNFxv2wIK7vP4O4AEI6ADBOP808x72I96t2ulO7WuKEAI8j+3c84TH2Z Us/x7lnlbqTXmTix3ycDJ510v01jS1Am5kFTB5+YspHXQrdw1HqoNHdeetjVmR8JS2aU RySwNyWtB9GWFVuTy1Y8PKHR8ZRqF0MfPftTTOr4vqyGCk4p1rKSjokXWXCL0MAaeKii vp3FLh7tp4KTtjUGQXComEZp5ujwWQU1MXccrvHtL06dot+cWoXyhwqg0cl/Cl+t+7LP ZIt2G6e+4XwcKV/Y04BZXNHBsT32b0pA45t+kHKFFaT6yHnAfulOi6tm3kpQZFfh0dHD ux+w== X-Gm-Message-State: AOAM533cIvaa4ujxrssK7LTXkUfar6WigrI0YY8D+EuHZNLAg+jFWO9y fj8S4JUqXuPx0shahXCqyg== X-Received: by 2002:a62:64d1:0:b029:161:ffdb:e07d with SMTP id y200-20020a6264d10000b0290161ffdbe07dmr20737550pfb.71.1604315577377; Mon, 02 Nov 2020 03:12:57 -0800 (PST) Received: from PWN (59-125-13-244.HINET-IP.hinet.net. [59.125.13.244]) by smtp.gmail.com with ESMTPSA id m2sm13516592pfh.44.2020.11.02.03.12.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 03:12:56 -0800 (PST) Date: Mon, 2 Nov 2020 06:12:48 -0500 From: Peilin Ye To: Daniel Vetter Cc: Greg Kroah-Hartman , Jiri Slaby , 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 2/2] tty/vt: Avoid passing struct console_font_op to con_font_copy() Message-ID: <20201102111248.GA1558630@PWN> References: <72c954371ed9b1d050901b2d498a979017de8a3c.1604306433.git.yepeilin.cs@gmail.com> <20201102101044.GM401619@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201102101044.GM401619@phenom.ffwll.local> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 02, 2020 at 11:10:44AM +0100, Daniel Vetter wrote: > I'm not sure switching from int to unsigned just here makes much sense. > All the console code is still using int con to index all the various > arrays (I just checked fbcon.c code), and using int to index arrays is > pretty standard. As long as we have the con < 0 check to catch evil > userspace. > > There's still the switch from op to int for con_font_copy, but I think > that's better done as part of the larger cleanup we already discussed. And > then maybe also include patch 1 from this series in that rework. I see. I think at the moment there's not much we can do for con_font_get/set/default(). _get() and _default() use *op, and _set() uses all except one field of *op. Maybe we can change the type of *op from console_font_op to font_desc, after cleaning up everything else? Peilin