From: Shijith Thotton <shijith.thotton@caviumnetworks.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/2] net/liquidioi/base: fix mbox command initialization
Date: Mon, 10 Apr 2017 11:56:06 +0530 [thread overview]
Message-ID: <1491805567-10743-1-git-send-email-shijith.thotton@caviumnetworks.com> (raw)
Initialize mail box command to request VF FLR. Data field was
uninitialized before as it was not required and caused the following
error during scan.
Reported by Coverity scan:
1384518 Uninitialized scalar variable
Fixes: cdb166963cae ("net/liquidio: add API for VF FLR")
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
---
drivers/net/liquidio/base/lio_23xx_vf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/liquidio/base/lio_23xx_vf.c b/drivers/net/liquidio/base/lio_23xx_vf.c
index 6ff5b69..e30c20d 100644
--- a/drivers/net/liquidio/base/lio_23xx_vf.c
+++ b/drivers/net/liquidio/base/lio_23xx_vf.c
@@ -31,6 +31,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <string.h>
+
#include <rte_ethdev.h>
#include <rte_cycles.h>
#include <rte_malloc.h>
@@ -382,7 +384,7 @@
{
struct lio_mbox_cmd mbox_cmd;
- mbox_cmd.msg.mbox_msg64 = 0;
+ memset(&mbox_cmd, 0, sizeof(struct lio_mbox_cmd));
mbox_cmd.msg.s.type = LIO_MBOX_REQUEST;
mbox_cmd.msg.s.resp_needed = 0;
mbox_cmd.msg.s.cmd = LIO_VF_FLR_REQUEST;
--
1.8.3.1
next reply other threads:[~2017-04-10 6:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-10 6:26 Shijith Thotton [this message]
2017-04-10 6:26 ` [dpdk-dev] [PATCH 2/2] net/liquidio: fix null pointer check Shijith Thotton
2017-04-10 7:18 ` [dpdk-dev] [PATCH v2 1/2] net/liquidio/base: fix mbox command initialization Shijith Thotton
2017-04-10 7:18 ` [dpdk-dev] [PATCH v2 2/2] net/liquidio: fix null pointer check Shijith Thotton
2017-04-10 10:07 ` [dpdk-dev] [PATCH v2 1/2] net/liquidio/base: fix mbox command initialization Ferruh Yigit
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=1491805567-10743-1-git-send-email-shijith.thotton@caviumnetworks.com \
--to=shijith.thotton@caviumnetworks.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.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).