* [PATCH] selftests/drivers/net: replace typeof() with __auto_type
@ 2025-08-06 8:20 Pranav Tyagi
2025-08-06 15:29 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Pranav Tyagi @ 2025-08-06 8:20 UTC (permalink / raw)
To: andrew+netdev, davem, edumazet, kuba, pabeni, shuah, dw, haiyuewa,
axboe, netdev, linux-kselftest, linux-kernel
Cc: linux-kernel-mentees, Pranav Tyagi
Replace typeof() with __auto_type in iou-zcrx.c.
__auto_type was introduced in GCC 4.9 and reduces the compile time for
all compilers. No functional changes intended.
Signed-off-by: Pranav Tyagi <pranav.tyagi03@gmail.com>
---
tools/testing/selftests/drivers/net/hw/iou-zcrx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/hw/iou-zcrx.c b/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
index 62456df947bc..85551594bf0f 100644
--- a/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
+++ b/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
@@ -42,8 +42,8 @@ static long page_size;
#define SEND_SIZE (512 * 4096)
#define min(a, b) \
({ \
- typeof(a) _a = (a); \
- typeof(b) _b = (b); \
+ __auto_type _a = (a); \
+ __auto_type _b = (b); \
_a < _b ? _a : _b; \
})
#define min_t(t, a, b) \
--
2.49.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/drivers/net: replace typeof() with __auto_type
2025-08-06 8:20 [PATCH] selftests/drivers/net: replace typeof() with __auto_type Pranav Tyagi
@ 2025-08-06 15:29 ` Jakub Kicinski
2025-08-06 15:34 ` Pranav Tyagi
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2025-08-06 15:29 UTC (permalink / raw)
To: Pranav Tyagi
Cc: andrew+netdev, davem, edumazet, pabeni, shuah, dw, haiyuewa,
axboe, netdev, linux-kselftest, linux-kernel,
linux-kernel-mentees
On Wed, 6 Aug 2025 13:50:16 +0530 Pranav Tyagi wrote:
> Replace typeof() with __auto_type in iou-zcrx.c.
> __auto_type was introduced in GCC 4.9 and reduces the compile time for
> all compilers. No functional changes intended.
Yet another unnecessary compiler feature. Please no.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/drivers/net: replace typeof() with __auto_type
2025-08-06 15:29 ` Jakub Kicinski
@ 2025-08-06 15:34 ` Pranav Tyagi
0 siblings, 0 replies; 3+ messages in thread
From: Pranav Tyagi @ 2025-08-06 15:34 UTC (permalink / raw)
To: Jakub Kicinski
Cc: andrew+netdev, davem, edumazet, pabeni, shuah, dw, haiyuewa,
axboe, netdev, linux-kselftest, linux-kernel,
linux-kernel-mentees
On Wed, Aug 6, 2025 at 8:59 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Wed, 6 Aug 2025 13:50:16 +0530 Pranav Tyagi wrote:
> > Replace typeof() with __auto_type in iou-zcrx.c.
> > __auto_type was introduced in GCC 4.9 and reduces the compile time for
> > all compilers. No functional changes intended.
>
> Yet another unnecessary compiler feature. Please no.
I understand. Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-06 15:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-06 8:20 [PATCH] selftests/drivers/net: replace typeof() with __auto_type Pranav Tyagi
2025-08-06 15:29 ` Jakub Kicinski
2025-08-06 15:34 ` Pranav Tyagi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).