From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Ori Kam <orika@nvidia.com>
Subject: [PATCH 3/4] regexdev: another unnecessary deref of function pointers
Date: Tue, 11 Mar 2025 08:51:31 -0700 [thread overview]
Message-ID: <20250311155300.13410-4-stephen@networkplumber.org> (raw)
In-Reply-To: <20250311155300.13410-1-stephen@networkplumber.org>
The expression *dev->enqueue and dev->enqueue are equivalent.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/regexdev/rte_regexdev.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/regexdev/rte_regexdev.h b/lib/regexdev/rte_regexdev.h
index b18a1d4251..1534e9f84a 100644
--- a/lib/regexdev/rte_regexdev.h
+++ b/lib/regexdev/rte_regexdev.h
@@ -1473,14 +1473,14 @@ rte_regexdev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
struct rte_regexdev *dev = &rte_regex_devices[dev_id];
#ifdef RTE_LIBRTE_REGEXDEV_DEBUG
RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL);
- if (*dev->enqueue == NULL)
+ if (dev->enqueue == NULL)
return -ENOTSUP;
if (qp_id >= dev->data->dev_conf.nb_queue_pairs) {
RTE_REGEXDEV_LOG_LINE(ERR, "Invalid queue %d", qp_id);
return -EINVAL;
}
#endif
- return (*dev->enqueue)(dev, qp_id, ops, nb_ops);
+ return dev->enqueue(dev, qp_id, ops, nb_ops);
}
/**
@@ -1533,14 +1533,14 @@ rte_regexdev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
struct rte_regexdev *dev = &rte_regex_devices[dev_id];
#ifdef RTE_LIBRTE_REGEXDEV_DEBUG
RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL);
- if (*dev->dequeue == NULL)
+ if (dev->dequeue == NULL)
return -ENOTSUP;
if (qp_id >= dev->data->dev_conf.nb_queue_pairs) {
RTE_REGEXDEV_LOG_LINE(ERR, "Invalid queue %d", qp_id);
return -EINVAL;
}
#endif
- return (*dev->dequeue)(dev, qp_id, ops, nb_ops);
+ return dev->dequeue(dev, qp_id, ops, nb_ops);
}
#ifdef __cplusplus
--
2.47.2
next prev parent reply other threads:[~2025-03-11 15:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 15:51 [PATCH 0/4] more unnecessary function pointer Stephen Hemminger
2025-03-11 15:51 ` [PATCH 1/4] raw/ifpga: remove unnecessary deref of function pointers Stephen Hemminger
2025-03-11 16:03 ` Bruce Richardson
2025-03-11 15:51 ` [PATCH 2/4] crypto/ionic: remove unnecessary deref of function pointer Stephen Hemminger
2025-03-11 15:51 ` Stephen Hemminger [this message]
2025-03-11 15:51 ` [PATCH 4/4] vhost: remove unnecessary deref of function pointers Stephen Hemminger
2025-03-11 16:04 ` [PATCH 0/4] more unnecessary function pointer Bruce Richardson
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=20250311155300.13410-4-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=orika@nvidia.com \
/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).