re: bnx2x: Prepare device and initialize VF database
From: Dan Carpenter <hidden>
Date: 2013-01-07 08:18:40
From: Dan Carpenter <hidden>
Date: 2013-01-07 08:18:40
Hello Ariel Elior,
The patch b56e9670ffa4: "bnx2x: Prepare device and initialize VF
database" from Jan 1, 2013, leads to the following warning:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1346
bnx2x_pretend_func()
warn: should this be '>= E1H_FUNC_MAX'
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
1342 int bnx2x_pretend_func(struct bnx2x *bp, u16 pretend_func_val)
1343 {
1344 u32 pretend_reg;
1345
1346 if (CHIP_IS_E1H(bp) && pretend_func_val > E1H_FUNC_MAX)
1347 return -1;
1348
This is static checker test has too many false positives so I haven't
released it. Basically, every other place that uses E1H_FUNC_MAX
assumes we start counting from zero except this one. I don't know the
code enough to say if it's a problem or intended.
regards,
dan carpenter