From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [gustavoars-linux:testing/fam1 1/1] drivers/net/ethernet/qlogic/qed/qed_ll2.c:1228:14: error: invalid application of 'sizeof' to incomplete type 'struct <anonymous>[]'
Date: Tue, 12 May 2020 10:57:54 +0800 [thread overview]
Message-ID: <202005121049.M2OST4eH%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5492 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/fam1
head: 30309535b17df9a28c626c44727821be46707e8a
commit: 30309535b17df9a28c626c44727821be46707e8a [1/1] treewide: Replace one-element array with flexible-array
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 30309535b17df9a28c626c44727821be46707e8a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/net/ethernet/qlogic/qed/qed_ll2.c: In function 'qed_ll2_acquire_connection_tx':
>> drivers/net/ethernet/qlogic/qed/qed_ll2.c:1228:14: error: invalid application of 'sizeof' to incomplete type 'struct <anonymous>[]'
1228 | sizeof(p_descq->bds_set));
| ^
drivers/net/ethernet/qlogic/qed/qed_ll2.c: In function 'qed_ll2_establish_connection':
drivers/net/ethernet/qlogic/qed/qed_ll2.c:1588:14: error: invalid application of 'sizeof' to incomplete type 'struct <anonymous>[]'
1588 | sizeof(p_pkt->bds_set));
| ^
vim +1228 drivers/net/ethernet/qlogic/qed/qed_ll2.c
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1202
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1203 static int qed_ll2_acquire_connection_tx(struct qed_hwfn *p_hwfn,
13c547717231aa Mintz, Yuval 2017-06-09 1204 struct qed_ll2_info *p_ll2_info)
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1205 {
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1206 struct qed_ll2_tx_packet *p_descq;
f5823fe6897c44 Michal Kalderon 2017-10-09 1207 u32 desc_size;
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1208 u32 capacity;
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1209 int rc = 0;
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1210
13c547717231aa Mintz, Yuval 2017-06-09 1211 if (!p_ll2_info->input.tx_num_desc)
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1212 goto out;
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1213
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1214 rc = qed_chain_alloc(p_hwfn->cdev,
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1215 QED_CHAIN_USE_TO_CONSUME_PRODUCE,
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1216 QED_CHAIN_MODE_PBL,
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1217 QED_CHAIN_CNT_TYPE_U16,
13c547717231aa Mintz, Yuval 2017-06-09 1218 p_ll2_info->input.tx_num_desc,
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1219 sizeof(struct core_tx_bd),
1a4a69751f4d24 Mintz, Yuval 2017-06-20 1220 &p_ll2_info->tx_queue.txq_chain, NULL);
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1221 if (rc)
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1222 goto out;
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1223
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1224 capacity = qed_chain_get_capacity(&p_ll2_info->tx_queue.txq_chain);
f5823fe6897c44 Michal Kalderon 2017-10-09 1225 /* First element is part of the packet, rest are flexibly added */
f5823fe6897c44 Michal Kalderon 2017-10-09 1226 desc_size = (sizeof(*p_descq) +
f5823fe6897c44 Michal Kalderon 2017-10-09 1227 (p_ll2_info->input.tx_max_bds_per_packet - 1) *
f5823fe6897c44 Michal Kalderon 2017-10-09 @1228 sizeof(p_descq->bds_set));
f5823fe6897c44 Michal Kalderon 2017-10-09 1229
f5823fe6897c44 Michal Kalderon 2017-10-09 1230 p_descq = kcalloc(capacity, desc_size, GFP_KERNEL);
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1231 if (!p_descq) {
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1232 rc = -ENOMEM;
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1233 goto out;
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1234 }
f5823fe6897c44 Michal Kalderon 2017-10-09 1235 p_ll2_info->tx_queue.descq_mem = p_descq;
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1236
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1237 DP_VERBOSE(p_hwfn, QED_MSG_LL2,
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1238 "Allocated LL2 Txq [Type %08x] with 0x%08x buffers\n",
13c547717231aa Mintz, Yuval 2017-06-09 1239 p_ll2_info->input.conn_type, p_ll2_info->input.tx_num_desc);
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1240
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1241 out:
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1242 if (rc)
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1243 DP_NOTICE(p_hwfn,
0a7fb11c23c0fb Yuval Mintz 2016-10-01 1244 "Can't allocate memory for Tx LL2 with 0x%08x buffers\n",
13c547717231aa Mintz, Yuval 2017-06-09 1245 p_ll2_info->input.tx_num_desc);
13c547717231aa Mintz, Yuval 2017-06-09 1246 return rc;
13c547717231aa Mintz, Yuval 2017-06-09 1247 }
13c547717231aa Mintz, Yuval 2017-06-09 1248
:::::: The code at line 1228 was first introduced by commit
:::::: f5823fe6897c444265ef3919d8684b647eef904f qed: Add ll2 option to limit the number of bds per packet
:::::: TO: Michal Kalderon <Michal.Kalderon@cavium.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 59253 bytes --]
reply other threads:[~2020-05-12 2:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202005121049.M2OST4eH%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.