From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)
Date: Wed, 12 Oct 2016 07:06:42 +0000 [thread overview]
Message-ID: <20161012070642.GA29314@mwanda> (raw)
In-Reply-To: <20160930095520.GA10045@mwanda>
Hello Netanel Belgazal,
The patch 1738cd3ed342: "net: ena: Add a driver for Amazon Elastic
Network Adapters (ENA)" from Aug 10, 2016, leads to the following
static checker warning:
drivers/net/ethernet/amazon/ena/ena_com.c:1259 ena_com_destroy_io_cq()
warn: struct type mismatch 'ena_admin_aq_destroy_cq_cmd vs ena_admin_aq_destroy_sq_cmd'
drivers/net/ethernet/amazon/ena/ena_com.c
1251 int ena_com_destroy_io_cq(struct ena_com_dev *ena_dev,
1252 struct ena_com_io_cq *io_cq)
1253 {
1254 struct ena_com_admin_queue *admin_queue = &ena_dev->admin_queue;
1255 struct ena_admin_aq_destroy_cq_cmd destroy_cmd;
^
1256 struct ena_admin_acq_destroy_cq_resp_desc destroy_resp;
1257 int ret;
1258
1259 memset(&destroy_cmd, 0x0, sizeof(struct ena_admin_aq_destroy_sq_cmd));
^
These struct names are a million characters long but there is one
character in the middle which is different. See if you can spot which
one it is.
Presumably this is a cut and paste error because I really doubt that
you are really basically transcribing the entire works of William
Shakespear every time you declare a variable. Why not just say:
memset(&destroy, 0, sizeof(destroy));
That's better style and more future proof.
1260
regards,
dan carpenter
next prev parent reply other threads:[~2016-10-12 7:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-30 9:55 [bug report] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA) Dan Carpenter
2016-10-12 7:06 ` Dan Carpenter [this message]
2016-10-13 16:18 ` Netanel Belgazal
2016-10-13 16:25 ` Netanel Belgazal
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=20161012070642.GA29314@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.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