Re: [PATCH 8/9] Fixed indentation violation in switch statement : Aligned the "switch" and its subordinate "case" labels in the same column instead of "double-intending" the "case" labels.

From: Dmitry Torokhov
Date: Sat Jan 17 2015 - 17:15:27 EST


On Sat, Jan 17, 2015 at 04:13:16PM +0100, Antonio Ospite wrote:
> On Sat, 17 Jan 2015 17:23:45 +0530
> Shailendra Verma <shailendra.capricorn@xxxxxxxxx> wrote:
>
> >
> > Signed-off-by: Shailendra Verma <shailendra.capricorn@xxxxxxxxx>
> > ---
> > drivers/input/evdev.c | 30 ++++++++++++++++++++----------
> > drivers/input/mousedev.c | 18 ++++++++++++------
> > 2 files changed, 32 insertions(+), 16 deletions(-)
> >
> > diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
> > index 18d4b2c..85ee594 100644
> > --- a/drivers/input/evdev.c
> > +++ b/drivers/input/evdev.c
> > @@ -667,16 +667,26 @@ static int handle_eviocgbit(struct input_dev *dev,
> >
> > switch (type) {
> >
> > - case 0: bits = dev->evbit; len = EV_MAX; break;
> > - case EV_KEY: bits = dev->keybit; len = KEY_MAX; break;
> > - case EV_REL: bits = dev->relbit; len = REL_MAX; break;
> > - case EV_ABS: bits = dev->absbit; len = ABS_MAX; break;
> > - case EV_MSC: bits = dev->mscbit; len = MSC_MAX; break;
> > - case EV_LED: bits = dev->ledbit; len = LED_MAX; break;
> > - case EV_SND: bits = dev->sndbit; len = SND_MAX; break;
> > - case EV_FF: bits = dev->ffbit; len = FF_MAX; break;
> > - case EV_SW: bits = dev->swbit; len = SW_MAX; break;
> > - default: return -EINVAL;
>
> I have the feeling this formatting was deliberate, to make comparing the
> lines easier, see the alignment after colons and semicolons.

Yes, I'd rather kept the code here and in mousedev as is.

Thanks.

--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/