[bug report] net: Add a WWAN subsystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux