2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 01:04:08 +08:00

staging: speakup: Fix warning reported by checkpatch

This patch fixes the checkpatch.pl warnings:
WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments use * on subsequent lines

Signed-off-by: Aleksey Fedotov <lexa@cfotr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Aleksei Fedotov 2015-08-14 22:34:37 +03:00 committed by Greg Kroah-Hartman
parent ad9f92d270
commit 13d825edd4
12 changed files with 66 additions and 44 deletions

View File

@ -63,7 +63,8 @@ void synth_buffer_add(char ch)
{
if (!synth->alive) {
/* This makes sure that we won't stop TTYs if there is no synth
* to restart them */
* to restart them
*/
return;
}
if (synth_buffer_free() <= 100) {

View File

@ -1,5 +1,6 @@
/* Internationalization implementation. Includes definitions of English
* string arrays, and the i18n pointer. */
* string arrays, and the i18n pointer.
*/
#include <linux/slab.h> /* For kmalloc. */
#include <linux/ctype.h>

View File

@ -240,7 +240,8 @@ static ssize_t keymap_show(struct kobject *kobj, struct kobj_attribute *attr,
cp += sprintf(cp, "%d, %d, %d,\n", KEY_MAP_VER, num_keys, nstates);
cp1 += 2; /* now pointing at shift states */
/* dump num_keys+1 as first row is shift states + flags,
* each subsequent row is key + states */
* each subsequent row is key + states
*/
for (n = 0; n <= num_keys; n++) {
for (i = 0; i <= nstates; i++) {
ch = *cp1++;

View File

@ -128,7 +128,8 @@ static char *phonetic[] = {
/* array of 256 char pointers (one for each character description)
* initialized to default_chars and user selectable via
* /proc/speakup/characters */
* /proc/speakup/characters
*/
char *spk_characters[256];
char *spk_default_chars[256] = {
@ -194,7 +195,8 @@ char *spk_default_chars[256] = {
/* array of 256 u_short (one for each character)
* initialized to default_chartab and user selectable via
* /sys/module/speakup/parameters/chartab */
* /sys/module/speakup/parameters/chartab
*/
u_short spk_chartab[256];
static u_short default_chartab[256] = {
@ -540,7 +542,8 @@ static void say_next_char(struct vc_data *vc)
* see if there is a word starting on the next position to the right
* and return that word if it exists. If it does not exist it will
* move left to the beginning of any previous word on the line or the
* beginning off the line whichever comes first.. */
* beginning off the line whichever comes first..
*/
static u_long get_word(struct vc_data *vc)
{
@ -1113,7 +1116,8 @@ static void spkup_write(const char *in_buf, int count)
* suppress multiple to get rid of long pauses and
* clear repeat count
* so if someone has
* repeats on you don't get nothing repeated count */
* repeats on you don't get nothing repeated count
*/
if (ch != old_ch)
synth_printf("%c", ch);
else
@ -1509,7 +1513,8 @@ static void do_handle_cursor(struct vc_data *vc, u_char value, char up_flag)
if (spk_no_intr)
spk_do_flush();
/* the key press flushes if !no_inter but we want to flush on cursor
* moves regardless of no_inter state */
* moves regardless of no_inter state
*/
is_cursor = value + 1;
old_cursor_pos = vc->vc_pos;
old_cursor_x = vc->vc_x;

View File

@ -114,7 +114,8 @@ int speakup_set_selection(struct tty_struct *tty)
obp = bp;
if (!((i + 2) % vc->vc_size_row)) {
/* strip trailing blanks from line and add newline,
unless non-space at end of line. */
* unless non-space at end of line.
*/
if (obp != bp) {
bp = obp;
*bp++ = '\r';

View File

@ -51,7 +51,8 @@ const struct old_serial_port *spk_serial_init(int index)
}
/* Disable UART interrupts, set DTR and RTS high
* and set speed. */
* and set speed.
*/
outb(cval | UART_LCR_DLAB, ser->port + UART_LCR); /* set DLAB */
outb(quot & 0xff, ser->port + UART_DLL); /* LS of divisor */
outb(quot >> 8, ser->port + UART_DLM); /* MS of divisor */
@ -145,7 +146,8 @@ int spk_wait_for_xmitr(void)
synth->alive = 0;
/* No synth any more, so nobody will restart TTYs, and we thus
* need to do it ourselves. Now that there is no synth we can
* let application flood anyway */
* let application flood anyway
*/
speakup_start_ttys();
timeouts = 0;
return 0;
@ -163,7 +165,8 @@ int spk_wait_for_xmitr(void)
/* CTS */
if (--tmout == 0) {
/* pr_warn("%s: timed out (cts)\n",
* synth->long_name); */
* synth->long_name);
*/
timeouts++;
return 0;
}
@ -217,4 +220,3 @@ void spk_serial_release(void)
speakup_info.port_tts = 0;
}
EXPORT_SYMBOL_GPL(spk_serial_release);

View File

@ -6,10 +6,12 @@
/* Port Status Flags */
#define SYNTH_READABLE 0x01 /* mask for bit which is nonzero if a
byte can be read from the data port */
* byte can be read from the data port
*/
#define SYNTH_WRITABLE 0x02 /* mask for RDY bit, which when set to
1, indicates the data port is ready
to accept a byte of data. */
* 1, indicates the data port is ready
* to accept a byte of data.
*/
#define SYNTH_QUIET 'S' /* synth is not speaking */
#define SYNTH_FULL 'F' /* synth is full. */
#define SYNTH_ALMOST_EMPTY 'M' /* synth has less than 2 seconds of text left */

View File

@ -88,8 +88,9 @@
#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 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 */
@ -500,4 +501,3 @@ MODULE_AUTHOR("David Borowski");
MODULE_DESCRIPTION("Speakup support for DECtalk PC synthesizers");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);

View File

@ -4,31 +4,37 @@
#define SYNTH_CLEAR 0x18 /* stops speech */
/* TTS Port Status Flags */
#define TTS_READABLE 0x80 /* mask for bit which is nonzero if a
byte can be read from the TTS port */
* byte can be read from the TTS port
*/
#define TTS_SPEAKING 0x40 /* mask for SYNC bit, which is nonzero
while DoubleTalk is producing
output with TTS, PCM or CVSD
synthesizers or tone generators
(that is, all but LPC) */
* while DoubleTalk is producing
* output with TTS, PCM or CVSD
* synthesizers or tone generators
* (that is, all but LPC)
*/
#define TTS_SPEAKING2 0x20 /* mask for SYNC2 bit,
which falls to zero up to 0.4 sec
before speech stops */
* which falls to zero up to 0.4 sec
* before speech stops
*/
#define TTS_WRITABLE 0x10 /* mask for RDY bit, which when set to
1, indicates the TTS port is ready
to accept a byte of data. The RDY
bit goes zero 2-3 usec after
writing, and goes 1 again 180-190
usec later. */
* 1, indicates the TTS port is ready
* to accept a byte of data. The RDY
* bit goes zero 2-3 usec after
* writing, and goes 1 again 180-190
* usec later.
*/
#define TTS_ALMOST_FULL 0x08 /* mask for AF bit: When set to 1,
indicates that less than 300 bytes
are available in the TTS input
buffer. AF is always 0 in the PCM,
TGN and CVSD modes. */
* indicates that less than 300 bytes
* are available in the TTS input
* buffer. AF is always 0 in the PCM,
* TGN and CVSD modes.
*/
#define TTS_ALMOST_EMPTY 0x04 /* mask for AE bit: When set to 1,
indicates that less than 300 bytes
are remaining in DoubleTalk's input
(TTS or PCM) buffer. AE is always 1
in the TGN and CVSD modes. */
* indicates that less than 300 bytes
* are remaining in DoubleTalk's input
* (TTS or PCM) buffer. AE is always 1
* in the TGN and CVSD modes.
*/
/* data returned by Interrogate command */
struct synth_settings {
@ -45,10 +51,12 @@ struct synth_settings {
u_char ext_dict_loaded; /* 1=exception dictionary loaded */
u_char ext_dict_status; /* 1=exception dictionary enabled */
u_char free_ram; /* # pages (truncated) remaining for
* text buffer */
* text buffer
*/
u_char articulation; /* nA; 0-9 */
u_char reverb; /* nR; 0-9 */
u_char eob; /* 7Fh value indicating end of
* parameter block */
* parameter block
*/
u_char has_indexing; /* nonzero if indexing is implemented */
};

View File

@ -356,4 +356,3 @@ MODULE_AUTHOR("Kirk Reiser <kirk@braille.uwo.ca>");
MODULE_DESCRIPTION("Speakup userspace software synthesizer support");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);

View File

@ -48,7 +48,8 @@ int speakup_thread(void *data)
kd_mksound(our_sound.freq, our_sound.jiffies);
if (synth && synth->catch_up && synth->alive) {
/* It is up to the callee to take the lock, so that it
* can sleep whenever it likes */
* can sleep whenever it likes
*/
synth->catch_up(synth);
}

View File

@ -269,7 +269,8 @@ int spk_set_string_var(const char *page, struct st_var_header *var, int len)
/* spk_set_mask_bits sets or clears the punc/delim/repeat bits,
* if input is null uses the defaults.
* values for how: 0 clears bits of chars supplied,
* 1 clears allk, 2 sets bits for chars */
* 1 clears allk, 2 sets bits for chars
*/
int spk_set_mask_bits(const char *input, const int which, const int how)
{
u_char *cp;