From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Bruce Richardson <bruce.richardson@intel.com>
Subject: [RFC 7/8] telemetry: avoid potential name conflict for handler
Date: Wed, 27 Aug 2025 16:14:10 -0700 [thread overview]
Message-ID: <20250827231528.236172-8-stephen@networkplumber.org> (raw)
In-Reply-To: <20250827231528.236172-1-stephen@networkplumber.org>
The typedef for handler creates shadow declaration warnings
in other drivers with variables of that name. Add telemetry_
prefix like other variables in the library.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/telemetry/rte_telemetry.h | 2 +-
lib/telemetry/telemetry.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/telemetry/rte_telemetry.h b/lib/telemetry/rte_telemetry.h
index c4554e4028..4202847cd7 100644
--- a/lib/telemetry/rte_telemetry.h
+++ b/lib/telemetry/rte_telemetry.h
@@ -369,7 +369,7 @@ typedef int (*telemetry_arg_cb)(const char *cmd, const char *params, void *arg,
* @return
* Void.
*/
-typedef void * (*handler)(void *sock_id);
+typedef void * (*telemetry_handler)(void *sock_id);
/**
* Used when registering a command and callback function with telemetry.
diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
index 1cbbffbf3f..7b8fee0e0e 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -47,7 +47,7 @@ struct cmd_callback {
struct socket {
int sock;
char path[sizeof(((struct sockaddr_un *)0)->sun_path)];
- handler fn;
+ telemetry_handler fn;
RTE_ATOMIC(uint16_t) *num_clients;
};
static struct socket v2_socket; /* socket for v2 telemetry */
--
2.47.2
next prev parent reply other threads:[~2025-08-27 23:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 23:14 [RFC 0/8] Avoid overlapping declarations Stephen Hemminger
2025-08-27 23:14 ` [RFC 1/8] test/ring: avoid shadow variable usage Stephen Hemminger
2025-08-28 7:42 ` Bruce Richardson
2025-08-27 23:14 ` [RFC 2/8] test/table: replace conflicting variable name Stephen Hemminger
2025-08-27 23:14 ` [RFC 3/8] eal: add macro to disable shadow warnings Stephen Hemminger
2025-08-28 7:43 ` Bruce Richardson
2025-08-27 23:14 ` [RFC 4/8] eal: avoid shadowed variable aligned_end Stephen Hemminger
2025-08-27 23:14 ` [RFC 5/8] eal: avoid shadowed variables in trace code Stephen Hemminger
2025-08-27 23:14 ` [RFC 6/8] ethdev: avoid shadowed variable warnings Stephen Hemminger
2025-08-27 23:14 ` Stephen Hemminger [this message]
2025-08-28 7:45 ` [RFC 7/8] telemetry: avoid potential name conflict for handler Bruce Richardson
2025-08-27 23:14 ` [RFC 8/8] pcapng: avoid shadow declaration warning Stephen Hemminger
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=20250827231528.236172-8-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.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;
as well as URLs for NNTP newsgroup(s).