public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
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 08:40:59 +0000	[thread overview]
Message-ID: <bdbdfdaad3a842d2837ac9d15ef2ab25@AcuMS.aculab.com> (raw)
In-Reply-To: <937e14c1-d884-0b6e-595a-e8aaa3d09025@kernel.org>

From: Jiri Slaby
> Sent: Wednesday, August 16, 2023 7:47 AM
> 
> On 15. 08. 23, 19:22, Nathan Chancellor wrote:
> > On Thu, Aug 10, 2023 at 11:15:08AM +0200, Jiri Slaby (SUSE) wrote:
> >> Unify the type of tty_operations::write() counters with the 'count'
> >> parameter. I.e. use size_t for them.
> >>
> >> This includes changing constants to UL to keep min() and avoid min_t().
> >
> > This patch appears to cause a warning/error on 32-bit architectures now
> > due to this part of the change, as size_t is 'unsigned int' there:
> 
> Right, this is my brain fart thinking ulong is the same as size_t
> everywhere. No, size_t is uint on 32bit.
> 
> I will fix this -- kernel build bot seems to be slow -- it didn't find
> the issue out in my queue, nor in tty-testing.

'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.)

Pretty much the only other patch is casting the constants to (size_t).

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

  reply	other threads:[~2023-08-16  8:41 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 [this message]
2023-08-16  8:58         ` Jiri Slaby
2023-08-16  9:18           ` David Laight

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=bdbdfdaad3a842d2837ac9d15ef2ab25@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