From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (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 A2404EC4; Thu, 13 Feb 2025 05:46:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739425600; cv=none; b=WcJnzEc9oDyuN1HHR099Gw7n8ykCQ63AXExm1iDUAY6kz4ompL/rJycGBnk6MJt4Z1tJMfL5tkeOQcGmZ9N7A/gqKGALlcm1E1xT7Hbzy1W95+xr59CQRwLPvQ4Bx1pPTo7IV7E9vtm4OvoqLhiyktKyU4wHXX8o2WTVqHeeew8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739425600; c=relaxed/simple; bh=XpQbPKI9igVHpQ1tZ0XhK2uclZOpgu9lc0//4ojmblA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mEsQqZs4w1ANGn7xOhsOQqCvKYuZ4QifH2gOBDfEAUk7mb+M8gQ6cAILszdAcecYa7L4ZGhShBFijHIoGTzbV6ZWkBtfantqD8cp0Jf4yApwhzcxLvjZPLBqjsjmfaWgEMYEzUqnP87uBRJKTBY9v7SMYYVTjM2wuPAVR4HxYC4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=HVUc8Ial; arc=none smtp.client-ip=192.198.163.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="HVUc8Ial" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1739425599; x=1770961599; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=XpQbPKI9igVHpQ1tZ0XhK2uclZOpgu9lc0//4ojmblA=; b=HVUc8IalV33nO9hp3Dza/O8tQUBeFP3NzaMaY3fx0ko6hO8DDgXVQVCp fTkieZciUfQV4xhXTK3dxbc4YCafJL5UKhjVjv5TXFrtnWpIXrRU+Pu2d oTrDkmzTgqh+e5999LmnVYYHJHiiTlHNf73cTw2PQlKbVvP5BN7zESfa9 J8JOlS01v4e3BExn6hh1Jpbv8YI/i1fLFD05Mwp6+AVN6+73SdTx5rS2J CyrLzwdn1GEyquYkpBPLMAT+ri26hGlIJNeYqVw7BnC0amZiu8MyEXZ2n Y59YYs5inp3hRHQR2Y5PiwTPoxq2SPCggqU5T/FR8wk+0UE9qOFbA0FGS g==; X-CSE-ConnectionGUID: mP3QPefVRt+cgIKbHNzYgA== X-CSE-MsgGUID: 3XnfgGWXT7qaA46VLtfgqg== X-IronPort-AV: E=McAfee;i="6700,10204,11343"; a="50759320" X-IronPort-AV: E=Sophos;i="6.13,282,1732608000"; d="scan'208";a="50759320" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2025 21:46:38 -0800 X-CSE-ConnectionGUID: Ehqxx3epQAqWCOvT9B475Q== X-CSE-MsgGUID: +1XcehPlTYSICABEwY7chg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,282,1732608000"; d="scan'208";a="113565134" Received: from mev-dev.igk.intel.com ([10.237.112.144]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2025 21:46:34 -0800 Date: Thu, 13 Feb 2025 06:43:02 +0100 From: Michal Swiatkowski To: Dan Carpenter Cc: Jakub Kicinski , Alexander Lobakin , Michal Swiatkowski , Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni , Jacob Keller , Wojciech Drewek , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH next] ice: Fix signedness bug in ice_init_interrupt_scheme() Message-ID: References: <14ebc311-6fd6-4b0b-b314-8347c4efd9fc@stanley.mountain> <20250212175901.11199ce1@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Feb 13, 2025 at 08:26:09AM +0300, Dan Carpenter wrote: > On Wed, Feb 12, 2025 at 05:59:01PM -0800, Jakub Kicinski wrote: > > On Wed, 12 Feb 2025 17:46:54 +0100 Alexander Lobakin wrote: > > > > [PATCH next] ice: Fix signedness bug in ice_init_interrupt_scheme() > > > > > > I believe it should be "PATCH net" with > > > > > > > If pci_alloc_irq_vectors() can't allocate the minimum number of vectors > > > > then it returns -ENOSPC so there is no need to check for that in the > > > > caller. In fact, because pf->msix.min is an unsigned int, it means that > > > > any negative error codes are type promoted to high positive values and > > > > treated as success. So here the "return -ENOMEM;" is unreachable code. > > > > Check for negatives instead. > > > > > > > > Fixes: 79d97b8cf9a8 ("ice: remove splitting MSI-X between features") > > > > > > a 'Stable:' tag here. > > > > Bug only exists in net-next if it comes from commit under Fixes. > > So I think the patch is good as is. > > I want to resen this. My scripts should have put a net-next in the > subject and I think that changing: > > - return -ENOMEM; > + return vectors; > > actually does fall within the scope of the patch so I want to change > that as well. There is no point in really breaking that into a separate > patch from a practical perspective. Thanks for fixing, I blindly followed scheme from idpf (there is the same issue). However in ice it was done correctly before my patch. Reviewed-by: Michal Swiatkowski > > regards, > dan carpenter