This patch sereies optimise code like:
{
case XXX:
return XXX;
break; //The break is meanless, so just delete it.
case YYY:
goto YYY;
break; //The break is meanless, so just delete it.
......
}
Signed-off-by: Bernard Zhao <[email protected]>
---
Bernard Zhao (2):
drivers/tty/nozomi.c: delete no use break after goto
drivers/tty/serial/imx.c: delete no use break after return
drivers/tty/nozomi.c | 4 ----
drivers/tty/serial/imx.c | 5 -----
2 files changed, 9 deletions(-)
--
2.29.0
Delete break after return, which will never run.
Signed-off-by: Bernard Zhao <[email protected]>
---
drivers/tty/serial/imx.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 1731d9728865..09703079db7b 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -320,7 +320,6 @@ static u32 imx_uart_readl(struct imx_port *sport, u32 offset)
switch (offset) {
case UCR1:
return sport->ucr1;
- break;
case UCR2:
/*
* UCR2_SRST is the only bit in the cached registers that might
@@ -331,16 +330,12 @@ static u32 imx_uart_readl(struct imx_port *sport, u32 offset)
if (!(sport->ucr2 & UCR2_SRST))
sport->ucr2 = readl(sport->port.membase + offset);
return sport->ucr2;
- break;
case UCR3:
return sport->ucr3;
- break;
case UCR4:
return sport->ucr4;
- break;
case UFCR:
return sport->ufcr;
- break;
default:
return readl(sport->port.membase + offset);
}
--
2.29.0
On Wed, Nov 04, 2020 at 02:53:29AM -0800, Bernard Zhao wrote:
> This patch sereies optimise code like:
> {
> case XXX:
> return XXX;
> break; //The break is meanless, so just delete it.
> case YYY:
> goto YYY;
> break; //The break is meanless, so just delete it.
> ......
> }
>
> Signed-off-by: Bernard Zhao <[email protected]>
>
> ---
> Bernard Zhao (2):
> drivers/tty/nozomi.c: delete no use break after goto
> drivers/tty/serial/imx.c: delete no use break after return
That is not the subject of the patches you sent out, what broke?
From: Greg Kroah-Hartman <[email protected]>
Date: 2020-11-04 19:02:53
To: Bernard Zhao <[email protected]>
Cc: Jiri Slaby <[email protected]>,Shawn Guo <[email protected]>,Sascha Hauer <[email protected]>,Pengutronix Kernel Team <[email protected]>,Fabio Estevam <[email protected]>,NXP Linux Team <[email protected]>,[email protected],[email protected],[email protected],[email protected]
Subject: Re: [PATCH 0/2] drivers/tty: delete break after return or goto>On Wed, Nov 04, 2020 at 02:53:29AM -0800, Bernard Zhao wrote:
>> This patch sereies optimise code like:
>> {
>> case XXX:
>> return XXX;
>> break; //The break is meanless, so just delete it.
>> case YYY:
>> goto YYY;
>> break; //The break is meanless, so just delete it.
>> ......
>> }
>>
>> Signed-off-by: Bernard Zhao <[email protected]>
>>
>> ---
>> Bernard Zhao (2):
>> drivers/tty/nozomi.c: delete no use break after goto
>> drivers/tty/serial/imx.c: delete no use break after return
>
>That is not the subject of the patches you sent out, what broke?
Hi:
I am sorry that I am a little confused:
The patch series`s subject is "drivers/tty: delete break after return or goto"
and the blurb is:
This patch sereies optimise code like:
{
case XXX:
return XXX;
break; //The break is meanless, so just delete it.
case YYY:
goto YYY;
break; //The break is meanless, so just delete it.
......
}
last, the modified files are:
Bernard Zhao (2):
drivers/tty/nozomi.c: delete no use break after goto
drivers/tty/serial/imx.c: delete no use break after return
Is there something wrong that I didn`t catch?
BR//Bernard
On Wed, Nov 04, 2020 at 07:17:56PM +0800, Bernard wrote:
>
>
> From: Greg Kroah-Hartman <[email protected]>
> Date: 2020-11-04 19:02:53
> To: Bernard Zhao <[email protected]>
> Cc: Jiri Slaby <[email protected]>,Shawn Guo <[email protected]>,Sascha Hauer <[email protected]>,Pengutronix Kernel Team <[email protected]>,Fabio Estevam <[email protected]>,NXP Linux Team <[email protected]>,[email protected],[email protected],[email protected],[email protected]
> Subject: Re: [PATCH 0/2] drivers/tty: delete break after return or goto>On Wed, Nov 04, 2020 at 02:53:29AM -0800, Bernard Zhao wrote:
> >> This patch sereies optimise code like:
> >> {
> >> case XXX:
> >> return XXX;
> >> break; //The break is meanless, so just delete it.
> >> case YYY:
> >> goto YYY;
> >> break; //The break is meanless, so just delete it.
> >> ......
> >> }
> >>
> >> Signed-off-by: Bernard Zhao <[email protected]>
> >>
> >> ---
> >> Bernard Zhao (2):
> >> drivers/tty/nozomi.c: delete no use break after goto
> >> drivers/tty/serial/imx.c: delete no use break after return
> >
> >That is not the subject of the patches you sent out, what broke?
>
> Hi:
>
> I am sorry that I am a little confused:
> The patch series`s subject is "drivers/tty: delete break after return or goto"
> and the blurb is:
> This patch sereies optimise code like:
> {
> case XXX:
> return XXX;
> break; //The break is meanless, so just delete it.
> case YYY:
> goto YYY;
> break; //The break is meanless, so just delete it.
> ......
> }
> last, the modified files are:
> Bernard Zhao (2):
> drivers/tty/nozomi.c: delete no use break after goto
> drivers/tty/serial/imx.c: delete no use break after return
>
> Is there something wrong that I didn`t catch?
The above lines do not match up with the subject lines of the patches
you sent out, so something went wrong.
thanks,
greg k-h
On Thu, Nov 05, 2020 at 03:34:55PM +0800, Bernard wrote:
> From: Greg Kroah-Hartman <[email protected]>
>
> Date: 2020-11-04 19:59:03
> To: Bernard <[email protected]>
> Cc: Jiri Slaby <[email protected]>,Shawn Guo <[email protected]>,Sascha Hauer <[email protected]>,Pengutronix Kernel Team <[email protected]>,Fabio Estevam <[email protected]>,NXP Linux Team <[email protected]>,[email protected],[email protected],[email protected],[email protected]
> Subject: Re: Re: [PATCH 0/2] drivers/tty: delete break after return or goto>On Wed, Nov 04, 2020 at 07:17:56PM +0800, Bernard wrote:
> >>
> >>
> >> From: Greg Kroah-Hartman <[email protected]>
> >> Date: 2020-11-04 19:02:53
> >> To: Bernard Zhao <[email protected]>
> >> Cc: Jiri Slaby <[email protected]>,Shawn Guo <[email protected]>,Sascha Hauer <[email protected]>,Pengutronix Kernel Team <[email protected]>,Fabio Estevam <[email protected]>,NXP Linux Team <[email protected]>,[email protected],[email protected],[email protected],[email protected]
> >> Subject: Re: [PATCH 0/2] drivers/tty: delete break after return or goto>On Wed, Nov 04, 2020 at 02:53:29AM -0800, Bernard Zhao wrote:
> >> >> This patch sereies optimise code like:
> >> >> {
> >> >> case XXX:
> >> >> return XXX;
> >> >> break; //The break is meanless, so just delete it.
> >> >> case YYY:
> >> >> goto YYY;
> >> >> break; //The break is meanless, so just delete it.
> >> >> ......
> >> >> }
> >> >>
> >> >> Signed-off-by: Bernard Zhao <[email protected]>
> >> >>
> >> >> ---
> >> >> Bernard Zhao (2):
> >> >> drivers/tty/nozomi.c: delete no use break after goto
> >> >> drivers/tty/serial/imx.c: delete no use break after return
> >> >
> >> >That is not the subject of the patches you sent out, what broke?
> >>
> >> Hi:
> >>
> >> I am sorry that I am a little confused:
> >> The patch series`s subject is "drivers/tty: delete break after return or goto"
> >> and the blurb is:
> >> This patch sereies optimise code like:
> >> {
> >> case XXX:
> >> return XXX;
> >> break; //The break is meanless, so just delete it.
> >> case YYY:
> >> goto YYY;
> >> break; //The break is meanless, so just delete it.
> >> ......
> >> }
> >> last, the modified files are:
> >> Bernard Zhao (2):
> >> drivers/tty/nozomi.c: delete no use break after goto
> >> drivers/tty/serial/imx.c: delete no use break after return
> >>
> >> Is there something wrong that I didn`t catch?
> >
> >The above lines do not match up with the subject lines of the patches
> >you sent out, so something went wrong.
>
>
> Hi, Greg:
>
> Sorry to bother you.
> I am a newcomer to the community, and this is my first time submitting a patch series.
You might want to start in the drivers/staging/ part of the kernel to
get your bearings and work out these types of things. It's "easier"
there as the code there needs lots of work and it's set up to handle new
developers like yourself.
> I am sorry that I still don't understand:"The above lines do not match up with the subject lines of the patches you sent out, so something went wrong."
> I compared my patch series with other people`s patch series, as shown in the picture below, they look the seem.
> The only difference is that I made a signature here, so is this the issue that you mean?
the output of the git command that caused those lines to be written was
taken from the subject lines of the patches in your tree. Yet the
subject lines of the patches you emailed us did not match that at all,
so what you sent is not what you actually had here when you generated
that cover letter. So something went wrong with your process.
Try deleting all patch files in the directory and generating them again,
and then emailing the series to yourself to verify that everything
matches up properly.
hope this helps,
greg k-h