Re: [PATCH 5/5] ISDN-CAPI: Delete unnecessary braces

From: Paul Bolle
Date: Mon Sep 26 2016 - 05:20:59 EST


On Sun, 2016-09-25 at 14:47 +0200, SF Markus Elfring wrote:
> > > @@ -976,13 +974,12 @@ static void handle_controller(_cmsg *cmsg)
> > > ÂÂÂÂÂÂÂÂÂif (debugmode)
> > > ÂÂÂÂÂÂÂÂÂÂÂÂÂprintk(KERN_DEBUG "capidrv-%d: listenconf Info=0x%4x
> > > (%s) cipmask=0x%x\n",
> > > ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂcard->contrnr, cmsg->Info,
> > > capi_info2str(cmsg->Info), card->cipmask);
> > > -ÂÂÂÂÂÂÂÂif (cmsg->Info) {
> > > +ÂÂÂÂÂÂÂÂif (cmsg->Info)
> > > ÂÂÂÂÂÂÂÂÂÂÂÂÂlisten_change_state(card, EV_LISTEN_CONF_ERROR);
> > > -ÂÂÂÂÂÂÂÂ} else if (card->cipmask == 0) {
> > > +ÂÂÂÂÂÂÂÂelse if (card->cipmask == 0)
> > > ÂÂÂÂÂÂÂÂÂÂÂÂÂlisten_change_state(card, EV_LISTEN_CONF_EMPTY);
> > > -ÂÂÂÂÂÂÂÂ} else {
> > > +ÂÂÂÂÂÂÂÂÂÂÂÂÂelse
> >
> > ÂÂÂIndented too much.
>
> How do you think about an alignment of this "else"
> with the corresponding if statement three lines above?

Well, I think it looks silly. checkpatch apparently agrees:
WARNING: Statements should start on a tabstop
#51: FILE: drivers/isdn/capi/capidrv.c:981:
+ else

total: 0 errors, 1 warnings, 91 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

Your patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

You use checkpatch a lot, don't you? Didn't you use it to, you know,
check your patch?


Paul Bolle