From: kernel test robot <lkp@intel.com>
To: Siddharth Vadapalli <s-vadapalli@ti.com>
Cc: oe-kbuild-all@lists.linux.dev, vigneshr@ti.com, nm@ti.com,
Udit Kumar <u-kumar1@ti.com>
Subject: [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
Date: Sun, 18 Feb 2024 20:58:36 +0800 [thread overview]
Message-ID: <202402182009.OWMy4ndK-lkp@intel.com> (raw)
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
reply other threads:[~2024-02-18 13:00 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=202402182009.OWMy4ndK-lkp@intel.com \
--to=lkp@intel.com \
--cc=nm@ti.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=s-vadapalli@ti.com \
--cc=u-kumar1@ti.com \
--cc=vigneshr@ti.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 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.