All of lore.kernel.org
 help / color / mirror / Atom feed
* [ti:ti-linux-6.1.y-wip 10/22] drivers/net/ethernet/ti/cpsw-proxy-client.c:1753:29: warning: the comparison will always evaluate as 'true' for the address of 'virt_port_tx_chan' will never be NULL
@ 2024-02-18 12:58 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-02-18 12:58 UTC (permalink / raw)
  To: Siddharth Vadapalli; +Cc: oe-kbuild-all, vigneshr, nm, Udit Kumar

tree:   git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-6.1.y-wip
head:   77aa27cbdca359bf0735b36ada464ec65b520943
commit: 5f1b32f6bd1b9f1dd56eb4f062c5080dcd76f5cf [10/22] net: ethernet: ti: cpsw-proxy-client: Switch to ATTACH Request
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240218/202402182009.OWMy4ndK-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240218/202402182009.OWMy4ndK-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402182009.OWMy4ndK-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/ti/cpsw-proxy-client.c: In function 'cpsw_proxy_client_cb':
   drivers/net/ethernet/ti/cpsw-proxy-client.c:472:13: warning: variable 'response_status' set but not used [-Wunused-but-set-variable]
     472 |         int response_status, ret = 0;
         |             ^~~~~~~~~~~~~~~
   drivers/net/ethernet/ti/cpsw-proxy-client.c: In function 'cpsw_proxy_client_detach':
>> drivers/net/ethernet/ti/cpsw-proxy-client.c:1753:29: warning: the comparison will always evaluate as 'true' for the address of 'virt_port_tx_chan' will never be NULL [-Waddress]
    1753 |                         if (&virt_port->virt_port_tx_chan &&
         |                             ^
   drivers/net/ethernet/ti/cpsw-proxy-client.c:86:41: note: 'virt_port_tx_chan' declared here
      86 |         struct cpsw_proxy_tx_chan       virt_port_tx_chan[CPSW_PROXY_CLIENT_MAX_TX_QUEUES];
         |                                         ^~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/ti/cpsw-proxy-client.c:1753:59: warning: the comparison will always evaluate as 'true' for the address of 'is_valid' will never be NULL [-Waddress]
    1753 |                         if (&virt_port->virt_port_tx_chan &&
         |                                                           ^~
   drivers/net/ethernet/ti/cpsw-proxy-client.c:60:41: note: 'is_valid' declared here
      60 |         bool                            is_valid;
         |                                         ^~~~~~~~
>> drivers/net/ethernet/ti/cpsw-proxy-client.c:1770:29: warning: the comparison will always evaluate as 'true' for the address of 'virt_port_rx_chan' will never be NULL [-Waddress]
    1770 |                         if (&virt_port->virt_port_rx_chan &&
         |                             ^
   drivers/net/ethernet/ti/cpsw-proxy-client.c:87:41: note: 'virt_port_rx_chan' declared here
      87 |         struct cpsw_proxy_rx_chan       virt_port_rx_chan[CPSW_PROXY_CLIENT_MAX_RX_QUEUES];
         |                                         ^~~~~~~~~~~~~~~~~
   drivers/net/ethernet/ti/cpsw-proxy-client.c:1770:59: warning: the comparison will always evaluate as 'true' for the address of 'is_valid' will never be NULL [-Waddress]
    1770 |                         if (&virt_port->virt_port_rx_chan &&
         |                                                           ^~
   drivers/net/ethernet/ti/cpsw-proxy-client.c:79:41: note: 'is_valid' declared here
      79 |         bool                            is_valid;
         |                                         ^~~~~~~~


vim +1753 drivers/net/ethernet/ti/cpsw-proxy-client.c

  1727	
  1728	static void cpsw_proxy_client_detach(struct cpsw_proxy_common *common)
  1729	{
  1730		struct cpsw_virt_port *virt_port;
  1731		struct message response;
  1732		u32 port_id;
  1733		int ret, i, j;
  1734	
  1735		for (i = 0; i < common->num_virt_ports; i++) {
  1736			virt_port = &common->virt_ports[i];
  1737			port_id = virt_port->virt_port_id;
  1738	
  1739			/* Free MAC Request */
  1740			if (virt_port->mac_is_valid) {
  1741				ret = cpsw_proxy_client_send_request(common, virt_port,
  1742								     virt_port->virt_port_token,
  1743								     ETHREMOTECFG_FREE_MAC, &response);
  1744				if (ret) {
  1745					dev_err(common->dev, "failed to detach port %u err: %d\n",
  1746						port_id, ret);
  1747					return;
  1748				}
  1749			}
  1750	
  1751			/* Free TX DMA Channel */
  1752			for (j = 0; j < virt_port->num_tx_chan; j++) {
> 1753				if (&virt_port->virt_port_tx_chan &&
  1754				    &virt_port->virt_port_tx_chan->is_valid) {
  1755					virt_port->curr_tx_chan_idx = j;
  1756					ret = cpsw_proxy_client_send_request(common, virt_port,
  1757									     virt_port->virt_port_token,
  1758									     ETHREMOTECFG_FREE_TX,
  1759									     &response);
  1760					if (ret) {
  1761						dev_err(common->dev, "failed to detach port %u err: %d\n",
  1762							port_id, ret);
  1763						return;
  1764					}
  1765				}
  1766			}
  1767	
  1768			/* Free RX DMA Flow */
  1769			for (j = 0; j < virt_port->num_rx_chan; j++) {
> 1770				if (&virt_port->virt_port_rx_chan &&
  1771				    &virt_port->virt_port_rx_chan->is_valid) {
  1772					virt_port->curr_rx_chan_idx = j;
  1773					ret = cpsw_proxy_client_send_request(common, virt_port,
  1774									     virt_port->virt_port_token,
  1775									     ETHREMOTECFG_FREE_RX,
  1776									     &response);
  1777					if (ret) {
  1778						dev_err(common->dev, "failed to detach port %u err: %d\n",
  1779							port_id, ret);
  1780						return;
  1781					}
  1782				}
  1783			}
  1784	
  1785			/* Send Detach Request */
  1786			ret = cpsw_proxy_client_send_request(common, virt_port,
  1787							     virt_port->virt_port_token,
  1788							     ETHREMOTECFG_DETACH, &response);
  1789			if (ret) {
  1790				dev_err(common->dev, "failed to detach port %u err: %d\n", port_id, ret);
  1791				return;
  1792			}
  1793		}
  1794	}
  1795	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

only message in thread, other threads:[~2024-02-18 13:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-18 12:58 [ti:ti-linux-6.1.y-wip 10/22] drivers/net/ethernet/ti/cpsw-proxy-client.c:1753:29: warning: the comparison will always evaluate as 'true' for the address of 'virt_port_tx_chan' will never be NULL kernel test robot

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.