[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201028103050.GA1209391@PWN>
Date: Wed, 28 Oct 2020 06:30:50 -0400
From: Peilin Ye <yepeilin.cs@...il.com>
To: Daniel Vetter <daniel@...ll.ch>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"James E . J . Bottomley" <James.Bottomley@...senpartnership.com>,
Helge Deller <deller@....de>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Jiri Slaby <jirislaby@...nel.org>,
linux-parisc@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] Fonts: Make font size unsigned in font_desc
On Wed, Oct 28, 2020 at 09:18:44AM +0100, Daniel Vetter wrote:
> On Wed, Oct 28, 2020 at 01:43:07AM -0400, Peilin Ye wrote:
> > On Tue, Oct 27, 2020 at 07:50:58PM +0100, Daniel Vetter wrote:
> > > On Tue, Oct 27, 2020 at 12:33:05PM -0400, Peilin Ye wrote:
> > > > It is improper to define `width` and `height` as signed in `struct
> > > > font_desc`. Make them unsigned. Also, change the corresponding printk()
> > > > format identifiers from `%d` to `%u`, in sti_select_fbfont().
> > > >
> > > > Signed-off-by: Peilin Ye <yepeilin.cs@...il.com>
> > >
> > > I'm not entirely sure of the motivation here ... height/width should never
> > > ever be even close to the limit here. Or have you seen integer math that
> > > could potentially go wrong if we go with unsigned instead of int?
> >
> > Oh... No, I have not. I just thought we shouldn't represent a length
> > using a signed value. Also, width and height in console_font are
> > unsigned int - that shouldn't matter that much though.
>
> Oh this is actually a good reason, since that's the uapi structure. And so
> using the exact same signedness should help a bit with accidental casting
> bugs.
>
> If you mention this in the commit message I think this is good to go.
Ah, I see, v2 on the way. Please ignore [v2 3/5], that doesn't hunk with
this patch in effect...
One newbie question, should I mention in the commit message, if a patch
depends on another patch in the series in order to hunk properly?
Peilin
Powered by blists - more mailing lists