Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp4050802rdg; Wed, 18 Oct 2023 13:29:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGiqRQZe3pYfY4fJRzmNmTDsWeZEyYK59UJCpGr8NPn0eoKLJYACIVqDAYEqqYzZwFD0P6M X-Received: by 2002:a17:903:41c7:b0:1c5:efd1:82b6 with SMTP id u7-20020a17090341c700b001c5efd182b6mr398533ple.30.1697660946389; Wed, 18 Oct 2023 13:29:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697660946; cv=none; d=google.com; s=arc-20160816; b=ZmKO/VCx7s/UgPtrU2VKNjwpTPEBJTjxn/jRVf3jk8f6rV2xC0LWvIqfSO3jB0+f5J 7Ky0NN3IW/p+ijqSY8UXVSLIPQlurG+jpUQsr40T9c02kaEyMmnGaUS7SU3cKdKE+hv8 16FkZkjPTinEbIN+3N+0AcxUvZLKUxVvVld1lfdL6SUHxBlgmxbWdoFC/voYERGVG7o8 Qa4iFBpbwyJEi2RVKyu63MTHUOkb2qIHr6DmDRjcmM/01SSsbdlDp804seBwY69MyqYX UvTx4w5cOIVI+rv2jKLwnJRO/q+6sn2ahMS4jC6FEJepY6IY5LOO1Bp8WkkPJFKaXDbz JPnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=+3U0tNPObUJgOIq5/C1WylJmcanFzwy2yoGYFXMmV6M=; fh=u+HjDzgWp3RXbaaU9Air5eKubaTSKAT8+Wp/F+w48kw=; b=Jat5grg98YxSyzXIZFElG/o6dlc+QJcipuZmWQ+VjogevajTBK8pAuBcMBjz20gyGa zgxSrJxFuhZDItue9EdfeI26ZuJ9cj5Btc2ShXdSgJB2uaonWqCoPHQfHMqiwCJxCYX2 1bfM1df00inDxuXMUyplB5kbDBfSsBtwDPD3Q4Xn3VPqYQeiDqbvupXNxZraJGhFo7Yg dxCMsiYFYgSxTW88Xw9eI+8l/0VR+tLErcQ1vPOIYlGLUe7gvsWJLtkWThn+XEKqD+Xs pLVe2l9CyIOniSFFN0aIgKfEGtiZpg9KJr9hd9IN2PREcossdmtWKfftMeKUCN6RYB9J cJxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VwaUx04E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id n10-20020a170902d2ca00b001ca4ad8635fsi642069plc.447.2023.10.18.13.28.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 13:29:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VwaUx04E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 7054080DB718; Wed, 18 Oct 2023 13:28:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231733AbjJRU1g (ORCPT + 99 others); Wed, 18 Oct 2023 16:27:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231878AbjJRU11 (ORCPT ); Wed, 18 Oct 2023 16:27:27 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5B2B128; Wed, 18 Oct 2023 13:27:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697660839; x=1729196839; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=CsuZBVe6nLM4gTY+G+OiL/gsz1yR77tALEMvpNtZZDw=; b=VwaUx04E8OcZC/68XpS8VAuLaK6BMVuusbD+6v4vsQ0Y+MDyw3clkIBM 7O7oYW0OeS3olTSQuuAq79VXXqaP/fQ0CwJufikPYsDKJXTNqhH+Ra7EN 2uZaapRNfuGA02Dra+v0iQPVYV1EzEF2vc0R5ACNXO2mK2wI0pbpprzJU KG4XvSKnHZ+25G/5TF/sq0Crrop+9nh/O1B3nc75vdJEel5RjQKs+GC9E NBFrIz57zg78mHsow/4ca9hXp9Sf8ca0leIUU4M9Jfb7yGHYGY21qhVMd rStXDcLhxQO9BqZirQBboT/RyjGX+d/b2Llyv9ZOhIcsy9tfGhIFJ0mvU g==; X-IronPort-AV: E=McAfee;i="6600,9927,10867"; a="366352903" X-IronPort-AV: E=Sophos;i="6.03,235,1694761200"; d="scan'208";a="366352903" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2023 13:27:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,235,1694761200"; d="scan'208";a="4691269" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by fmviesa001.fm.intel.com with ESMTP; 18 Oct 2023 13:27:16 -0700 Received: from pkitszel-desk.intel.com (unknown [10.255.194.180]) by irvmail002.ir.intel.com (Postfix) with ESMTP id 6A763332CA; Wed, 18 Oct 2023 21:27:03 +0100 (IST) From: Przemek Kitszel To: Jiri Pirko , netdev@vger.kernel.org, "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shannon Nelson , Michael Chan , Cai Huoqing , George Cherian , Danielle Ratson , Moshe Shemesh , Saeed Mahameed , Ariel Elior , Manish Chopra , Igor Russkikh , Coiby Xu , Simon Horman Cc: Brett Creeley , Sunil Goutham , Linu Cherian , Geetha sowjanya , Jerin Jacob , hariprasad , Subbaraya Sundeep , Ido Schimmel , Petr Machata , Eran Ben Elisha , Aya Levin , Leon Romanovsky , linux-kernel@vger.kernel.org, Benjamin Poirier , Przemek Kitszel Subject: [PATCH net-next v3 00/11] devlink: retain error in struct devlink_fmsg Date: Wed, 18 Oct 2023 22:26:36 +0200 Message-Id: <20231018202647.44769-1-przemyslaw.kitszel@intel.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 18 Oct 2023 13:28:39 -0700 (PDT) Extend devlink fmsg to retain error (patch 1), so drivers could omit error checks after devlink_fmsg_*() (patches 2-10), and finally enforce future uses to follow this practice by change to return void (patch 11) Note that it was compile tested only. bloat-o-meter for whole series: add/remove: 8/18 grow/shrink: 23/40 up/down: 2017/-5833 (-3816) changelog: v3: set err to correct value, thanks to Simon and smatch (mlx5 patch, final patch); v2: extend series by two more drivers (qed, qlge); add final cleanup patch, since now whole series should be merged in one part (thanks Jiri for encouragement here); v1: https://lore.kernel.org/netdev/20231010104318.3571791-3-przemyslaw.kitszel@intel.com v2: https://lore.kernel.org/netdev/20231017105341.415466-1-przemyslaw.kitszel@intel.com Przemek Kitszel (11): devlink: retain error in struct devlink_fmsg netdevsim: devlink health: use retained error fmsg API pds_core: devlink health: use retained error fmsg API bnxt_en: devlink health: use retained error fmsg API hinic: devlink health: use retained error fmsg API octeontx2-af: devlink health: use retained error fmsg API mlxsw: core: devlink health: use retained error fmsg API net/mlx5: devlink health: use retained error fmsg API qed: devlink health: use retained error fmsg API staging: qlge: devlink health: use retained error fmsg API devlink: convert most of devlink_fmsg_*() to return void drivers/net/ethernet/amd/pds_core/devlink.c | 29 +- .../net/ethernet/broadcom/bnxt/bnxt_devlink.c | 93 ++-- .../net/ethernet/huawei/hinic/hinic_devlink.c | 217 +++----- .../marvell/octeontx2/af/rvu_devlink.c | 464 +++++------------- .../mellanox/mlx5/core/diag/fw_tracer.c | 49 +- .../mellanox/mlx5/core/diag/reporter_vnic.c | 118 ++--- .../mellanox/mlx5/core/diag/reporter_vnic.h | 6 +- .../ethernet/mellanox/mlx5/core/en/health.c | 187 ++----- .../ethernet/mellanox/mlx5/core/en/health.h | 14 +- .../mellanox/mlx5/core/en/reporter_rx.c | 426 ++++------------ .../mellanox/mlx5/core/en/reporter_tx.c | 346 ++++--------- .../net/ethernet/mellanox/mlx5/core/en_rep.c | 5 +- .../net/ethernet/mellanox/mlx5/core/health.c | 127 ++--- drivers/net/ethernet/mellanox/mlxsw/core.c | 171 ++----- drivers/net/ethernet/qlogic/qed/qed_devlink.c | 6 +- drivers/net/netdevsim/health.c | 118 ++--- drivers/staging/qlge/qlge_devlink.c | 60 +-- include/net/devlink.h | 60 +-- net/devlink/health.c | 387 +++++---------- 19 files changed, 823 insertions(+), 2060 deletions(-) -- 2.38.1