lkml.org 
[lkml]   [2015]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/6] drivers: isdn: act2000: capi.c: fix checkpatch errors
Hello.

On 02/07/2015 08:06 PM, Bas Peters wrote:

> This patch fixes the following checkpatch errors:
> 1. trailing statement
> 1. assignment of variable in if condition
> 1. incorrectly placed brace after function definition

> Signed-off-by: Bas Peters <baspeters93@gmail.com>
> ---
> drivers/isdn/act2000/capi.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)

> diff --git a/drivers/isdn/act2000/capi.c b/drivers/isdn/act2000/capi.c
> index 3f66ca2..5d677e6 100644
> --- a/drivers/isdn/act2000/capi.c
> +++ b/drivers/isdn/act2000/capi.c
> @@ -113,7 +113,8 @@ actcapi_chkhdr(act2000_card *card, actcapi_msghdr *hdr)
> m->hdr.cmd.cmd = c; \
> m->hdr.cmd.subcmd = s; \
> m->hdr.msgnum = actcapi_nextsmsg(card); \
> - } else m = NULL; \
> + } else
> + m = NULL; \

Documentation/CodingStyle has an extra rule for such case: *else* branch
should also have {} since *if* branch has {}.

[...]

WNR, Sergei



\
 
 \ /
  Last update: 2015-02-07 19:01    [W:0.096 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site