Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3070829rdg; Tue, 17 Oct 2023 03:54:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH2EHgLYR7rFz98GbE37+GY0fFtRB9LgR6L/6Q2iYGDM47j6vjw/ZCRKMEZbhg6jjqrnvMP X-Received: by 2002:a05:6a20:4306:b0:16b:f6fe:33fe with SMTP id h6-20020a056a20430600b0016bf6fe33femr1784666pzk.1.1697540073532; Tue, 17 Oct 2023 03:54:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697540073; cv=none; d=google.com; s=arc-20160816; b=tqf1RU8WXPvDhRNtbVGjw8yEe4XwB/pf0Ha1KEkiw/17phu84F72PJqMKC7tp3M93E e/ZlVARBsEir6HrrPI0bCnbdaPZAb3wBgyO4USvgkWFUaO4Vn88fi08G/v8JA9f5GbmZ GEgKKHg7YdXpQ453B81BoAkLEN6lu+B1dCCWqesbRFJ0ya8VSnCd/PbaHdYFz7+Cq8pR bfYGPxAimdra919X/gcfKKVQvTQXI5CiLd1LEGlkbSvuCk791XSx/2E7aPSjwf/DU8bS d+yBBUX6tT/2JoBNX1hr3TbmjUqUC6zfhYxbT6wr99iw6uHdiJxp4Ut7Z8EYkiNJ5ifb 8PSQ== 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=sF9vGGXjql4KXacED47Jk4gZX03gLykHUvUvmXIrgbk=; fh=ra8hxhoqIUy+VJmNSvVkWWGIcW9PSd+mVEd/OcQHjSY=; b=kg5aqiAnEoYD7VDmMyC4tE6zDXoJkXLTHKlfPtbNS1Wo2kEFNa3hrUXv5fUvU2shAW /YLmVx7G7iVdsJcMhfH5U2SYi8Mgq1SuJPjUv48MRjZRS/e7tHnQ1hkabrDfUGfJRTAL 1wPZILvWYnSTYFL76eRTtEF+2O+iGBqo+FMdRAzAm9A1LeVANagXLsy/tJOdgTLtvbvU j86r1eDaa0p0RzpI6QX+73CHx/C20paL+TfgcI9R2gxOLWrraptTaNcTd/j9YDfJiSti +6cC+E1X6pSuQSFQUn7rkIc1ZWeqAzd4JSW9erliV60Z2LcT/1uedIEVpk7x7/BAUaL5 l1ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bklKBs9L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id q13-20020a17090311cd00b001c9af06686dsi1496941plh.166.2023.10.17.03.54.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 03:54:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bklKBs9L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 086428039844; Tue, 17 Oct 2023 03:54:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343710AbjJQKyV (ORCPT + 99 others); Tue, 17 Oct 2023 06:54:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234809AbjJQKyT (ORCPT ); Tue, 17 Oct 2023 06:54:19 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A481AA2; Tue, 17 Oct 2023 03:54:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697540058; x=1729076058; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZQE6BpiayELUC26ur600Gzn7596iC7PaPo/DK0fqnrY=; b=bklKBs9LDsMMYdl4AqTDACLdjOn+hSS8OZzVeVPIeeKlsv/Q0pS9kY4G QNBsfwarQYEVkDsPW5swFJiTgKo6gX9SjnRwat0JF+zv3ctYLyPjlr0Gc luXcUlHWJmPK+FnvW7TBW8/NjUw9LgFhqKW9GhDfofX5rZqpwfVCcxO9y kYDf9TVznvdXRjYhLEuNjJhxpZvLFLmUVLkX6TAzDgfIYnXagwtZ2h+9j 3fL01WYPTM+B29emRRu44H6nyPyFZrP+ndHN/ypOAi2ivnvulEefbEkGj XR5IViM5kFdVKTIPvaAP0t2fmTcG2wKaRe/7VkGxrhOIS+7TOCzeUd/ly Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10865"; a="366012584" X-IronPort-AV: E=Sophos;i="6.03,231,1694761200"; d="scan'208";a="366012584" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2023 03:54:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10865"; a="785445243" X-IronPort-AV: E=Sophos;i="6.03,231,1694761200"; d="scan'208";a="785445243" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by orsmga008.jf.intel.com with ESMTP; 17 Oct 2023 03:54:09 -0700 Received: from pelor.igk.intel.com (pelor.igk.intel.com [10.123.220.13]) by irvmail002.ir.intel.com (Postfix) with ESMTP id 26BB3312C0; Tue, 17 Oct 2023 11:54:07 +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 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, Przemek Kitszel Subject: [PATCH net-next v2 00/11] devlink: retain error in struct devlink_fmsg Date: Tue, 17 Oct 2023 12:53:30 +0200 Message-Id: <20231017105341.415466-1-przemyslaw.kitszel@intel.com> X-Mailer: git-send-email 2.40.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 howler.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 (howler.vger.email [0.0.0.0]); Tue, 17 Oct 2023 03:54:31 -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: 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 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 | 185 ++----- .../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 | 388 +++++---------- 19 files changed, 822 insertions(+), 2060 deletions(-) -- 2.40.1