[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b3ba0dfa-6367-8e75-6348-f78e1cb7c7e1@linux.ibm.com>
Date: Mon, 21 Jun 2021 19:02:44 +0200
From: Guvenc Gulce <guvenc@...ux.ibm.com>
To: Dan Carpenter <dan.carpenter@...cle.com>,
Karsten Graul <kgraul@...ux.ibm.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, linux-s390@...r.kernel.org,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net-next] net/smc: Fix ENODATA tests in
smc_nl_get_fback_stats()
On 19/06/2021 15:50, Dan Carpenter wrote:
> These functions return negative ENODATA but the minus sign was left out
> in the tests.
>
> Fixes: f0dd7bf5e330 ("net/smc: Add netlink support for SMC fallback statistics")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
> net/smc/smc_stats.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/smc/smc_stats.c b/net/smc/smc_stats.c
> index 614013e3b574..e80e34f7ac15 100644
> --- a/net/smc/smc_stats.c
> +++ b/net/smc/smc_stats.c
> @@ -393,17 +393,17 @@ int smc_nl_get_fback_stats(struct sk_buff *skb, struct netlink_callback *cb)
> continue;
> if (!skip_serv) {
> rc_srv = smc_nl_get_fback_details(skb, cb, k, is_srv);
> - if (rc_srv && rc_srv != ENODATA)
> + if (rc_srv && rc_srv != -ENODATA)
> break;
> } else {
> skip_serv = 0;
> }
> rc_clnt = smc_nl_get_fback_details(skb, cb, k, !is_srv);
> - if (rc_clnt && rc_clnt != ENODATA) {
> + if (rc_clnt && rc_clnt != -ENODATA) {
> skip_serv = 1;
> break;
> }
> - if (rc_clnt == ENODATA && rc_srv == ENODATA)
> + if (rc_clnt == -ENODATA && rc_srv == -ENODATA)
> break;
> }
> mutex_unlock(&net->smc.mutex_fback_rsn);
Acked-by: Guvenc Gulce <guvenc@...ux.ibm.com>
Thanks for preparing the fix.
Powered by blists - more mailing lists