* [bug report] cxgb4: add common api support for configuring filters
@ 2016-11-24 11:05 Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2016-11-24 11:05 UTC (permalink / raw)
To: kernel-janitors
Hello Rahul Lakkireddy,
The patch 578b46b9383c: "cxgb4: add common api support for
configuring filters" from Sep 20, 2016, leads to the following static
checker warning:
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c:537 __cxgb4_set_filter()
warn: we tested 'f->valid' before and it was 'false'
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
512 /* Check to make sure that provided filter index is not
513 * already in use by someone else
514 */
515 f = &adapter->tids.ftid_tab[filter_id];
516 if (f->valid)
517 return -EBUSY;
If valid is set, then we return -EBUSY.
518
519 fidx = filter_id + adapter->tids.ftid_base;
520 ret = cxgb4_set_ftid(&adapter->tids, filter_id,
521 fs->type ? PF_INET6 : PF_INET);
522 if (ret)
523 return ret;
524
525 /* Check to make sure the filter requested is writable ... */
526 ret = writable_filter(f);
527 if (ret) {
528 /* Clear the bits we have set above */
529 cxgb4_clear_ftid(&adapter->tids, filter_id,
530 fs->type ? PF_INET6 : PF_INET);
531 return ret;
532 }
533
534 /* Clear out any old resources being used by the filter before
535 * we start constructing the new filter.
536 */
537 if (f->valid)
538 clear_filter(adapter, f);
So probably these lines can be removed?
539
540 /* Convert the filter specification into our internal format.
541 * We copy the PF/VF specification into the Outer VLAN field
542 * here so the rest of the code -- including the interface to
543 * the firmware -- doesn't have to constantly do these checks.
544 */
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* [bug report] cxgb4: add common api support for configuring filters
@ 2018-03-01 9:52 Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2018-03-01 9:52 UTC (permalink / raw)
To: kernel-janitors
Hello Rahul Lakkireddy,
The patch 578b46b9383c: "cxgb4: add common api support for
configuring filters" from Sep 20, 2016, leads to the following static
checker warning:
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c:1341 __cxgb4_set_filter()
warn: we tested 'f->valid' before and it was 'false'
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
1313
1314 /* Check to make sure that provided filter index is not
1315 * already in use by someone else
1316 */
1317 f = &adapter->tids.ftid_tab[filter_id];
1318 if (f->valid)
^^^^^^^^
Checked.
1319 return -EBUSY;
1320
1321 fidx = filter_id + adapter->tids.ftid_base;
1322 ret = cxgb4_set_ftid(&adapter->tids, filter_id,
1323 fs->type ? PF_INET6 : PF_INET,
1324 chip_ver);
1325 if (ret)
1326 return ret;
1327
1328 /* Check t make sure the filter requested is writable ... */
1329 ret = writable_filter(f);
1330 if (ret) {
1331 /* Clear the bits we have set above */
1332 cxgb4_clear_ftid(&adapter->tids, filter_id,
1333 fs->type ? PF_INET6 : PF_INET,
1334 chip_ver);
1335 return ret;
1336 }
1337
1338 /* Clear out any old resources being used by the filter before
1339 * we start constructing the new filter.
1340 */
1341 if (f->valid)
^^^^^^^^
I don't think this can be true.
1342 clear_filter(adapter, f);
1343
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-01 9:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-01 9:52 [bug report] cxgb4: add common api support for configuring filters Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2016-11-24 11:05 Dan Carpenter
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).