Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3226353pxx; Mon, 2 Nov 2020 03:32:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRWHtU3N0AhmdrlK2nDssxQSUAM6SIVp35ZQBzurxvryd4OfR0HJ04uPlbj57SLBL+asUs X-Received: by 2002:a17:906:3582:: with SMTP id o2mr14625904ejb.518.1604316768005; Mon, 02 Nov 2020 03:32:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604316767; cv=none; d=google.com; s=arc-20160816; b=YCTLsR0xwIALrbur+N+J1cfTPjUkhCeQCTl4ChJbc7xXx/M4UdXrXBugOe2+nRgrS4 nNAwBE6X8ECYN+Ern2SFcsIg01faU8I4xOb3CcCkST6YIQ38h60QOQ2omggna75JYRyQ Rq9ASc22FktlmsSFyRZIOUt9yye24nYx5gnXmJaSaEoUmBxy8miE1zT/1uGMSIgeQDj6 I694hpIJbSemrWlWfMSZDdjbwDr1p3ktFNKuMYuMoFrR2NMfJS4RdkYU4vT6yiyVA04g 3qIXWH9V5hD3DvJtBlpgopLijfqQIMYkScmthN0LEpcsexFPIgYQJuD30Y794MQsV4HR Jj4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zAOiszuYUyIyWLQKIJG6bc55M3RXwlsKsxrmhc4uVW8=; b=Gng1MYGM2HJsCQYDJ9aDf1iFJWlwNNlpLzY3y+ktYtwBOdGZA+tDU1xl0AfmoMVO9v 8cSGxCWYNjudAEx+mKttK4C2dUC7ZFsYku7I+NzasGLYTWUeYjVkMBypmM5NG+vx7Tkd zZ7En/pxru9qWzRKOgwtJxHKyDQ6NjIKlRLCws4xtFN8jZKX2/HZDzQOYGbF+togH0f0 9X0sLAvOBhihH7IvxHcza5Kklwl6R8+QhGS3EpmIPNeb7TjE1BRx5hRT62lD/QZfz1Va 02OkrbaqczWvYpjMGuaTFOSrRe0QUohUN7hxKmQ0xgnqOm1bnaD0OUFZ/gYcsLYIT0o9 n8vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=RHq+P4QI; 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 o6si15238742edi.562.2020.11.02.03.32.25; Mon, 02 Nov 2020 03:32:47 -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=RHq+P4QI; 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 S1728689AbgKBLbH (ORCPT + 99 others); Mon, 2 Nov 2020 06:31:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728288AbgKBLbG (ORCPT ); Mon, 2 Nov 2020 06:31:06 -0500 Received: from mail-oo1-xc43.google.com (mail-oo1-xc43.google.com [IPv6:2607:f8b0:4864:20::c43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5283C0617A6 for ; Mon, 2 Nov 2020 03:31:05 -0800 (PST) Received: by mail-oo1-xc43.google.com with SMTP id l26so3270898oop.9 for ; Mon, 02 Nov 2020 03:31:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zAOiszuYUyIyWLQKIJG6bc55M3RXwlsKsxrmhc4uVW8=; b=RHq+P4QISBX4bWERbI32Xd6fFCiT1evuu26nesDDnjre/0R7UEXgt1be1gQR9BjPkh idJSK5mAMe+xk6rG5/lB1KsEHZ0Oe0XaC7T8lQCBUNGKH1gJL9gAmFOAY93Xa7n2fkfb JRWdzEF70nhdCmjgOrlXQYuI7njHj/tX/iWss= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zAOiszuYUyIyWLQKIJG6bc55M3RXwlsKsxrmhc4uVW8=; b=Wz9YU7V7xJNSWHAyxvkRMFwZbkCDN5zP2Nk0DJtgv5FpQbKMHT/Vt/KgWdY8ACGFMN vvIy68/JSj2akGi77i11dH6Dqe65MhDJdqigllIeZPksTkLeSl147SgB4D+PsR0Z/tI+ wVEeZWy1IIUplcDXaRX2mnbVurjKqIzJL5sPBwFBOYSJAbRqbjx7Ry0WKB1epyNgskDQ BBJP1/7+xnQw97jG+vJX4eBSv1lV3xgw5C5PJO8gnZOWaYUk3LoCE16OvRN9MyOAzVZ5 gdyal1TJItoH3sq2w8po3hSxv/eU3dHH+eQXeD7XoKruY+hj/tq6ij+4B0cYhr+NheXX xxgw== X-Gm-Message-State: AOAM5311BUHzKw2jbgKYbbvtry/1KPek3mV8y7bY4ArViGPMZov1Jbom 6EQ07kfiTE+tZSYk+f33iAlaOlIFwF2i8g+WzuQuIg== X-Received: by 2002:a4a:b503:: with SMTP id r3mr11571270ooo.28.1604316665320; Mon, 02 Nov 2020 03:31:05 -0800 (PST) MIME-Version: 1.0 References: <72c954371ed9b1d050901b2d498a979017de8a3c.1604306433.git.yepeilin.cs@gmail.com> <20201102101044.GM401619@phenom.ffwll.local> <20201102111248.GA1558630@PWN> In-Reply-To: <20201102111248.GA1558630@PWN> From: Daniel Vetter Date: Mon, 2 Nov 2020 12:30:54 +0100 Message-ID: Subject: Re: [PATCH v2 2/2] tty/vt: Avoid passing struct console_font_op to con_font_copy() To: Peilin Ye 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 Mailing List , USB list , dri-devel , Linux Fbdev development list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 2, 2020 at 12:12 PM Peilin Ye wrote: > > 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? Yeah, for these one of the arguments should be the new font_desc, so that we can remove the op stuff properly. Opening up all the arguments without the font_desc doesn't make sense imo. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch