Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp383581rwb; Thu, 12 Jan 2023 07:23:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXuIwxOUDYXYGvLKlgCYBshZsOlLeFziExd6vdV7i5v3SQJjLX9APpkt+YRzV99qdWMAVL15 X-Received: by 2002:a05:6a21:e31a:b0:b5:f6de:e84c with SMTP id cb26-20020a056a21e31a00b000b5f6dee84cmr15590434pzc.42.1673537033919; Thu, 12 Jan 2023 07:23:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673537033; cv=none; d=google.com; s=arc-20160816; b=BcQmLL6Hqnqpwlu5SP/HnlnWgABxoVilw11I4uvn+rcNnrgbU8U7NO8aykyZmtlun5 7FvIB6ZPvDJotF/wbT9awsTgR3L11/AHN3UXKraqYt2b2qRqvi1RYpZqqaKcJX8D8okz kFKnrXLlgum6A/2K2Ac2mHfydnmVsA5UD85b66WXcb73Ig3Q/eKKz2nU0/VAwj5owDIn kA9JbmnupTAilrPioWCkGThaKG0A1Ycj5njARM4tQIHqzwreIFl2e5SmCSvTzeM58833 usQK5a9hALoHXqE0gcQPX/ZZrJS2g6dlWcoiBCpTSaSCzdCNR7ClTaTxDjPPoKdAq3nq kcWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7I24eH8vsj2xcwHHKlkQbmBbWacNQhsGFVP2J3hiY54=; b=T82aB5dMYfQM8Tkq6/QODBtFmYcovTlIfzuXKV+KkFd6YaJFLm6aP/1lwlSJIttG0O E8m2hpFY0dbdAZhHTljY69//2tCaImZwJVSMlZ1FH9cnN44GtA6NiXoqfWm18kpVHVwd Zu1SOjn1xO4j+v2Cid+kRvdXv9l2uN2hlL7loZYFTFPfhLNqzmbJJm3/X+Vmw8VHoCFu cb/ty+WJ5N4AoBPrNdt1wGyCvuCCxZURHeKlz/wsT9iQp7ObJzLzfh7i8I9Llbp8tMsH NnRoII41KRr/6aEtGZ3v57rfhmy3edArYWEHH+edoCNulwWKAeeN0jJVZaOKZAoGpCQg lb7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=gG493AOC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020a170903230600b0019258fbb7a6si19420118plh.118.2023.01.12.07.23.47; Thu, 12 Jan 2023 07:23:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=gG493AOC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240159AbjALO7c (ORCPT + 50 others); Thu, 12 Jan 2023 09:59:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239940AbjALO6w (ORCPT ); Thu, 12 Jan 2023 09:58:52 -0500 Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7F9D54737 for ; Thu, 12 Jan 2023 06:45:15 -0800 (PST) Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-4d0f843c417so128464697b3.7 for ; Thu, 12 Jan 2023 06:45:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7I24eH8vsj2xcwHHKlkQbmBbWacNQhsGFVP2J3hiY54=; b=gG493AOCoT3zyKgUQL2nIrQiZmY+vhm0EinYIwwATXB3zU31PYMSK0tbCnkmcaB+QN vVjuiFsG1oa/Nfn0otVD/xkjV4rLR4iW28CRtCe9i4Pj7/YaCItVoCplEGYyqpnlK0w1 wKdyhkyAencr6CSGlTQDVsatwepCYR/uVEdWrUzVm0emQMzRKwwwlHhowKvT6rpuGWRT sMzpQQzO5ftpBTtn5wiXUE3eZn9ApzNTfZGoWuXxMZ4LwEc5fF6WW02w3Ky1zWj7THIA l2VmJC98H47dNGoLjtG0pJXzsCuKXr+dmFjuDfTa4AGXHWOfnXGhiJti0e9EoF1IdfjK V5mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7I24eH8vsj2xcwHHKlkQbmBbWacNQhsGFVP2J3hiY54=; b=RJsYp1OjBwbBKkAtE+SS7StPQbvNUqDxshjKPIH9FZBqArevyfoYCYUvJ2LydN3QOa cZwc07Y46Thc0q6+gtbctHnOD9rxoPtr7sNFXSNl1RrWlhPirzfSet4Zq8EotHT7AqjA BcmO14kq10bW7WAEXhCvRBIPiUFtQQORqgErn09iP4+Jr+Os9tCTkl38MrHEoGLTzHAM DFZiTKHlmTYjZRWEpNqtB1BEc0I+TdPaL+HrYhbTlOYHtGH3JggNTMrQ10MiaYSvLU1H 06PPFrI7JG4o1O9eHPMb92isIGU4Rg/Ai/0igG9MnYFLwaVEnCTnd9YaMtMtjFMQsKSo n9Ag== X-Gm-Message-State: AFqh2krv0geAZVg6/gu68WqtwRa5m+gIDeRJDsrrmhl9zNyWk/cdcDte QuMNOaCk1uMsN/OSLFtjefCjYVr+8ZUfI0Z9hnfMlH7fTcfsCwKk X-Received: by 2002:a05:690c:81:b0:36c:aaa6:e571 with SMTP id be1-20020a05690c008100b0036caaa6e571mr1616785ywb.467.1673534714662; Thu, 12 Jan 2023 06:45:14 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Eric Dumazet Date: Thu, 12 Jan 2023 15:45:03 +0100 Message-ID: Subject: Re: [PATCH net-next 1/1] plca.c: fix obvious mistake in checking retval To: Piergiorgio Beruto Cc: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Oleksij Rempel , mailhol.vincent@wanadoo.fr, sudheer.mogilappagari@intel.com, sbhatta@marvell.com, linux-doc@vger.kernel.org, wangjie125@huawei.com, corbet@lwn.net, lkp@intel.com, gal@nvidia.com, gustavoars@kernel.org, bagasdotme@gmail.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 11, 2023 at 6:30 PM Piergiorgio Beruto wrote: > > This patch addresses a wrong fix that was done during the review > process. The intention was to substitute "if(ret < 0)" with > "if(ret)". Unfortunately, in this specific file the intended fix did not > meet the code. > Please add a Fixes: tag, even for a patch in net-next Fixes: 8580e16c28f3 ("net/ethtool: add netlink interface for the PLCA RS") > Signed-off-by: Piergiorgio Beruto > --- > net/ethtool/plca.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/net/ethtool/plca.c b/net/ethtool/plca.c > index d9bb13ffc654..9c7d29186b4e 100644 > --- a/net/ethtool/plca.c > +++ b/net/ethtool/plca.c > @@ -61,7 +61,7 @@ static int plca_get_cfg_prepare_data(const struct ethnl_req_info *req_base, > } > > ret = ethnl_ops_begin(dev); > - if (!ret) > + if (ret) > goto out; > > memset(&data->plca_cfg, 0xff, > @@ -151,7 +151,7 @@ int ethnl_set_plca_cfg(struct sk_buff *skb, struct genl_info *info) > tb[ETHTOOL_A_PLCA_HEADER], > genl_info_net(info), info->extack, > true); > - if (!ret) Canonical way of testing an error from ethnl_parse_header_dev_get() is: if (ret < 0) return ret; Please double check for the rest of the patch (ethnl_ops_begin() ... ) > + if (ret) > return ret; > > dev = req_info.dev; > @@ -171,7 +171,7 @@ int ethnl_set_plca_cfg(struct sk_buff *skb, struct genl_info *info) > } > > ret = ethnl_ops_begin(dev); > - if (!ret) > + if (ret) > goto out_rtnl; > > memset(&plca_cfg, 0xff, sizeof(plca_cfg)); > @@ -189,7 +189,7 @@ int ethnl_set_plca_cfg(struct sk_buff *skb, struct genl_info *info) > goto out_ops; > > ret = ops->set_plca_cfg(dev->phydev, &plca_cfg, info->extack); > - if (!ret) > + if (ret) > goto out_ops; > > ethtool_notify(dev, ETHTOOL_MSG_PLCA_NTF, NULL); > @@ -233,7 +233,7 @@ static int plca_get_status_prepare_data(const struct ethnl_req_info *req_base, > } > > ret = ethnl_ops_begin(dev); > - if (!ret) > + if (ret) > goto out; > > memset(&data->plca_st, 0xff, > -- > 2.37.4 >