From: David Laight <David.Laight@ACULAB.COM>
To: 'Jiri Slaby' <jirislaby@kernel.org>,
Nathan Chancellor <nathan@kernel.org>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-staging@lists.linux.dev" <linux-staging@lists.linux.dev>
Subject: RE: [PATCH 34/36] tty: gdm724x: convert counts to size_t
Date: Wed, 16 Aug 2023 09:18:03 +0000 [thread overview]
Message-ID: <9c4a831ae5284aec887ea60d4dda2b8c@AcuMS.aculab.com> (raw)
In-Reply-To: <00de3273-9433-138d-b659-826457e6a008@kernel.org>
From: Jiri Slaby
> Sent: Wednesday, August 16, 2023 9:59 AM
...
> > 'Vote up' my patches to minmax.h that make this all work.
> > Then it won't care provided both values have the same signedness.
> > (or, with patch 5, are non-negative 31bit compile time constants.)
>
> Oh yeah, that [1] looks great. Why should one care in min(4096,
> sizeof()) after all…
>
> So what's the current status of those?
Waiting... :-(
The only comment is from Linus who really doesn't like the idea
that min(signed_var, 4u) should be the same as min(signed_var, 4).
I think he is ok with min(unsigned_var, 4) though.
The min_t(u16,...) I quoted from the console buffer code is
a real bug that was identified by someone else last week.
Really min_t() is just an accident waiting to happen.
David
>
> [1]
> https://lore.kernel.org/all/b4ce9dad748e489f9314a2dc95615033@AcuMS.aculab.com/
>
> thanks,
> --
> js
> suse labs
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
prev parent reply other threads:[~2023-08-16 9:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230810091510.13006-1-jirislaby@kernel.org>
2023-08-10 9:15 ` [PATCH 34/36] tty: gdm724x: convert counts to size_t Jiri Slaby (SUSE)
2023-08-10 9:42 ` Dan Carpenter
2023-08-10 10:08 ` Jiri Slaby
2023-08-10 10:39 ` [PATCH 34-and-three-quarters/36] tty: gdm724x: simplify gdm_tty_write() Jiri Slaby (SUSE)
2023-08-11 9:11 ` Ilpo Järvinen
2023-08-15 17:22 ` [PATCH 34/36] tty: gdm724x: convert counts to size_t Nathan Chancellor
2023-08-16 6:46 ` Jiri Slaby
2023-08-16 8:40 ` David Laight
2023-08-16 8:58 ` Jiri Slaby
2023-08-16 9:18 ` David Laight [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9c4a831ae5284aec887ea60d4dda2b8c@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=nathan@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox