From patchwork Fri Mar 27 08:55:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 1262618 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=idosch.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm2 header.b=vGuljl77; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 48pbMD5VBBz9sRR for ; Fri, 27 Mar 2020 19:56:56 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726333AbgC0I4z (ORCPT ); Fri, 27 Mar 2020 04:56:55 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:58479 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbgC0I4y (ORCPT ); Fri, 27 Mar 2020 04:56:54 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C39C85C046C; Fri, 27 Mar 2020 04:56:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 27 Mar 2020 04:56:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=1QXAkC gKQzp5MWt/QbUBbtO4C3mfnwqq8yaRNp9064g=; b=vGuljl774FiT21I976ksbo xNhNSgK3rwpRqYu20M2XaXq1tsjzsi8eAd0N9l6nrlvn2UeYSQCXRUwUdzIdYk+H EhToOL6HCIU8VtSMnXMxRdqvQ11dxcEl8DXY7poPJ7Y1/5AtzsD1hZeUZagZmNdG +aeHCD7oA4oiG3irRP+BtlhfDaaHEuDo/OBVlr8ckvh4xuiTD/Aqp2c59LsxGPhj 3FdAi2fu14uaJZUtZ+vY6u1+q8mi4zJGGaeJQNMF4dFqVpaA6abD7T7QqokCibYZ FpFPNT8hN0D0nHfI/roi4WGyyvrXMD4xa6moKN8loG0NRTzal7zBfI4rpCXeZmYw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudehkedgvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofggtgfgsehtkeertd ertdejnecuhfhrohhmpefkughoucfutghhihhmmhgvlhcuoehiughoshgthhesihguohhs tghhrdhorhhgqeenucfkphepjeelrddukedurddufedvrdduledunecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihguohhstghhsehiughoshgt hhdrohhrgh X-ME-Proxy: Received: from splinter.mtl.com (bzq-79-181-132-191.red.bezeqint.net [79.181.132.191]) by mail.messagingengine.com (Postfix) with ESMTPA id 06038306BD54; Fri, 27 Mar 2020 04:56:51 -0400 (EDT) From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, jiri@mellanox.com, kuba@kernel.org, mlxsw@mellanox.com, Ido Schimmel Subject: [PATCH net-next 0/6] mlxsw: Various static checkers fixes Date: Fri, 27 Mar 2020 11:55:19 +0300 Message-Id: <20200327085525.1906170-1-idosch@idosch.org> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ido Schimmel Jakub told me he gets some warnings with W=1, so I decided to check with sparse, smatch and coccinelle as well. This patch set fixes all the issues found. None are actual bugs / regressions and therefore not targeted at net. Patches #1-#2 add missing kernel-doc comments. Patch #3 removes dead code. Patch #4 reworks the ACL code to avoid defining a static variable in a header file. Patch #5 removes unnecessary conversion to bool that coccinelle warns about. Patch #6 avoids false-positive uninitialized symbol errors emitted by smatch. Ido Schimmel (6): mlxsw: i2c: Add missing field documentation mlxsw: spectrum_router: Add proper function documentation mlxsw: spectrum: Remove unused RIF and FID families mlxsw: core_acl: Avoid defining static variable in header file mlxsw: switchx2: Remove unnecessary conversion to bool mlxsw: spectrum_router: Avoid uninitialized symbol errors .../mellanox/mlxsw/core_acl_flex_keys.c | 50 +++++- .../mellanox/mlxsw/core_acl_flex_keys.h | 36 +--- drivers/net/ethernet/mellanox/mlxsw/i2c.c | 1 + .../ethernet/mellanox/mlxsw/spectrum_fid.c | 152 +--------------- .../ethernet/mellanox/mlxsw/spectrum_router.c | 164 ++++++------------ .../net/ethernet/mellanox/mlxsw/switchx2.c | 2 +- 6 files changed, 109 insertions(+), 296 deletions(-)