From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] cxgb4: add common api support for configuring filters
Date: Thu, 01 Mar 2018 09:52:16 +0000 [thread overview]
Message-ID: <20180301095216.GA11704@mwanda> (raw)
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
next reply other threads:[~2018-03-01 9:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-01 9:52 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-11-24 11:05 [bug report] cxgb4: add common api support for configuring filters Dan Carpenter
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=20180301095216.GA11704@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 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.