Content-Type: multipart/mixed; boundary="===============5878258246451545888==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v3 net-next 04/12] net: aquantia: add PTP rings infrastructure Date: Thu, 24 Oct 2019 02:18:49 +0800 Message-ID: <201910240114.dBccbC6D%lkp@intel.com> In-Reply-To: <855844d84a191bc00b9fb847d665f6e16ab131f5.1571737612.git.igor.russkikh@aquantia.com> List-Id: --===============5878258246451545888== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Igor, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Igor-Russkikh/net-aquantia= -PTP-support-for-AQC-devices/20191023-194531 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git = 88652bf8ce4b91c49769a2a49c17dc44b85b4fa2 reproduce: # apt-get install sparse # sparse version: v0.6.1-dirty make ARCH=3Dx86_64 allmodconfig make C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag Reported-by: kbuild test robot sparse warnings: (new ones prefixed by >>) >> drivers/net/ethernet/aquantia/atlantic/aq_ptp.c:258:34: sparse: sparse: = Using plain integer as NULL pointer vim +258 drivers/net/ethernet/aquantia/atlantic/aq_ptp.c 253 = 254 int aq_ptp_ring_alloc(struct aq_nic_s *aq_nic) 255 { 256 struct aq_ptp_s *aq_ptp =3D aq_nic->aq_ptp; 257 unsigned int tx_ring_idx, rx_ring_idx; > 258 struct aq_ring_s *hwts =3D 0; 259 u32 tx_tc_mode, rx_tc_mode; 260 struct aq_ring_s *ring; 261 int err; 262 = 263 if (!aq_ptp) 264 return 0; 265 = 266 /* Index must to be 8 (8 TCs) or 16 (4 TCs). 267 * It depends from Traffic Class mode. 268 */ 269 aq_nic->aq_hw_ops->hw_tx_tc_mode_get(aq_nic->aq_hw, &tx_tc_mode); 270 if (tx_tc_mode =3D=3D 0) 271 tx_ring_idx =3D PTP_8TC_RING_IDX; 272 else 273 tx_ring_idx =3D PTP_4TC_RING_IDX; 274 = 275 ring =3D aq_ring_tx_alloc(&aq_ptp->ptp_tx, aq_nic, 276 tx_ring_idx, &aq_nic->aq_nic_cfg); 277 if (!ring) { 278 err =3D -ENOMEM; 279 goto err_exit; 280 } 281 = 282 aq_nic->aq_hw_ops->hw_rx_tc_mode_get(aq_nic->aq_hw, &rx_tc_mode); 283 if (rx_tc_mode =3D=3D 0) 284 rx_ring_idx =3D PTP_8TC_RING_IDX; 285 else 286 rx_ring_idx =3D PTP_4TC_RING_IDX; 287 = 288 ring =3D aq_ring_rx_alloc(&aq_ptp->ptp_rx, aq_nic, 289 rx_ring_idx, &aq_nic->aq_nic_cfg); 290 if (!ring) { 291 err =3D -ENOMEM; 292 goto err_exit_ptp_tx; 293 } 294 = 295 hwts =3D aq_ring_hwts_rx_alloc(&aq_ptp->hwts_rx, aq_nic, PTP_HWST_R= ING_IDX, 296 aq_nic->aq_nic_cfg.rxds, 297 aq_nic->aq_nic_cfg.aq_hw_caps->rxd_size); 298 if (!hwts) { 299 err =3D -ENOMEM; 300 goto err_exit_ptp_rx; 301 } 302 = 303 err =3D aq_ptp_skb_ring_init(&aq_ptp->skb_ring, aq_nic->aq_nic_cfg.= rxds); 304 if (err !=3D 0) { 305 err =3D -ENOMEM; 306 goto err_exit_hwts_rx; 307 } 308 = 309 return 0; 310 = 311 err_exit_hwts_rx: 312 aq_ring_free(&aq_ptp->hwts_rx); 313 err_exit_ptp_rx: 314 aq_ring_free(&aq_ptp->ptp_rx); 315 err_exit_ptp_tx: 316 aq_ring_free(&aq_ptp->ptp_tx); 317 err_exit: 318 return err; 319 } 320 = --- 0-DAY kernel test infrastructure Open Source Technology Cent= er https://lists.01.org/pipermail/kbuild-all Intel Corporati= on --===============5878258246451545888==--