From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 238DF241E2 for ; Wed, 3 Apr 2024 12:38:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712147885; cv=none; b=OBK2Qul2iWpxZldaKfOmCLyQa8Y7X0Rp8lWSW5AXs3uZQ4aO4i8W9UEV7JuQ5rREAgby4tApIFHTt7cpWsJE6SO4N/n97q5UuGwkCFKvFdM3HQD/C03fXKANdbqT4YFntRkstdOwEbaFBnAsuEb4dNJ2MygxqMKO2xP7+Hj6tGc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712147885; c=relaxed/simple; bh=Xnf3gUNjuvfe9rYNNLhsBuw4H63NEbjz9TIrlyZ63xI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=i+BEXjPVT8WNGHUQ3ka1elVg2yZgfVr94VDjQaPpUgoSDdLc0ACDjmh/sB1P/aGal5dSjHjvtpNndtimiR/MvAuMWldUFxi68TPZbF97qccphoqObAnedN74fVmch8oH8iZ9LQgno0z0ahYy7xMVsCs6oSTBJV2sQVrnAz7U76c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hIXQx/6z; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hIXQx/6z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5C4AC433F1; Wed, 3 Apr 2024 12:38:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712147884; bh=Xnf3gUNjuvfe9rYNNLhsBuw4H63NEbjz9TIrlyZ63xI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hIXQx/6zVA76/3Y/C8JCkEr+nwRraJ3XxHCw2gPwAMoRzc1qGL4il4WZIlJ/JpEvx ILp91I8gKUWU4IpPNWNpxYCWXgLlL692vrCfXtBM/XRyZwBKAw1f9wlunGUsrpGRD8 LiHP6wvyTaTJV1fPtnrcd76xkO3XNfROU68dgwJeFRh+1QyeSEEo+wCSMHAW8Fyata 11y5Yn7JwQPtd5lNnT9qFC1eXW9l/t+D7jQjEAaWXPyhv9jD7ddFH1uisp2XiUHNOe y7VioIDS1RDDatnr3ZIkd95GuAIGXLXQ0Bcx7gq4LBRogIZYm9s3rxfz30orLJNdVd zpJ4LKpuupHig== Date: Wed, 3 Apr 2024 13:38:00 +0100 From: Simon Horman To: Petr Machata Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, Ido Schimmel , Amit Cohen , mlxsw@nvidia.com Subject: Re: [PATCH net-next 05/15] mlxsw: pci: Remove unused counters Message-ID: <20240403123800.GA26556@kernel.org> References: Precedence: bulk X-Mailing-List: netdev@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 Tue, Apr 02, 2024 at 03:54:18PM +0200, Petr Machata wrote: > From: Amit Cohen > > The structure 'mlxsw_pci_queue' stores several counters which were consumed > via debugfs. Since commit 9a32562becd9 ("mlxsw: Remove debugfs interface"), > these counters are not used. Remove them. This makes the 'union u' and > 'struct eq' redundant. Maintain 'struct cq' as it will be extended later. > > Replace increasing 'q->u.eq.ev_other_count' with WARN_ON_ONCE(), as it is > used in an unreasonable case of receiving event in EQ which is not EQ0 or > EQ1. When the queues are initialized, we check number of event queues and > fail with the print "Unsupported number of queues" in case that the driver > tries to initialize more than two queues. > > Signed-off-by: Amit Cohen > Reviewed-by: Ido Schimmel > Signed-off-by: Petr Machata Reviewed-by: Simon Horman