2016-11-12 00:13:29

by Walt Feasel

[permalink] [raw]
Subject: [PATCH] [STYLE 1/3]staging:speakup:speakup_decpc.c Block align text

Made suggested modifications from checkpatch in reference
to: WARNING: Block comments should align the * on each line
Modified horizontal spacing for consistency/legibility
Modified multi line comment to single

Signed-off-by: Walt Feasel <[email protected]>
---
drivers/staging/speakup/speakup_decpc.c | 97 ++++++++++++++++-----------------
1 file changed, 47 insertions(+), 50 deletions(-)

diff --git a/drivers/staging/speakup/speakup_decpc.c b/drivers/staging/speakup/speakup_decpc.c
index d6479bd..bebbf75 100644
--- a/drivers/staging/speakup/speakup_decpc.c
+++ b/drivers/staging/speakup/speakup_decpc.c
@@ -33,15 +33,15 @@
#include "spk_priv.h"
#include "speakup.h"

-#define MODULE_init 0x0dec /* module in boot code */
-#define MODULE_self_test 0x8800 /* module in self-test */
-#define MODULE_reset 0xffff /* reinit the whole module */
+#define MODULE_init 0x0dec /* module in boot code */
+#define MODULE_self_test 0x8800 /* module in self-test */
+#define MODULE_reset 0xffff /* reinit the whole module */

