Re: [PATCH v6 13/15] net: qrtr: limit endpoint range to 16 bits on 32-bit machines
From: Juha-Matti Tilli
Date: Sat Sep 05 2026 - 00:22:31 EST
On Sat, Sep 5, 2026, at 04:40, Jakub Kicinski wrote:
> On Tue, 1 Sep 2026 16:19:32 +0300 Juha-Matti Tilli wrote:
> > On 64-bit machines, use the full range for endpoint ids, but on 32-bit
> > machines, use only 16 bits. This gives plenty of endpoints, 65534 to
> > be specific, apart from the invalid zero value and the local endpoint.
> >
> > [snip]
>
> Doesn't build on 32bit x86:
>
> ../net/qrtr/af_qrtr.c: In function ‘qrtr_endpoint_register’:
> ../net/qrtr/af_qrtr.c:28:58: error: ‘UINT16_MAX’ undeclared (first use in this function)
> 28 | #define QRTR_ENDPOINT_RANGE XA_LIMIT(qrtr_local_nid + 1, UINT16_MAX)
> [snip]
Indeed, I will later post a new version with UINT16_MAX replaced by
65535.
I thought I was careful testing these, but now I recall that the
individual patches were test-compiled on 64-bit and only the branch
head with all patches was tested on 32-bit.
Thanks for noticing!
BR, Juha-Matti