public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: loic.poulain@linaro.org
Cc: kernel-janitors@vger.kernel.org
Subject: [bug report] net: Add a WWAN subsystem
Date: Tue, 20 Apr 2021 20:57:52 +0300	[thread overview]
Message-ID: <YH8WICWXexnR0Xul@mwanda> (raw)

Hello Loic Poulain,

The patch 9a44c1cc6388: "net: Add a WWAN subsystem" from Apr 16,
2021, leads to the following static checker warning:

	drivers/net/wwan/wwan_core.c:305 wwan_port_txon()
	warn: test_bit() takes a bit number

drivers/net/wwan/wwan_core.c
   303  void wwan_port_txon(struct wwan_port *port)
   304  {
   305          clear_bit(WWAN_PORT_TX_OFF, &port->flags);
                          ^^^^^^^^^^^^^^^^
This is BIT(0) but the clear_bit() argument should just be 0 otherwise
it's a double shift bug like BIT(BIT(0)).

   306          wake_up_interruptible(&port->waitqueue);
   307  }

See also:

drivers/net/wwan/wwan_core.c:305 wwan_port_txon() warn: test_bit() takes a bit number
drivers/net/wwan/wwan_core.c:312 wwan_port_txoff() warn: test_bit() takes a bit number
drivers/net/wwan/wwan_core.c:379 is_write_blocked() warn: test_bit() takes a bit number
drivers/net/wwan/mhi_wwan_ctrl.c:46 mhi_wwan_rx_budget_inc() warn: test_bit() takes a bit number
drivers/net/wwan/mhi_wwan_ctrl.c:62 mhi_wwan_rx_budget_dec() warn: test_bit() takes a bit number
drivers/net/wwan/mhi_wwan_ctrl.c:119 mhi_wwan_ctrl_start() warn: test_bit() takes a bit number
drivers/net/wwan/mhi_wwan_ctrl.c:120 mhi_wwan_ctrl_start() warn: test_bit() takes a bit number
drivers/net/wwan/mhi_wwan_ctrl.c:132 mhi_wwan_ctrl_stop() warn: test_bit() takes a bit number
drivers/net/wwan/mhi_wwan_ctrl.c:148 mhi_wwan_ctrl_tx() warn: test_bit() takes a bit number
drivers/net/wwan/mhi_wwan_ctrl.c:230 mhi_wwan_ctrl_probe() warn: test_bit() takes a bit number
drivers/net/wwan/mhi_wwan_ctrl.c:232 mhi_wwan_ctrl_probe() warn: test_bit() takes a bit number

regards,
dan carpenter

                 reply	other threads:[~2021-04-20 17:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=YH8WICWXexnR0Xul@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=loic.poulain@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox