Re: [PATCH v2 2/2] tty/vt: Avoid passing struct console_font_op to con_font_copy()

2020-11-02 Thread Daniel Vetter
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

Re: [PATCH v2 2/2] tty/vt: Avoid passing struct console_font_op to con_font_copy()

2020-11-02 Thread Peilin Ye
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

Re: [PATCH v2 2/2] tty/vt: Avoid passing struct console_font_op to con_font_copy()

2020-11-02 Thread Daniel Vetter
On Mon, Nov 02, 2020 at 04:37:55AM -0500, Peilin Ye wrote: > con_font_op() is passing an entire `struct console_font_op *` to > con_font_copy(), but con_font_copy() only uses `op->height`. Additionally, > con_font_copy() is silently assigning the unsigned `op->height` to the > signed `con`, then

[PATCH v2 2/2] tty/vt: Avoid passing struct console_font_op to con_font_copy()

2020-11-02 Thread Peilin Ye
con_font_op() is passing an entire `struct console_font_op *` to con_font_copy(), but con_font_copy() only uses `op->height`. Additionally, con_font_copy() is silently assigning the unsigned `op->height` to the signed `con`, then pass it to fbcon_copy_font(). Let con_font_copy() and