From patchwork Wed Jul 13 14:18:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 12916825 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 054E9C43334 for ; Wed, 13 Jul 2022 14:19:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236319AbiGMOTA (ORCPT ); Wed, 13 Jul 2022 10:19:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235703AbiGMOTA (ORCPT ); Wed, 13 Jul 2022 10:19:00 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66933DF5C for ; Wed, 13 Jul 2022 07:18:58 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id g1so14278596edb.12 for ; Wed, 13 Jul 2022 07:18:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=G5D9ObugWzkVvxI4itszsf2bVDOEhul6X0UMnwjbpJ8=; b=45jfJ9VZtFXf+WRKwYUQth7/hrYxDNXWCV9hDrhgkzc3ihDDlT2Bj0kaXc9y5N48Tc EM8RB+aZyDSVslzQzQKy3EUfECF8/PSnXC0yLCIm4qRoGJZEX/VBNEb+dEC0y0L3/UMN +pEP8YeAujRJVWxDSpouibrBVIB00ceGumG9qKSHFHzPJ49OoT/zZ1BiRECXgf+RcXEy rzw8q0VCFqfwIIEt4aVApzxaAGr6wRttlI4ZdwNc6PqVE0qKErEnGn18EPIK2xuSc/cN QWPKLDHZRwQNvL3LzPqjLzQjNEsGgRl712PrHkVs2rtpWyEjMQbjkZ9LaVIY9HEIqPy7 auRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G5D9ObugWzkVvxI4itszsf2bVDOEhul6X0UMnwjbpJ8=; b=fcA3m2QpxaHVuRxrZduIXphsS21Rouik0+axTNpAd9mKBX0cCkiKanUmhKEzndNWH/ 5LCb9Erog7v6n0ZXI0stENPjkwCDujNb9F/SiwOdOyeO7lQ4e/j+jQVsPjdl9HRDLmi9 IkzhQOpYV7EnihHSYC4YBXLyoq9n7CzHqIwWa5ii3Ccwt+nJJP9FNdx5dkSSGfh9Jlil ti3RurcqUvmThq5wFEsv3Eq3MXUvidRSEO6bPwHBPlRXjrI/rdzPPrCOMO0zp0esrq+l rqHB/enxFySkjO5RH0Rj0lbR5latPvtakAoJbVCjzEkolX1wL5THOkze8ImB/d53OwlP kGDw== X-Gm-Message-State: AJIora/gDsHg0022eRuHB8eRXh1VXgr+Gvk4Xe8qi8np1BmkWjiQoPVX vgPuqCrwEEwByUVP9jW5CTyy7e/BciVcu1IOxOA= X-Google-Smtp-Source: AGRyM1uv/xBUdBNPdQVho4UsaiLYHZp1homVs0aBPiLWv9eNtdQe5IFvqP0vard4h5fi3/5rqlKnyg== X-Received: by 2002:a05:6402:414c:b0:435:1e2a:2c7f with SMTP id x12-20020a056402414c00b004351e2a2c7fmr5365731eda.132.1657721937010; Wed, 13 Jul 2022 07:18:57 -0700 (PDT) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id b16-20020a17090630d000b0072aeaa1bb5esm5055928ejb.211.2022.07.13.07.18.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 07:18:56 -0700 (PDT) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, mlxsw@nvidia.com, saeedm@nvidia.com, moshe@nvidia.com Subject: [patch net-next repost 1/3] net: devlink: make devlink_dpipe_headers_register() return void Date: Wed, 13 Jul 2022 16:18:51 +0200 Message-Id: <20220713141853.2992014-2-jiri@resnulli.us> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220713141853.2992014-1-jiri@resnulli.us> References: <20220713141853.2992014-1-jiri@resnulli.us> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Jiri Pirko The return value is not used, so change the return value type to void. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski --- drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 6 ++---- include/net/devlink.h | 2 +- net/core/devlink.c | 5 ++--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c index 5d494fabf93d..c2540292702d 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c @@ -1266,10 +1266,8 @@ int mlxsw_sp_dpipe_init(struct mlxsw_sp *mlxsw_sp) struct devlink *devlink = priv_to_devlink(mlxsw_sp->core); int err; - err = devlink_dpipe_headers_register(devlink, - &mlxsw_sp_dpipe_headers); - if (err) - return err; + devlink_dpipe_headers_register(devlink, &mlxsw_sp_dpipe_headers); + err = mlxsw_sp_dpipe_erif_table_init(mlxsw_sp); if (err) goto err_erif_table_init; diff --git a/include/net/devlink.h b/include/net/devlink.h index b1b5c19a8316..88c701b375a2 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1590,7 +1590,7 @@ int devlink_dpipe_table_register(struct devlink *devlink, void *priv, bool counter_control_extern); void devlink_dpipe_table_unregister(struct devlink *devlink, const char *table_name); -int devlink_dpipe_headers_register(struct devlink *devlink, +void devlink_dpipe_headers_register(struct devlink *devlink, struct devlink_dpipe_headers *dpipe_headers); void devlink_dpipe_headers_unregister(struct devlink *devlink); bool devlink_dpipe_table_counter_enabled(struct devlink *devlink, diff --git a/net/core/devlink.c b/net/core/devlink.c index 2b2e454ebd78..c261bba9ab76 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -10425,13 +10425,12 @@ EXPORT_SYMBOL_GPL(devlink_sb_unregister); * * Register the headers supported by hardware. */ -int devlink_dpipe_headers_register(struct devlink *devlink, - struct devlink_dpipe_headers *dpipe_headers) +void devlink_dpipe_headers_register(struct devlink *devlink, + struct devlink_dpipe_headers *dpipe_headers) { devl_lock(devlink); devlink->dpipe_headers = dpipe_headers; devl_unlock(devlink); - return 0; } EXPORT_SYMBOL_GPL(devlink_dpipe_headers_register); From patchwork Wed Jul 13 14:18:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 12916827 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E7FCC433EF for ; Wed, 13 Jul 2022 14:19:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236470AbiGMOTD (ORCPT ); Wed, 13 Jul 2022 10:19:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236455AbiGMOTB (ORCPT ); Wed, 13 Jul 2022 10:19:01 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04D7FE08D for ; Wed, 13 Jul 2022 07:19:00 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id oy13so15263190ejb.1 for ; Wed, 13 Jul 2022 07:18:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IUSKZ5hVydPYGMVd2QIHCwI22Wd1tI7e9fbKWH3ODT4=; b=ie8SHxnYD1RfWCEquafqtutY8+AaZnyaFH1zqvsv0QvZKQstNGAjDfwH9Rr4jyglKZ 0xhXLuFahazETgRQlXNBkEx6rKE6waEgLCiE98hV9Zy4BR5orpHnAKxSXuTb1ZGKaJ11 8JPQ//MAmkSTcXkltb6Lp+VQyp+stwXVXmY+b4H+tbaTeNAGbvZi0t+1+E63pZR70DiC 8inAA3F0gOzRwo6UJ0w9lsvdY6WaBKOmvjPhRvQXit4ZBIRnpijCFTnHJfNZ5PcZAWNE lWVHf2At3zh2oyZa+58hVStFDy8ErjH6ExK8JTgD5aAMzjFGscPTI3rCsTOjxIid1jBx As5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IUSKZ5hVydPYGMVd2QIHCwI22Wd1tI7e9fbKWH3ODT4=; b=I/uGMNZX4fYuwo7ag7AjXMCvnskOTQ6eMwqQFAQ6+5U30kuT5+/45v1NgprP1VOH9F emNv3SlAOYLogKmbCZcNsx58ZA2Kj6eQeVPOLANxCQFU8j7e2aeSa0K+mKGgMss0kqOh OGD35nE4UDRUrDjBJS//fMcnZ0b5BsnoGLTBGe9GUmws2vQPgiWv2XB6wCftPbTFt1dc wRT5ZBAK8AB5jhQ074EWOkTBPC5sMB7BmeYTPoZ29tO7qMe+dfsqnHLk+25LkIDcHg6V Z6EGKxM1xTmHaRMV6W774zPorGG7zv51M4mijMxU6KCn4/EN+kzRN4wF0vh5mNHNGX22 yKzw== X-Gm-Message-State: AJIora+bE2tnYmBQRAQI6X5WnIsbHDB03sD9p66pV2aBNVbnGnXwIYTT lJCAhkRKS+s1FM6o0154sx2YlPjEtW5Iq7/MaWk= X-Google-Smtp-Source: AGRyM1v5d+G6aQ4x3CXgxDWs/Ii26MgaZqVZkNWuI1z07BArMXYixmgeSEie4q1LNI6XFr71mwl9nw== X-Received: by 2002:a17:906:98c7:b0:72b:2f8a:66b4 with SMTP id zd7-20020a17090698c700b0072b2f8a66b4mr3630260ejb.692.1657721938527; Wed, 13 Jul 2022 07:18:58 -0700 (PDT) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id g24-20020a170906539800b00727c6da69besm5007811ejo.38.2022.07.13.07.18.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 07:18:58 -0700 (PDT) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, mlxsw@nvidia.com, saeedm@nvidia.com, moshe@nvidia.com Subject: [patch net-next repost 2/3] net: devlink: fix a typo in function name devlink_port_new_notifiy() Date: Wed, 13 Jul 2022 16:18:52 +0200 Message-Id: <20220713141853.2992014-3-jiri@resnulli.us> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220713141853.2992014-1-jiri@resnulli.us> References: <20220713141853.2992014-1-jiri@resnulli.us> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Jiri Pirko Fix the typo in a name of devlink_port_new_notifiy() function. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski --- net/core/devlink.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/core/devlink.c b/net/core/devlink.c index c261bba9ab76..2f22ce33c3ec 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -1700,9 +1700,9 @@ static int devlink_nl_cmd_port_unsplit_doit(struct sk_buff *skb, return devlink->ops->port_unsplit(devlink, devlink_port, info->extack); } -static int devlink_port_new_notifiy(struct devlink *devlink, - unsigned int port_index, - struct genl_info *info) +static int devlink_port_new_notify(struct devlink *devlink, + unsigned int port_index, + struct genl_info *info) { struct devlink_port *devlink_port; struct sk_buff *msg; @@ -1775,7 +1775,7 @@ static int devlink_nl_cmd_port_new_doit(struct sk_buff *skb, if (err) return err; - err = devlink_port_new_notifiy(devlink, new_port_index, info); + err = devlink_port_new_notify(devlink, new_port_index, info); if (err && err != -ENODEV) { /* Fail to send the response; destroy newly created port. */ devlink->ops->port_del(devlink, new_port_index, extack); From patchwork Wed Jul 13 14:18:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 12916828 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E5CCC43334 for ; Wed, 13 Jul 2022 14:19:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236416AbiGMOTE (ORCPT ); Wed, 13 Jul 2022 10:19:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236491AbiGMOTC (ORCPT ); Wed, 13 Jul 2022 10:19:02 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61891B4B8 for ; Wed, 13 Jul 2022 07:19:01 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id bp15so9865996ejb.6 for ; Wed, 13 Jul 2022 07:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qdxHGAw4fwtPClwOf0CmOMbYQKMEa4xMp9KzJ6jp6n0=; b=7FjdEG3xyCZnYt95lp61KRGoL3N7Lrga4eUDTttSkSWv4tz9ia35Db0a3iPapsKfK2 6BpGhR2YNcIWX2bxt7jD/qM2fGnx1FZyDB4OOd/FvJ9L4tvqSwNNrrlxz9+eDA2GSLTI 2dqpV3/JD0BGYMXJpCC8DU/DHFfbsqiMKexQW2QUC59DeI31oayATAO9Kleay90ZOxtz ErvI6/vGNlb/2wiLhplEmk34XJPJv/1ddLSIDw7Wh5brYOJ2xthfKDGcey7zWxv6g/aR 37VFVsqhwkjOTrXyWAaajOpk7aw/VWLUtMCGvrFH7QeiggqU76yXtEKeYSTzqbvkaGSS IheA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qdxHGAw4fwtPClwOf0CmOMbYQKMEa4xMp9KzJ6jp6n0=; b=ylnvryTt5GZZG+pyH/K17PZNzgOE2Hxwe4kHz+k0bY4+1Y5uubBz97VpVdh41NRDzo 8aiXWqIdT8iQGVvJ0uEWK9kLwhEVI3YtFHuhXXPzx2aiNuZi6xKBdvQbEQ9C+pa4vZYk bw3xzBKgpxv+Vo86zpDvvGOgzGOb8koJglA5KD53Qi5CDFD/VLb6Nys33yBvc7XoE9nB tx1nDGTnHuueUFq+NXvZSlkWsyyd2YX1bw6CXfgXm1m6l8gKoHIQJcDyrAw5OE6s8m2j zoVLfE6n5TpBCkBeYfyipxsjGn4RvhiTLBQnYAeCW+vd6TUNSBpBEyMOApNHiYy94NG9 ZVSA== X-Gm-Message-State: AJIora9LmmFUW17Dak3C3jSYkwFGENyLkg9btooQfuk1/41BhF9Dfpfh LgD1U3fbLCyRwmZ0/U+WBk0wdOIDrk/HEFv1PX4= X-Google-Smtp-Source: AGRyM1uz0d2y1pJpkob9X7h3UszO2ccfuw/70eylQXqXa4gvLnVdnupO4q0T4Oc9S1WoDfu98Cq1wA== X-Received: by 2002:a17:906:8a4a:b0:72b:5b23:3065 with SMTP id gx10-20020a1709068a4a00b0072b5b233065mr3739272ejc.557.1657721940012; Wed, 13 Jul 2022 07:19:00 -0700 (PDT) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id j11-20020a50ed0b000000b0043a6b86f024sm7897036eds.67.2022.07.13.07.18.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 07:18:59 -0700 (PDT) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, mlxsw@nvidia.com, saeedm@nvidia.com, moshe@nvidia.com Subject: [patch net-next repost 3/3] net: devlink: fix return statement in devlink_port_new_notify() Date: Wed, 13 Jul 2022 16:18:53 +0200 Message-Id: <20220713141853.2992014-4-jiri@resnulli.us> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220713141853.2992014-1-jiri@resnulli.us> References: <20220713141853.2992014-1-jiri@resnulli.us> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Jiri Pirko Return directly without intermediate value store at the end of devlink_port_new_notify() function. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski --- net/core/devlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/core/devlink.c b/net/core/devlink.c index 2f22ce33c3ec..a9776ea923ae 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -1724,8 +1724,7 @@ static int devlink_port_new_notify(struct devlink *devlink, if (err) goto out; - err = genlmsg_reply(msg, info); - return err; + return genlmsg_reply(msg, info); out: nlmsg_free(msg);