-#define MODE_mask 0xf000 /* mode bits in high nibble */
+#define MODE_mask 0xf000 /* mode bits in high nibble */
#define MODE_null 0x0000
-#define MODE_test 0x2000 /* in testing mode */
+#define MODE_test 0x2000 /* in testing mode */
#define MODE_status 0x8000
-#define STAT_int 0x0001 /* running in interrupt mode */
+#define STAT_int 0x0001 /* running in interrupt mode */
#define STAT_tr_char 0x0002 /* character data to transmit */
#define STAT_rr_char 0x0004 /* ready to receive char data */
#define STAT_cmd_ready 0x0008 /* ready to accept commands */
@@ -61,33 +61,31 @@
#define CMD_mask 0xf000 /* mask for command nibble */
#define CMD_null 0x0000 /* post status */
#define CMD_control 0x1000 /* hard control command */
-#define CTRL_mask 0x0F00 /* mask off control nibble */
-#define CTRL_data 0x00FF /* mask to get data byte */
-#define CTRL_null 0x0000 /* null control */
-#define CTRL_vol_up 0x0100 /* increase volume */
-#define CTRL_vol_down 0x0200 /* decrease volume */
-#define CTRL_vol_set 0x0300 /* set volume */
-#define CTRL_pause 0x0400 /* pause spc */
-#define CTRL_resume 0x0500 /* resume spc clock */
-#define CTRL_resume_spc 0x0001 /* resume spc soft pause */
-#define CTRL_flush 0x0600 /* flush all buffers */
-#define CTRL_int_enable 0x0700 /* enable status change ints */
-#define CTRL_buff_free 0x0800 /* buffer remain count */
-#define CTRL_buff_used 0x0900 /* buffer in use */
-#define CTRL_speech 0x0a00 /* immediate speech change */
-#define CTRL_SP_voice 0x0001 /* voice change */
-#define CTRL_SP_rate 0x0002 /* rate change */
-#define CTRL_SP_comma 0x0003 /* comma pause change */
-#define CTRL_SP_period 0x0004 /* period pause change */
-#define CTRL_SP_rate_delta 0x0005 /* delta rate change */
-#define CTRL_SP_get_param 0x0006 /* return the desired parameter */
-#define CTRL_last_index 0x0b00 /* get last index spoken */
-#define CTRL_io_priority 0x0c00 /* change i/o priority */
-#define CTRL_free_mem 0x0d00 /* get free paragraphs on module */
-#define CTRL_get_lang 0x0e00 /* return bit mask of loaded
- * languages
- */
-#define CMD_test 0x2000 /* self-test request */
+#define CTRL_mask 0x0F00 /* mask off control nibble */
+#define CTRL_data 0x00FF /* mask to get data byte */
+#define CTRL_null 0x0000 /* null control */
+#define CTRL_vol_up 0x0100 /* increase volume */
+#define CTRL_vol_down 0x0200 /* decrease volume */
+#define CTRL_vol_set 0x0300 /* set volume */
+#define CTRL_pause 0x0400 /* pause spc */
+#define CTRL_resume 0x0500 /* resume spc clock */
+#define CTRL_resume_spc 0x0001 /* resume spc soft pause */
+#define CTRL_flush 0x0600 /* flush all buffers */
+#define CTRL_int_enable 0x0700 /* enable status change ints */
+#define CTRL_buff_free 0x0800 /* buffer remain count */
+#define CTRL_buff_used 0x0900 /* buffer in use */
+#define CTRL_speech 0x0a00 /* immediate speech change */
+#define CTRL_SP_voice 0x0001 /* voice change */
+#define CTRL_SP_rate 0x0002 /* rate change */
+#define CTRL_SP_comma 0x0003 /* comma pause change */
+#define CTRL_SP_period 0x0004 /* period pause change */
+#define CTRL_SP_rate_delta 0x0005 /* delta rate change */
+#define CTRL_SP_get_param 0x0006 /* return the desired parameter */
+#define CTRL_last_index 0x0b00 /* get last index spoken */
+#define CTRL_io_priority 0x0c00 /* change i/o priority */
+#define CTRL_free_mem 0x0d00 /* get free paragraphs on module */
+#define CTRL_get_lang 0x0e00 /* return bit mask of loaded languages */
+#define CMD_test 0x2000 /* self-test request */
#define TEST_mask 0x0F00 /* isolate test field */
#define TEST_null 0x0000 /* no test requested */
#define TEST_isa_int 0x0100 /* assert isa irq */
@@ -95,25 +93,25 @@
#define TEST_seg 0x0300 /* set peek/poke segment */
#define TEST_off 0x0400 /* set peek/poke offset */
#define TEST_peek 0x0500 /* data out == *peek */
-#define TEST_poke 0x0600 /* *peek == data in */
+#define TEST_poke 0x0600 /* peek == data in */
#define TEST_sub_code 0x00FF /* user defined test sub codes */
#define CMD_id 0x3000 /* return software id */
#define ID_null 0x0000 /* null id */
#define ID_kernel 0x0100 /* kernel code executing */
#define ID_boot 0x0200 /* boot code executing */
-#define CMD_dma 0x4000 /* force a dma start */
-#define CMD_reset 0x5000 /* reset module status */
-#define CMD_sync 0x6000 /* kernel sync command */
-#define CMD_char_in 0x7000 /* single character send */
-#define CMD_char_out 0x8000 /* single character get */
-#define CHAR_count_1 0x0100 /* one char in cmd_low */
-#define CHAR_count_2 0x0200 /* the second in data_low */
-#define CHAR_count_3 0x0300 /* the third in data_high */
-#define CMD_spc_mode 0x9000 /* change spc mode */
-#define CMD_spc_to_text 0x0100 /* set to text mode */
-#define CMD_spc_to_digit 0x0200 /* set to digital mode */
-#define CMD_spc_rate 0x0400 /* change spc data rate */
-#define CMD_error 0xf000 /* severe error */
+#define CMD_dma 0x4000 /* force a dma start */
+#define CMD_reset 0x5000 /* reset module status */
+#define CMD_sync 0x6000 /* kernel sync command */
+#define CMD_char_in 0x7000 /* single character send */
+#define CMD_char_out 0x8000 /* single character get */
+#define CHAR_count_1 0x0100 /* one char in cmd_low */
+#define CHAR_count_2 0x0200 /* the second in data_low */
+#define CHAR_count_3 0x0300 /* the third in data_high */
+#define CMD_spc_mode 0x9000 /* change spc mode */
+#define CMD_spc_to_text 0x0100 /* set to text mode */
+#define CMD_spc_to_digit 0x0200 /* set to digital mode */
+#define CMD_spc_rate 0x0400 /* change spc data rate */
+#define CMD_error 0xf000 /* severe error */

enum { PRIMARY_DIC = 0, USER_DIC, COMMAND_DIC, ABBREV_DIC };

@@ -157,9 +155,8 @@ static struct var_t vars[] = {
V_LAST_VAR
};

-/*
- * These attributes will appear in /sys/accessibility/speakup/decpc.
- */
+/* These attributes will appear in /sys/accessibility/speakup/decpc. */
+
static struct kobj_attribute caps_start_attribute =
__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
static struct kobj_attribute caps_stop_attribute =
--
2.1.4