* re: bnx2x: Prepare device and initialize VF database
@ 2013-01-07 8:18 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-01-07 8:18 UTC (permalink / raw)
To: ariele; +Cc: netdev
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-01-07 8:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07 8:18 bnx2x: Prepare device and initialize VF database Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox