All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: nvec: remove unneccessary 'else' after 'return' statement
@ 2014-07-04 19:57 ` Pawel Lebioda
  0 siblings, 0 replies; 6+ messages in thread
From: Pawel Lebioda @ 2014-07-04 19:57 UTC (permalink / raw)
  To: Marc Dietrich
  Cc: Greg Kroah-Hartman, Julian Andres Klode,
	ac100-oU9gvf+ajcQ97yFScArB1dHuzzzSOjJt,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Hi,

This patch fixes the following warning reported by checkpatch.pl:

WARNING: else is not generally useful after a break or return
#235: FILE: drivers/staging/nvec/nvec.c:235:

Regards
Pawel Lebioda

Signed-off-by: Pawel Lebioda <pawel.lebioda89-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
 drivers/staging/nvec/nvec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 90f1c4d..8a3dd47 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -232,8 +232,7 @@ static size_t nvec_msg_size(struct nvec_msg *msg)
 		return 2;
 	else if (event_length == NVEC_3BYTES)
 		return 3;
-	else
-		return 0;
+	return 0;
 }
 
 /**

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] staging: nvec: remove unneccessary 'else' after 'return' statement
@ 2014-07-04 19:57 ` Pawel Lebioda
  0 siblings, 0 replies; 6+ messages in thread
From: Pawel Lebioda @ 2014-07-04 19:57 UTC (permalink / raw)
  To: Marc Dietrich
  Cc: Greg Kroah-Hartman, Julian Andres Klode, ac100, linux-tegra,
	devel, linux-kernel

Hi,

This patch fixes the following warning reported by checkpatch.pl:

WARNING: else is not generally useful after a break or return
#235: FILE: drivers/staging/nvec/nvec.c:235:

Regards
Pawel Lebioda

Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com>
 drivers/staging/nvec/nvec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 90f1c4d..8a3dd47 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -232,8 +232,7 @@ static size_t nvec_msg_size(struct nvec_msg *msg)
 		return 2;
 	else if (event_length == NVEC_3BYTES)
 		return 3;
