From: Dan Carpenter <dan.carpenter@oracle.com>
To: l.stelmach@samsung.com
Cc: kernel-janitors@vger.kernel.org
Subject: [bug report] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver
Date: Fri, 12 Nov 2021 15:36:48 +0300 [thread overview]
Message-ID: <20211112123648.GA21129@kili> (raw)
Hello Łukasz Stelmach,
The patch a97c69ba4f30: "net: ax88796c: ASIX AX88796C SPI Ethernet
Adapter Driver" from Oct 20, 2021, leads to the following Smatch
static checker warning:
drivers/net/ethernet/asix/ax88796c_main.c:391 ax88796c_start_xmit()
warn: test_bit() takes a bit number
drivers/net/ethernet/asix/ax88796c_main.c
382 static int
383 ax88796c_start_xmit(struct sk_buff *skb, struct net_device *ndev)
384 {
385 struct ax88796c_device *ax_local = to_ax88796c_device(ndev);
386
387 skb_queue_tail(&ax_local->tx_wait_q, skb);
388 if (skb_queue_len(&ax_local->tx_wait_q) > TX_QUEUE_HIGH_WATER)
389 netif_stop_queue(ndev);
390
--> 391 set_bit(EVENT_TX, &ax_local->flags);
EVENT_TX is BIT(1) so this ends up being a double BIT(BIT(1));. Which
is fine because it seems to be done consistently. But probably it
should be:
#define EVENT_INTR 0
#define EVENT_TX 1
#define EVENT_SET_MULTI 2
392 schedule_work(&ax_local->ax_work);
393
394 return NETDEV_TX_OK;
395 }
regards,
dan carpenter
next reply other threads:[~2021-11-12 12:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20211116004339eucas1p14e377393256e09c0e04e3da92ad0accb@eucas1p1.samsung.com>
2021-11-12 12:36 ` Dan Carpenter [this message]
2021-11-16 0:43 ` [bug report] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver Lukasz Stelmach
2021-11-16 6:34 ` Dan Carpenter
[not found] <CGME20211115132037eucas1p1ff59893ece466fbc5123513d355cb361@eucas1p1.samsung.com>
2021-11-11 13:35 ` Dan Carpenter
2021-11-15 13:20 ` Lukasz Stelmach
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=20211112123648.GA21129@kili \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=l.stelmach@samsung.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox