linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: lijian_8010a29@163.com
Cc: gustavoars@kernel.org, mchehab@kernel.org,
	hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org, lijian <lijian@yulong.com>
Subject: Re: [PATCH] media: dvb-frontends: dib0090: Delete 'break' after 'goto'
Date: Sat, 19 Jun 2021 09:15:51 +0100	[thread overview]
Message-ID: <20210619081551.GA6887@gofer.mess.org> (raw)
In-Reply-To: <20210618070707.4731-1-lijian_8010a29@163.com>

On Fri, Jun 18, 2021 at 03:07:07PM +0800, lijian_8010a29@163.com wrote:
> From: lijian <lijian@yulong.com>
> 
> break is not useful after a goto, so delete 'break' after 'goto',
> and delete reused 'goto identification_error;'.
> 
> Signed-off-by: lijian <lijian@yulong.com>
> ---
>  drivers/media/dvb-frontends/dib0090.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/media/dvb-frontends/dib0090.c b/drivers/media/dvb-frontends/dib0090.c
> index 903da33642df..9179fe1bd713 100644
> --- a/drivers/media/dvb-frontends/dib0090.c
> +++ b/drivers/media/dvb-frontends/dib0090.c
> @@ -403,8 +403,6 @@ static int dib0090_identify(struct dvb_frontend *fe)
>  			break;
>  		case P1A_B:
>  			dprintk("P1-A/B detected: driver is deactivated - not available\n");
> -			goto identification_error;
> -			break;

Removing both the break and the goto introduces a switch fallthrough; this
would need explicit marking with the fallthrough keyword.

Having said that, fallthrough isn't needed here. Best to avoid fallthrough
with all it pitfalls and just keep the goto.

>  		default:
>  			goto identification_error;
>  		}
> @@ -493,8 +491,6 @@ static int dib0090_fw_identify(struct dvb_frontend *fe)
>  			break;
>  		case P1A_B:
>  			dprintk("P1-A/B detected: driver is deactivated - not available\n");
> -			goto identification_error;
> -			break;

Same here.

>  		default:
>  			goto identification_error;
>  		}
> -- 
> 2.25.1

      reply	other threads:[~2021-06-19  8:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18  7:07 [PATCH] media: dvb-frontends: dib0090: Delete 'break' after 'goto' lijian_8010a29
2021-06-19  8:15 ` Sean Young [this message]

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=20210619081551.GA6887@gofer.mess.org \
    --to=sean@mess.org \
    --cc=gustavoars@kernel.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=lijian@yulong.com \
    --cc=lijian_8010a29@163.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /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).