Skip to contentSkip to conversation

Staging: Add space around the operator.

PATCH New Sandhya Bankar 1 participant 3 messages Sep 22, 2016 Staging

lore
Share & tools
lore
#0 lore raw

cover Staging: Add space around the operator.

This issue was found by checkpatch.

Sandhya Bankar (2):
Staging: speakup: kobjects: Add space around the operator.
Staging: speakup: varhandlers: Add space around the operator.

 drivers/staging/speakup/kobjects.c    | 10 +++++-----
 drivers/staging/speakup/varhandlers.c |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/2 Staging: speakup: varhandlers: Add space around the operator.

This patch was found by checkpatch.

---
 drivers/staging/speakup/varhandlers.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/speakup/varhandlers.c +3 -3
index e1393d2..21186e3 100644
@@ -276,7 +276,7 @@ int spk_set_mask_bits(const char *input, const int which, const int how)
 	u_char *cp;
 	short mask = spk_punc_info[which].mask;
 
-	if (how&1) {
+	if (how & 1) {
 		for (cp = (u_char *)spk_punc_info[3].value; *cp; cp++)
 			spk_chartab[*cp] &= ~mask;
 	}
@@ -290,14 +290,14 @@ int spk_set_mask_bits(const char *input, const int which, const int how)
 			if (mask < PUNC) {
 				if (!(spk_chartab[*cp] & PUNC))
 					break;
-			} else if (spk_chartab[*cp]&B_NUM)
+			} else if (spk_chartab[*cp] & B_NUM)
 				break;
 		}
 		if (*cp)
 			return -EINVAL;
 		cp = (u_char *)input;
 	}
-	if (how&2) {
+	if (how & 2) {
 		for (; *cp; cp++)
 			if (*cp > SPACE)
 				spk_chartab[*cp] |= mask;
Signature · 1 line
1.8.3.1
#2 lore raw

PATCH 2/2 Staging: speakup: kobjects: Add space around the operator.

In reply to Sandhya Bankar

This issue was found by checkpatch.

---
 drivers/staging/speakup/kobjects.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/speakup/kobjects.c +5 -5
index 7fedee3..4a78d37 100644
@@ -251,7 +251,7 @@ static ssize_t keymap_show(struct kobject *kobj, struct kobj_attribute *attr,
 	}
 	cp += sprintf(cp, "0, %d\n", KEY_MAP_VER);
 	spin_unlock_irqrestore(&speakup_info.spinlock, flags);
-	return (int)(cp-buf);
+	return (int)(cp - buf);
 }
 
 /*
@@ -288,8 +288,8 @@ static ssize_t keymap_store(struct kobject *kobj, struct kobj_attribute *attr,
 		cp = spk_s2uchar(cp, cp1);
 		cp1++;
 	}
-	i = (int)cp1[-2]+1;
-	i *= (int)cp1[-1]+1;
+	i = (int)cp1[-2] + 1;
+	i *= (int)cp1[-1] + 1;
 	i += 2; /* 0 and last map ver */
 	if (cp1[-3] != KEY_MAP_VER || cp1[-1] > 10 ||
 			i+SHIFT_TBL_SIZE+4 >= sizeof(spk_key_buf)) {
@@ -350,9 +350,9 @@ static ssize_t silent_store(struct kobject *kobj, struct kobj_attribute *attr,
 	} else {
 		shut = 0;
 	}
-	if (ch&4)
+	if (ch & 4)
 		shut |= 0x40;
-	if (ch&1)
+	if (ch & 1)
 		spk_shut_up |= shut;
 	else
 		spk_shut_up &= ~shut;
Signature · 1 line
1.8.3.1