From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Geetha sowjanya <gakula@marvell.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev, kuba@kernel.org,
davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com,
hkelam@marvell.com
Subject: Re: [net-next PATCH 2/9] octeontx2-pf: RVU representor driver
Date: Wed, 17 Apr 2024 16:37:56 +0300 [thread overview]
Message-ID: <546b7783-78ec-4fec-b338-f1980a5871d0@moroto.mountain> (raw)
In-Reply-To: <20240416050616.6056-3-gakula@marvell.com>
Hi Geetha,
kernel test robot noticed the following build warnings:
url: https://github.com/intel-lab-lkp/linux/commits/Geetha-sowjanya/octeontx2-pf-Refactoring-RVU-driver/20240416-131052
base: net-next/main
patch link: https://lore.kernel.org/r/20240416050616.6056-3-gakula%40marvell.com
patch subject: [net-next PATCH 2/9] octeontx2-pf: RVU representor driver
config: alpha-randconfig-r081-20240417 (https://download.01.org/0day-ci/archive/20240417/202404172056.MpOMwcGB-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
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>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202404172056.MpOMwcGB-lkp@intel.com/
New smatch warnings:
drivers/net/ethernet/marvell/octeontx2/nic/rep.c:95 rvu_get_rep_cnt() warn: passing zero to 'PTR_ERR'
drivers/net/ethernet/marvell/octeontx2/nic/rep.c:140 rvu_rep_probe() warn: missing unwind goto?
vim +/PTR_ERR +95 drivers/net/ethernet/marvell/octeontx2/nic/rep.c
1e15129a77b419 Geetha sowjanya 2024-04-16 76 static int rvu_get_rep_cnt(struct otx2_nic *priv)
1e15129a77b419 Geetha sowjanya 2024-04-16 77 {
1e15129a77b419 Geetha sowjanya 2024-04-16 78 struct get_rep_cnt_rsp *rsp;
1e15129a77b419 Geetha sowjanya 2024-04-16 79 struct mbox_msghdr *msghdr;
1e15129a77b419 Geetha sowjanya 2024-04-16 80 struct msg_req *req;
1e15129a77b419 Geetha sowjanya 2024-04-16 81 int err, rep;
1e15129a77b419 Geetha sowjanya 2024-04-16 82
1e15129a77b419 Geetha sowjanya 2024-04-16 83 mutex_lock(&priv->mbox.lock);
1e15129a77b419 Geetha sowjanya 2024-04-16 84 req = otx2_mbox_alloc_msg_get_rep_cnt(&priv->mbox);
1e15129a77b419 Geetha sowjanya 2024-04-16 85 if (!req) {
1e15129a77b419 Geetha sowjanya 2024-04-16 86 mutex_unlock(&priv->mbox.lock);
1e15129a77b419 Geetha sowjanya 2024-04-16 87 return -ENOMEM;
1e15129a77b419 Geetha sowjanya 2024-04-16 88 }
1e15129a77b419 Geetha sowjanya 2024-04-16 89 err = otx2_sync_mbox_msg(&priv->mbox);
1e15129a77b419 Geetha sowjanya 2024-04-16 90 if (err)
1e15129a77b419 Geetha sowjanya 2024-04-16 91 goto exit;
1e15129a77b419 Geetha sowjanya 2024-04-16 92
1e15129a77b419 Geetha sowjanya 2024-04-16 93 msghdr = otx2_mbox_get_rsp(&priv->mbox.mbox, 0, &req->hdr);
1e15129a77b419 Geetha sowjanya 2024-04-16 94 if (IS_ERR(msghdr)) {
1e15129a77b419 Geetha sowjanya 2024-04-16 @95 err = PTR_ERR(rsp);
^^^
s/rsp/msghdr/
1e15129a77b419 Geetha sowjanya 2024-04-16 96 goto exit;
1e15129a77b419 Geetha sowjanya 2024-04-16 97 }
1e15129a77b419 Geetha sowjanya 2024-04-16 98
1e15129a77b419 Geetha sowjanya 2024-04-16 99 rsp = (struct get_rep_cnt_rsp *)msghdr;
1e15129a77b419 Geetha sowjanya 2024-04-16 100 priv->hw.tx_queues = rsp->rep_cnt;
1e15129a77b419 Geetha sowjanya 2024-04-16 101 priv->hw.rx_queues = rsp->rep_cnt;
1e15129a77b419 Geetha sowjanya 2024-04-16 102 priv->rep_cnt = rsp->rep_cnt;
1e15129a77b419 Geetha sowjanya 2024-04-16 103 for (rep = 0; rep < priv->rep_cnt; rep++)
1e15129a77b419 Geetha sowjanya 2024-04-16 104 priv->rep_pf_map[rep] = rsp->rep_pf_map[rep];
1e15129a77b419 Geetha sowjanya 2024-04-16 105
1e15129a77b419 Geetha sowjanya 2024-04-16 106 exit:
1e15129a77b419 Geetha sowjanya 2024-04-16 107 mutex_unlock(&priv->mbox.lock);
1e15129a77b419 Geetha sowjanya 2024-04-16 108 return err;
1e15129a77b419 Geetha sowjanya 2024-04-16 109 }
1e15129a77b419 Geetha sowjanya 2024-04-16 110
1e15129a77b419 Geetha sowjanya 2024-04-16 111 static int rvu_rep_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1e15129a77b419 Geetha sowjanya 2024-04-16 112 {
1e15129a77b419 Geetha sowjanya 2024-04-16 113 struct device *dev = &pdev->dev;
1e15129a77b419 Geetha sowjanya 2024-04-16 114 struct otx2_nic *priv;
1e15129a77b419 Geetha sowjanya 2024-04-16 115 struct otx2_hw *hw;
1e15129a77b419 Geetha sowjanya 2024-04-16 116 int err;
1e15129a77b419 Geetha sowjanya 2024-04-16 117
1e15129a77b419 Geetha sowjanya 2024-04-16 118 err = pcim_enable_device(pdev);
1e15129a77b419 Geetha sowjanya 2024-04-16 119 if (err) {
1e15129a77b419 Geetha sowjanya 2024-04-16 120 dev_err(dev, "Failed to enable PCI device\n");
1e15129a77b419 Geetha sowjanya 2024-04-16 121 return err;
1e15129a77b419 Geetha sowjanya 2024-04-16 122 }
1e15129a77b419 Geetha sowjanya 2024-04-16 123
1e15129a77b419 Geetha sowjanya 2024-04-16 124 err = pci_request_regions(pdev, DRV_NAME);
1e15129a77b419 Geetha sowjanya 2024-04-16 125 if (err) {
1e15129a77b419 Geetha sowjanya 2024-04-16 126 dev_err(dev, "PCI request regions failed 0x%x\n", err);
1e15129a77b419 Geetha sowjanya 2024-04-16 127 return err;
1e15129a77b419 Geetha sowjanya 2024-04-16 128 }
1e15129a77b419 Geetha sowjanya 2024-04-16 129
1e15129a77b419 Geetha sowjanya 2024-04-16 130 err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(48));
1e15129a77b419 Geetha sowjanya 2024-04-16 131 if (err) {
1e15129a77b419 Geetha sowjanya 2024-04-16 132 dev_err(dev, "DMA mask config failed, abort\n");
1e15129a77b419 Geetha sowjanya 2024-04-16 133 goto err_release_regions;
1e15129a77b419 Geetha sowjanya 2024-04-16 134 }
1e15129a77b419 Geetha sowjanya 2024-04-16 135
1e15129a77b419 Geetha sowjanya 2024-04-16 136 pci_set_master(pdev);
1e15129a77b419 Geetha sowjanya 2024-04-16 137
1e15129a77b419 Geetha sowjanya 2024-04-16 138 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
1e15129a77b419 Geetha sowjanya 2024-04-16 139 if (!priv)
1e15129a77b419 Geetha sowjanya 2024-04-16 @140 return -ENOMEM;
goto err_release_regions.
1e15129a77b419 Geetha sowjanya 2024-04-16 141 pci_set_drvdata(pdev, priv);
1e15129a77b419 Geetha sowjanya 2024-04-16 142 priv->pdev = pdev;
1e15129a77b419 Geetha sowjanya 2024-04-16 143 priv->dev = dev;
1e15129a77b419 Geetha sowjanya 2024-04-16 144 priv->flags |= OTX2_FLAG_INTF_DOWN;
1e15129a77b419 Geetha sowjanya 2024-04-16 145 priv->flags |= OTX2_FLAG_REP_MODE_ENABLED;
1e15129a77b419 Geetha sowjanya 2024-04-16 146
1e15129a77b419 Geetha sowjanya 2024-04-16 147 hw = &priv->hw;
1e15129a77b419 Geetha sowjanya 2024-04-16 148 hw->pdev = pdev;
1e15129a77b419 Geetha sowjanya 2024-04-16 149 hw->max_queues = OTX2_MAX_CQ_CNT;
1e15129a77b419 Geetha sowjanya 2024-04-16 150 hw->rbuf_len = OTX2_DEFAULT_RBUF_LEN;
1e15129a77b419 Geetha sowjanya 2024-04-16 151 hw->xqe_size = 128;
1e15129a77b419 Geetha sowjanya 2024-04-16 152
1e15129a77b419 Geetha sowjanya 2024-04-16 153 err = otx2_init_rsrc(pdev, priv);
1e15129a77b419 Geetha sowjanya 2024-04-16 154 if (err)
1e15129a77b419 Geetha sowjanya 2024-04-16 155 goto err_release_regions;
1e15129a77b419 Geetha sowjanya 2024-04-16 156
1e15129a77b419 Geetha sowjanya 2024-04-16 157 err = rvu_get_rep_cnt(priv);
1e15129a77b419 Geetha sowjanya 2024-04-16 158 if (err)
1e15129a77b419 Geetha sowjanya 2024-04-16 159 goto err_detach_rsrc;
1e15129a77b419 Geetha sowjanya 2024-04-16 160
1e15129a77b419 Geetha sowjanya 2024-04-16 161 err = rvu_rep_rsrc_init(priv);
1e15129a77b419 Geetha sowjanya 2024-04-16 162 if (err)
1e15129a77b419 Geetha sowjanya 2024-04-16 163 goto err_detach_rsrc;
1e15129a77b419 Geetha sowjanya 2024-04-16 164
1e15129a77b419 Geetha sowjanya 2024-04-16 165 return 0;
1e15129a77b419 Geetha sowjanya 2024-04-16 166
1e15129a77b419 Geetha sowjanya 2024-04-16 167 err_detach_rsrc:
1e15129a77b419 Geetha sowjanya 2024-04-16 168 if (priv->hw.lmt_info)
1e15129a77b419 Geetha sowjanya 2024-04-16 169 free_percpu(priv->hw.lmt_info);
1e15129a77b419 Geetha sowjanya 2024-04-16 170 if (test_bit(CN10K_LMTST, &priv->hw.cap_flag))
1e15129a77b419 Geetha sowjanya 2024-04-16 171 qmem_free(priv->dev, priv->dync_lmt);
1e15129a77b419 Geetha sowjanya 2024-04-16 172 otx2_detach_resources(&priv->mbox);
1e15129a77b419 Geetha sowjanya 2024-04-16 173 otx2_disable_mbox_intr(priv);
1e15129a77b419 Geetha sowjanya 2024-04-16 174 otx2_pfaf_mbox_destroy(priv);
1e15129a77b419 Geetha sowjanya 2024-04-16 175 pci_free_irq_vectors(pdev);
1e15129a77b419 Geetha sowjanya 2024-04-16 176 err_release_regions:
1e15129a77b419 Geetha sowjanya 2024-04-16 177 pci_set_drvdata(pdev, NULL);
1e15129a77b419 Geetha sowjanya 2024-04-16 178 pci_release_regions(pdev);
1e15129a77b419 Geetha sowjanya 2024-04-16 179 return err;
1e15129a77b419 Geetha sowjanya 2024-04-16 180 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-04-17 13:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-16 5:06 [net-next PATCH 0/9] Introduce RVU representors Geetha sowjanya
2024-04-16 5:06 ` [net-next PATCH 1/9] octeontx2-pf: Refactoring RVU driver Geetha sowjanya
2024-04-16 5:06 ` [net-next PATCH 2/9] octeontx2-pf: RVU representor driver Geetha sowjanya
2024-04-16 16:17 ` Kalesh Anakkur Purayil
2024-04-17 13:37 ` Dan Carpenter [this message]
2024-04-17 13:45 ` [EXTERNAL] " Geethasowjanya Akula
2024-04-17 16:22 ` kernel test robot
2024-04-16 5:06 ` [net-next PATCH 3/9] octeontx2-pf: Create representor netdev Geetha sowjanya
2024-04-17 0:31 ` kernel test robot
2024-04-17 1:24 ` kernel test robot
2024-04-17 4:28 ` Kalesh Anakkur Purayil
2024-04-17 13:43 ` [EXTERNAL] " Geethasowjanya Akula
2024-04-17 15:24 ` Dan Carpenter
2024-04-17 15:36 ` Dan Carpenter
2024-04-16 5:06 ` [net-next PATCH 4/9] octeontx2-pf: Add basic net_device_ops Geetha sowjanya
2024-04-16 5:06 ` [net-next PATCH 5/9] octeontx2-af: Add packet path between representor and VF Geetha sowjanya
2024-04-17 4:10 ` Kalesh Anakkur Purayil
2024-04-17 4:15 ` Kalesh Anakkur Purayil
2024-04-17 13:48 ` [EXTERNAL] " Geethasowjanya Akula
2024-04-17 18:08 ` Dan Carpenter
2024-04-16 5:06 ` [net-next PATCH 6/9] octeontx2-pf: Get VF stats via representor Geetha sowjanya
2024-04-16 5:06 ` [net-next PATCH 7/9] octeontx2-pf: Add support to sync link state between representor and VFs Geetha sowjanya
2024-04-16 5:06 ` [net-next PATCH 8/9] octeontx2-pf: Configure VF mtu via representor Geetha sowjanya
2024-04-16 5:06 ` [net-next PATCH 9/9] octeontx2-pf: Add representors for sdp MAC Geetha sowjanya
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=546b7783-78ec-4fec-b338-f1980a5871d0@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox