netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Alexandra Diupina <adiupina@astralinux.ru>,
	Zhao Qiang <qiang.zhao@nxp.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"David S. Miller" <davem@davemloft.net>,
	"lvc-project@linuxtesting.org" <lvc-project@linuxtesting.org>
Subject: Re: [PATCH v2] fsl_ucc_hdlc: add a check of the return value from hdlc_open
Date: Mon, 28 Aug 2023 08:37:55 +0000	[thread overview]
Message-ID: <896acfac-fadb-016b-20ff-a06e18edb4d9@csgroup.eu> (raw)
In-Reply-To: <20230828082703.3246-1-adiupina@astralinux.ru>



Le 28/08/2023 à 10:27, Alexandra Diupina a écrit :
> [Vous ne recevez pas souvent de courriers de adiupina@astralinux.ru. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
> 
> Process the result of hold_open() and return it from
> uhdlc_open() in case of an error
> It is necessary to pass the error code up the control flow,
> similar to a possible error in request_irq()
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: c19b6d246a35 ("drivers/net: support hdlc function for QE-UCC")
> Signed-off-by: Alexandra Diupina <adiupina@astralinux.ru>
> ---
> v2: Remove the 'rc' variable (stores the return value of the
> hdlc_open()) as Christophe Leroy <christophe.leroy@csgroup.eu> suggested
>   drivers/net/wan/fsl_ucc_hdlc.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)

I think you did a mistake. A v2 should substitute v1, not come in 
addition to it. So you have to squash this patch into previous one 
before resending.

Christophe

> 
> diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
> index cdd9489c712e..4164abea7725 100644
> --- a/drivers/net/wan/fsl_ucc_hdlc.c
> +++ b/drivers/net/wan/fsl_ucc_hdlc.c
> @@ -708,7 +708,6 @@ static int uhdlc_open(struct net_device *dev)
>          hdlc_device *hdlc = dev_to_hdlc(dev);
>          struct ucc_hdlc_private *priv = hdlc->priv;
>          struct ucc_tdm *utdm = priv->utdm;
> -       int rc = 0;
> 
>          if (priv->hdlc_busy != 1) {
>                  if (request_irq(priv->ut_info->uf_info.irq,
> @@ -732,12 +731,10 @@ static int uhdlc_open(struct net_device *dev)
>                  napi_enable(&priv->napi);
>                  netdev_reset_queue(dev);
>                  netif_start_queue(dev);
> -               rc = hdlc_open(dev);
> -               if (rc)
> -                       return rc;
> +               return hdlc_open(dev);
>          }
> 
> -       return rc;
> +       return 0;
>   }
> 
>   static void uhdlc_memclean(struct ucc_hdlc_private *priv)
> --
> 2.30.2
> 

  reply	other threads:[~2023-08-28  8:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25 14:31 [PATCH] fsl_ucc_hdlc: add a check of the return value from hdlc_open Alexandra Diupina
2023-08-26  6:32 ` Christophe Leroy
2023-08-28  8:27   ` [PATCH v2] " Alexandra Diupina
2023-08-28  8:37     ` Christophe Leroy [this message]
2023-08-28 12:12       ` [PATCH v3] fsl_ucc_hdlc: process the result of hold_open() Alexandra Diupina
2023-08-28 13:11         ` Christophe Leroy
2023-08-28 19:38         ` Jakub Kicinski
2023-09-01 10:48           ` Александра Дюпина
2023-09-01 11:05             ` Denis Kirjanov
2023-09-04 12:31               ` [PATCH v4] drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_close() Alexandra Diupina
2023-09-04 17:03                 ` Christophe Leroy
2023-09-04 17:04                   ` Christophe Leroy
2023-09-05 10:46                   ` Paolo Abeni
2023-09-19 14:25                     ` [PATCH v5] " Alexandra Diupina
2023-09-22  7:09                       ` Christophe Leroy
2023-09-22  7:20                       ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=896acfac-fadb-016b-20ff-a06e18edb4d9@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=adiupina@astralinux.ru \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=qiang.zhao@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).