From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CE7FC00A89 for ; Mon, 2 Nov 2020 11:31:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D6FF722275 for ; Mon, 2 Nov 2020 11:31:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="RHq+P4QI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728542AbgKBLbH (ORCPT ); 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-Google-Smtp-Source: ABdhPJymTv/GY1o66DtI8nUb04RogVy4P/jau3IpWYQX9hL2oM8RWoh0Dt8euA0YAJD1frHT9NECvc2I9O/h/4i+Pzk= 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