All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] net: Add a WWAN subsystem
@ 2021-04-20 17:57 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2021-04-20 17:57 UTC (permalink / raw)
  To: loic.poulain; +Cc: kernel-janitors

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-20 17:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 17:57 [bug report] net: Add a WWAN subsystem Dan Carpenter

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.