-	else
-		return 0;
+	return 0;
 }
 
 /**

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: nvec: remove unneccessary 'else' after 'return' statement
  2014-07-04 19:57 ` Pawel Lebioda
@ 2014-07-04 20:59   ` Julian Andres Klode
  -1 siblings, 0 replies; 6+ messages in thread
From: Julian Andres Klode @ 2014-07-04 20:59 UTC (permalink / raw)
  To: Pawel Lebioda
  Cc: devel, Julian Andres Klode, Greg Kroah-Hartman, linux-kernel,
	linux-tegra, ac100

On Fri, Jul 04, 2014 at 09:57:50PM +0200, Pawel Lebioda wrote:
> Hi,
>
> This patch fixes the following warning reported by checkpatch.pl:
> 
> WARNING: else is not generally useful after a break or return
> #235: FILE: drivers/staging/nvec/nvec.c:235:
> 
> Regards
> Pawel Lebioda
> 
> Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com>
>  drivers/staging/nvec/nvec.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Hi Pawel,

Please format your patches correctly. There should be no
"Hi", no "Regards", etc. After the signed off should be a
dashed line.

Use git format-patch to format patches and you can send
them using git-send-email.

See Documentation/SubmittingPatches for more details

Thanks,
-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

Be friendly, do not top-post, and follow RFC 1855 "Netiquette".
    - If you don't I might ignore you.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: nvec: remove unneccessary 'else' after 'return' statement
@ 2014-07-04 20:59   ` Julian Andres Klode
  0 siblings, 0 replies; 6+ messages in thread
From: Julian Andres Klode @ 2014-07-04 20:59 UTC (permalink / raw)
  To: Pawel Lebioda
  Cc: Marc Dietrich, Greg Kroah-Hartman, Julian Andres Klode, ac100,
	linux-tegra, devel, linux-kernel

On Fri, Jul 04, 2014 at 09:57:50PM +0200, Pawel Lebioda wrote:
> Hi,
>
> This patch fixes the following warning reported by checkpatch.pl:
> 
> WARNING: else is not generally useful after a break or return
> #235: FILE: drivers/staging/nvec/nvec.c:235:
> 
> Regards
> Pawel Lebioda
> 
> Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com>
>  drivers/staging/nvec/nvec.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Hi Pawel,

Please format your patches correctly. There should be no
"Hi", no "Regards", etc. After the signed off should be a
dashed line.

Use git format-patch to format patches and you can send
them using git-send-email.

See Documentation/SubmittingPatches for more details

Thanks,
-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

Be friendly, do not top-post, and follow RFC 1855 "Netiquette".
    - If you don't I might ignore you.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: nvec: remove unneccessary 'else' after 'return'statement
  2014-07-04 20:59   ` Julian Andres Klode
@ 2014-07-05 11:49     ` Marc Dietrich
  -1 siblings, 0 replies; 6+ messages in thread
From: Marc Dietrich @ 2014-07-05 11:49 UTC (permalink / raw)
  To: Julian Andres Klode
  Cc: devel, Greg Kroah-Hartman, Pawel Lebioda, linux-kernel,
	linux-tegra, ac100

On Fri, 4 Jul 2014 22:59:41 +0200
Julian Andres Klode <jak@jak-linux.org> wrote:

> On Fri, Jul 04, 2014 at 09:57:50PM +0200, Pawel Lebioda wrote:
> > Hi,
> >
> > This patch fixes the following warning reported by checkpatch.pl:
> > 
> > WARNING: else is not generally useful after a break or return
> > #235: FILE: drivers/staging/nvec/nvec.c:235:
> > 
> > Regards
> > Pawel Lebioda
> > 
> > Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com>
> >  drivers/staging/nvec/nvec.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> Hi Pawel,
> 
> Please format your patches correctly. There should be no
> "Hi", no "Regards", etc. After the signed off should be a
> dashed line.
> 
> Use git format-patch to format patches and you can send
> them using git-send-email.

yes, this way you reduce some apply-burdon from Greg. Ideally,
you would combine all patches (one patch per checkpatch warning)
in a common thread like this:

git-format-patch --cover-letter --thread -s <first commit of your
patches>

This way you could add some comments (if any) to the cover letter
and just keep the plain checkpatch message in the other patches. This
has also the advantage that the maintainers only have to ack the "cover
letter".

Marc
 
-- 
Marc Dietrich <marvin24@gmx.de>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: nvec: remove unneccessary 'else' after 'return'statement
@ 2014-07-05 11:49     ` Marc Dietrich
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Dietrich @ 2014-07-05 11:49 UTC (permalink / raw)
  To: Julian Andres Klode
  Cc: Pawel Lebioda, Marc Dietrich, Greg Kroah-Hartman, ac100,
	linux-tegra, devel, linux-kernel

On Fri, 4 Jul 2014 22:59:41 +0200
Julian Andres Klode <jak@jak-linux.org> wrote:

> On Fri, Jul 04, 2014 at 09:57:50PM +0200, Pawel Lebioda wrote:
> > Hi,
> >
> > This patch fixes the following warning reported by checkpatch.pl:
> > 
> > WARNING: else is not generally useful after a break or return
> > #235: FILE: drivers/staging/nvec/nvec.c:235:
> > 
> > Regards
> > Pawel Lebioda
> > 
> > Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com>
> >  drivers/staging/nvec/nvec.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> Hi Pawel,
> 
> Please format your patches correctly. There should be no
> "Hi", no "Regards", etc. After the signed off should be a
> dashed line.
> 
> Use git format-patch to format patches and you can send
> them using git-send-email.

yes, this way you reduce some apply-burdon from Greg. Ideally,
you would combine all patches (one patch per checkpatch warning)
in a common thread like this:

git-format-patch --cover-letter --thread -s <first commit of your
patches>

This way you could add some comments (if any) to the cover letter
and just keep the plain checkpatch message in the other patches. This
has also the advantage that the maintainers only have to ack the "cover
letter".

Marc
 
-- 
Marc Dietrich <marvin24@gmx.de>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-05 11:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-04 19:57 [PATCH] staging: nvec: remove unneccessary 'else' after 'return' statement Pawel Lebioda
2014-07-04 19:57 ` Pawel Lebioda
2014-07-04 20:59 ` Julian Andres Klode
2014-07-04 20:59   ` Julian Andres Klode
2014-07-05 11:49   ` [PATCH] staging: nvec: remove unneccessary 'else' after 'return'statement Marc Dietrich
2014-07-05 11:49     ` Marc Dietrich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.