Thread (3 messages) 3 messages, 3 authors, 2015-01-17

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 <dmitry.torokhov@gmail.com>
Date: 2015-01-17 22:15:23
Also in: lkml

On Sat, Jan 17, 2015 at 04:13:16PM +0100, Antonio Ospite wrote:
On Sat, 17 Jan 2015 17:23:45 +0530
Shailendra Verma [off-list ref] wrote:
quoted
Signed-off-by: Shailendra Verma <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help