From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <nipun.gupta@nxp.com>,
<hemant.agrawal@nxp.com>
Subject: [dpdk-dev] [PATCH] raw/skeleton: fix return value check
Date: Thu, 22 Apr 2021 14:21:46 +0800 [thread overview]
Message-ID: <1619072506-48243-1-git-send-email-humin29@huawei.com> (raw)
This patch adds return value check for setting an attribute.
Fixes: 88a81bcecb7b ("raw/skeleton: remove compile-time constant for device id")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/raw/skeleton/skeleton_rawdev_test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c
index 1405df0..484468e 100644
--- a/drivers/raw/skeleton/skeleton_rawdev_test.c
+++ b/drivers/raw/skeleton/skeleton_rawdev_test.c
@@ -295,6 +295,7 @@ test_rawdev_attr_set_get(void)
dummy_value = &set_value;
*dummy_value = 200;
ret = rte_rawdev_set_attr(test_dev_id, "Test2", (uintptr_t)dummy_value);
+ RTE_TEST_ASSERT(!ret, "Unable to set an attribute (Test2)");
/* Check if attributes have been set */
ret = rte_rawdev_get_attr(test_dev_id, "Test1", &ret_value);
--
2.7.4
next reply other threads:[~2021-04-22 6:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 6:21 Min Hu (Connor) [this message]
2021-05-12 14:29 ` Thomas Monjalon
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=1619072506-48243-1-git-send-email-humin29@huawei.com \
--to=humin29@huawei.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=hemant.agrawal@nxp.com \
--cc=nipun.gupta@nxp.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).