From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE71A29B22D for ; Wed, 25 Jun 2025 09:18:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750843103; cv=none; b=U4Xh276xbWPzQuOgttYqX0zsMomhnGDseFVwEgoZ9VlJKpXaKhZcnTSBmf4vg5Zdypm+BCA9ZaUIDkXHfbBMm5j2X1G9IM0ZI/fFv9F1fvSlVeShJsoOaI/ykzjqpW4SsYzu/qcNDxWXr8vyHwSIvBhF+uym10Z3Kjk4ihlUSWk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750843103; c=relaxed/simple; bh=t4E/+UT8fmI9fR5q5fWeoyUhS4+biJF4voTPqNOEia0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Fc6ErvtaSKvEXE9LBYcoYyydud8cxOmDby0HcfKJlubmyv15JUCa8CCNU5o0JLYIXGoIYApx2n0dgrDIs7YNOI8qT+qzuOh0yp2jeiXj4hnN3fDmyyi6lvsabO93pHvmnqcdq6rBjOhEU+Urs6IulPe1eugP0bnh0kCj/5QYIlk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=T8nYTZ2O; arc=none smtp.client-ip=198.175.65.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="T8nYTZ2O" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1750843100; x=1782379100; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=t4E/+UT8fmI9fR5q5fWeoyUhS4+biJF4voTPqNOEia0=; b=T8nYTZ2OtmDDWiys+1XlzItMIsMXFMbfA+VL9SN6C/RgFT+/CdkfO+C6 Kp8v51eh9INMs32y71jlspqEqCtIbhG94uazAHBaeIPiFYKoNW6rq4rHN qb9n+0sxhw268L9h7rnkCcA7T1l+jMJfMqevM0MpTqvsL55zO/XlM3BLj SCDrGM0L1P877BkO7ns91z3VoDIn3/lBycTaUOjr6470XCgtrhNJiL/ym wUG23RHSXCaBWwZEHYvh3+hKnocp/4se2EgzDe1QxP60eMMumo/F1Y86d ZpUHVkGqYSs9f7Qr2ht7UtHs9A1BFLpzAa9AmynENrno4JvsBASyH5y/H g==; X-CSE-ConnectionGUID: te7CbClhR3CNAOnjKV95SA== X-CSE-MsgGUID: 53+wp7BxQUOa7J7V1VH0DA== X-IronPort-AV: E=McAfee;i="6800,10657,11474"; a="53072785" X-IronPort-AV: E=Sophos;i="6.16,264,1744095600"; d="scan'208";a="53072785" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2025 02:18:19 -0700 X-CSE-ConnectionGUID: Pu8/GqJxQ9Wf4jSmGYdK6Q== X-CSE-MsgGUID: yJ8Gcn95QCiXtZkX+gKVcw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,264,1744095600"; d="scan'208";a="157934397" Received: from lkp-server01.sh.intel.com (HELO e8142ee1dce2) ([10.239.97.150]) by orviesa005.jf.intel.com with ESMTP; 25 Jun 2025 02:18:15 -0700 Received: from kbuild by e8142ee1dce2 with local (Exim 4.96) (envelope-from ) id 1uUMGj-000SwA-29; Wed, 25 Jun 2025 09:18:13 +0000 Date: Wed, 25 Jun 2025 17:17:47 +0800 From: kernel test robot To: Vikas Gupta , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org Cc: oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, michael.chan@broadcom.com, pavan.chebbi@broadcom.com, vsrama-krishna.nemani@broadcom.com, Vikas Gupta , Bhargava Chenna Marreddy , Rajashekar Hudumula Subject: Re: [net-next, 08/10] bng_en: Add irq allocation support Message-ID: <202506251636.aTzmB45K-lkp@intel.com> References: <20250618144743.843815-9-vikas.gupta@broadcom.com> Precedence: bulk X-Mailing-List: oe-kbuild-all@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250618144743.843815-9-vikas.gupta@broadcom.com> Hi Vikas, kernel test robot noticed the following build warnings: [auto build test WARNING on linus/master] [also build test WARNING on v6.16-rc3 next-20250624] [cannot apply to horms-ipvs/master] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Vikas-Gupta/bng_en-Add-PCI-interface/20250618-173130 base: linus/master patch link: https://lore.kernel.org/r/20250618144743.843815-9-vikas.gupta%40broadcom.com patch subject: [net-next, 08/10] bng_en: Add irq allocation support config: parisc-randconfig-r073-20250619 (https://download.01.org/0day-ci/archive/20250625/202506251636.aTzmB45K-lkp@intel.com/config) compiler: hppa-linux-gcc (GCC) 8.5.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 | Closes: https://lore.kernel.org/oe-kbuild-all/202506251636.aTzmB45K-lkp@intel.com/ smatch warnings: drivers/net/ethernet/broadcom/bnge/bnge_resc.c:347 bnge_alloc_irqs() warn: unsigned 'irqs_demand' is never less than zero. vim +/irqs_demand +347 drivers/net/ethernet/broadcom/bnge/bnge_resc.c 329 330 int bnge_alloc_irqs(struct bnge_dev *bd) 331 { 332 u16 aux_msix, tx_cp, num_entries; 333 u16 irqs_demand, max, min = 1; 334 int i, rc = 0; 335 336 irqs_demand = bnge_nqs_demand(bd); 337 max = bnge_get_max_func_irqs(bd); 338 if (irqs_demand > max) 339 irqs_demand = max; 340 341 if (!(bd->flags & BNGE_EN_SHARED_CHNL)) 342 min = 2; 343 344 irqs_demand = pci_alloc_irq_vectors(bd->pdev, min, irqs_demand, 345 PCI_IRQ_MSIX); 346 aux_msix = bnge_aux_get_msix(bd); > 347 if (irqs_demand < 0 || irqs_demand < aux_msix) { 348 rc = -ENODEV; 349 goto err_free_irqs; 350 } 351 352 num_entries = irqs_demand; 353 if (pci_msix_can_alloc_dyn(bd->pdev)) 354 num_entries = max; 355 bd->irq_tbl = kcalloc(num_entries, sizeof(*bd->irq_tbl), GFP_KERNEL); 356 if (!bd->irq_tbl) { 357 rc = -ENOMEM; 358 goto err_free_irqs; 359 } 360 361 for (i = 0; i < irqs_demand; i++) 362 bd->irq_tbl[i].vector = pci_irq_vector(bd->pdev, i); 363 364 bd->irqs_acquired = irqs_demand; 365 /* Reduce rings based upon num of vectors allocated. 366 * We dont need to consider NQs as they have been calculated 367 * and must be more than irqs_demand. 368 */ 369 rc = bnge_adjust_rings(bd, &bd->rx_nr_rings, 370 &bd->tx_nr_rings, 371 irqs_demand - aux_msix, min == 1); 372 if (rc) 373 goto err_free_irqs; 374 375 tx_cp = bnge_num_tx_to_cp(bd, bd->tx_nr_rings); 376 bd->nq_nr_rings = (min == 1) ? 377 max_t(u16, tx_cp, bd->rx_nr_rings) : 378 tx_cp + bd->rx_nr_rings; 379 380 /* Readjust tx_nr_rings_per_tc */ 381 if (!bd->num_tc) 382 bd->tx_nr_rings_per_tc = bd->tx_nr_rings; 383 384 return 0; 385 386 err_free_irqs: 387 dev_err(bd->dev, "Failed to allocate IRQs err = %d\n", rc); 388 bnge_free_irqs(bd); 389 return rc; 390 } 391 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki