[PATCH] staging: rtl8192e: Aligning the * on each line in block comments
This patch fixes the issue by aligning the * on each line in block comments. Signed-off-by: Arushi --- drivers/staging/rtl8192e/dot11d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h index aac395f26652..623075cf0c05 100644 --- a/drivers/staging/rtl8192e/dot11d.h +++ b/drivers/staging/rtl8192e/dot11d.h @@ -11,7 +11,7 @@ * * Contact Information: * wlanfae -**/ + **/ #ifndef __INC_DOT11D_H #define __INC_DOT11D_H -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8192e: Aligning the * on each line in block comments
This patch fixes the issue by aligning the * on each line in block comments. Signed-off-by: Arushi --- drivers/staging/speakup/fakekey.c| 10 +- drivers/staging/speakup/i18n.c | 14 +++--- drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/speakup_acntsa.c | 2 +- drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_decext.c | 2 +- drivers/staging/speakup/speakup_decpc.c | 4 ++-- drivers/staging/speakup/speakup_dtlk.c | 2 +- drivers/staging/speakup/speakup_dtlk.h | 10 +- drivers/staging/speakup/speakup_ltlk.c | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/staging/speakup/fakekey.c b/drivers/staging/speakup/fakekey.c index 8f058b42f68d..d76da0a1382c 100644 --- a/drivers/staging/speakup/fakekey.c +++ b/drivers/staging/speakup/fakekey.c @@ -63,8 +63,8 @@ void speakup_remove_virtual_keyboard(void) } /* -* Send a simulated down-arrow to the application. -*/ + * Send a simulated down-arrow to the application. + */ void speakup_fake_down_arrow(void) { unsigned long flags; @@ -87,9 +87,9 @@ void speakup_fake_down_arrow(void) } /* -* Are we handling a simulated keypress on the current CPU? -* Returns a boolean. -*/ + * Are we handling a simulated keypress on the current CPU? + * Returns a boolean. + */ bool speakup_fake_key_pressed(void) { return this_cpu_read(reporting_keystroke); diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index 8960079e4d60..2f9b3df7f78d 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -401,7 +401,7 @@ char *spk_msg_get(enum msg_index_t index) * Finds the start of the next format specifier in the argument string. * Return value: pointer to start of format * specifier, or NULL if no specifier exists. -*/ + */ static char *next_specifier(char *input) { int found = 0; @@ -450,7 +450,7 @@ static char *skip_width(char *input) * Note that this code only accepts a handful of conversion specifiers: * c d s x and ld. Not accidental; these are exactly the ones used in * the default group of formatted messages. -*/ + */ static char *skip_conversion(char *input) { if ((input[0] == 'l') && (input[1] == 'd')) @@ -463,7 +463,7 @@ static char *skip_conversion(char *input) /* * Function: find_specifier_end * Return a pointer to the end of the format specifier. -*/ + */ static char *find_specifier_end(char *input) { input++;/* Advance over %. */ @@ -478,7 +478,7 @@ static char *find_specifier_end(char *input) * Compare the format specifiers pointed to by *input1 and *input2. * Return 1 if they are the same, 0 otherwise. Advance *input1 and *input2 * so that they point to the character following the end of the specifier. -*/ + */ static int compare_specifiers(char **input1, char **input2) { int same = 0; @@ -500,7 +500,7 @@ static int compare_specifiers(char **input1, char **input2) * Check that two format strings contain the same number of format specifiers, * and that the order of specifiers is the same in both strings. * Return 1 if the condition holds, 0 if it doesn't. -*/ + */ static int fmt_validate(char *template, char *user) { int valid = 1; @@ -537,7 +537,7 @@ static int fmt_validate(char *template, char *user) * Failure conditions: * -EINVAL - Invalid format specifiers in formatted message or illegal index. * -ENOMEM - Unable to allocate memory. -*/ + */ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) { int rc = 0; @@ -573,7 +573,7 @@ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) /* * Find a message group, given its name. Return a pointer to the structure * if found, or NULL otherwise. -*/ + */ struct msg_group_t *spk_find_msg_group(const char *group_name) { struct msg_group_t *group = NULL; diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index bf539d38..c2f70ef5b9b3 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -16,7 +16,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -*/ + */ #include #include diff --git a/drivers/staging/speakup/speakup_acntsa.c b/drivers/staging/speakup/speakup_acntsa.c index b4e49cdd2014..b2e352712766 100644 --- a/drivers/staging/speakup/speakup_acntsa.c +++ b/drivers/staging/speakup/speakup_acntsa.c @@ -1,6 +1,6 @@ /* * originally written by: Kirk Reiser -* this version considerably modified by David Borowski, david...@rogers.com + * this version considerably modified by David Borowski, david...@rogers.com * * Copyright (C) 1998-99 Kirk Reiser. * Copyright (C)
[PATCH v2] staging: rtl8192e: Aligning the * on each line in block comments
This patch fixes the issue by aligning the * on each line in block comments. Signed-off-by: Arushi --- drivers/staging/speakup/fakekey.c| 10 +- drivers/staging/speakup/i18n.c | 14 +++--- drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/speakup_acntsa.c | 2 +- drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_decext.c | 2 +- drivers/staging/speakup/speakup_decpc.c | 4 ++-- drivers/staging/speakup/speakup_dtlk.c | 2 +- drivers/staging/speakup/speakup_dtlk.h | 10 +- drivers/staging/speakup/speakup_ltlk.c | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/staging/speakup/fakekey.c b/drivers/staging/speakup/fakekey.c index 8f058b42f68d..d76da0a1382c 100644 --- a/drivers/staging/speakup/fakekey.c +++ b/drivers/staging/speakup/fakekey.c @@ -63,8 +63,8 @@ void speakup_remove_virtual_keyboard(void) } /* -* Send a simulated down-arrow to the application. -*/ + * Send a simulated down-arrow to the application. + */ void speakup_fake_down_arrow(void) { unsigned long flags; @@ -87,9 +87,9 @@ void speakup_fake_down_arrow(void) } /* -* Are we handling a simulated keypress on the current CPU? -* Returns a boolean. -*/ + * Are we handling a simulated keypress on the current CPU? + * Returns a boolean. + */ bool speakup_fake_key_pressed(void) { return this_cpu_read(reporting_keystroke); diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index 8960079e4d60..2f9b3df7f78d 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -401,7 +401,7 @@ char *spk_msg_get(enum msg_index_t index) * Finds the start of the next format specifier in the argument string. * Return value: pointer to start of format * specifier, or NULL if no specifier exists. -*/ + */ static char *next_specifier(char *input) { int found = 0; @@ -450,7 +450,7 @@ static char *skip_width(char *input) * Note that this code only accepts a handful of conversion specifiers: * c d s x and ld. Not accidental; these are exactly the ones used in * the default group of formatted messages. -*/ + */ static char *skip_conversion(char *input) { if ((input[0] == 'l') && (input[1] == 'd')) @@ -463,7 +463,7 @@ static char *skip_conversion(char *input) /* * Function: find_specifier_end * Return a pointer to the end of the format specifier. -*/ + */ static char *find_specifier_end(char *input) { input++;/* Advance over %. */ @@ -478,7 +478,7 @@ static char *find_specifier_end(char *input) * Compare the format specifiers pointed to by *input1 and *input2. * Return 1 if they are the same, 0 otherwise. Advance *input1 and *input2 * so that they point to the character following the end of the specifier. -*/ + */ static int compare_specifiers(char **input1, char **input2) { int same = 0; @@ -500,7 +500,7 @@ static int compare_specifiers(char **input1, char **input2) * Check that two format strings contain the same number of format specifiers, * and that the order of specifiers is the same in both strings. * Return 1 if the condition holds, 0 if it doesn't. -*/ + */ static int fmt_validate(char *template, char *user) { int valid = 1; @@ -537,7 +537,7 @@ static int fmt_validate(char *template, char *user) * Failure conditions: * -EINVAL - Invalid format specifiers in formatted message or illegal index. * -ENOMEM - Unable to allocate memory. -*/ + */ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) { int rc = 0; @@ -573,7 +573,7 @@ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) /* * Find a message group, given its name. Return a pointer to the structure * if found, or NULL otherwise. -*/ + */ struct msg_group_t *spk_find_msg_group(const char *group_name) { struct msg_group_t *group = NULL; diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index bf539d38..c2f70ef5b9b3 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -16,7 +16,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -*/ + */ #include #include diff --git a/drivers/staging/speakup/speakup_acntsa.c b/drivers/staging/speakup/speakup_acntsa.c index b4e49cdd2014..b2e352712766 100644 --- a/drivers/staging/speakup/speakup_acntsa.c +++ b/drivers/staging/speakup/speakup_acntsa.c @@ -1,6 +1,6 @@ /* * originally written by: Kirk Reiser -* this version considerably modified by David Borowski, david...@rogers.com + * this version considerably modified by David Borowski, david...@rogers.com * * Copyright (C) 1998-99 Kirk Reiser. * Copyright (C)
[PATCH v3] staging: rtl8192e: Aligning the * on each line in block comments
This patch fixes the issue by aligning the * on each line in block comments. [Patch v1] is rejected as the changes done is not following the linux coding style and [Patch v2] is rejected because forgot to mention the cause of rejection of [Patch v1]. Signed-off-by: Arushi -- Changes done from the [PATCH v1] is diff --git a/drivers/staging/speakup/speakup_decpc.c b/drivers/staging/speakup/speakup_decpc.c index ac299a399e45..6bf38e49a96d 100644 --- a/drivers/staging/speakup/speakup_decpc.c +++ b/drivers/staging/speakup/speakup_decpc.c @@ -85,8 +85,8 @@ #defineCTRL_io_priority0x0c00 /* change i/o priority */ #defineCTRL_free_mem 0x0d00 /* get free paragraphs on module */ #defineCTRL_get_lang 0x0e00 /* return bit mask of loaded -* languages -*/ +* languages +*/ #defineCMD_test0x2000 /* self-test request */ #defineTEST_mask 0x0F00 /* isolate test field */ #defineTEST_null 0x /* no test requested */ diff --git a/drivers/staging/speakup/speakup_dtlk.h b/drivers/staging/speakup/speakup_dtlk.h index 46d885fcfb20..b3b3cfc3db07 100644 --- a/drivers/staging/speakup/speakup_dtlk.h +++ b/drivers/staging/speakup/speakup_dtlk.h @@ -24,11 +24,11 @@ * usec later. */ #define TTS_ALMOST_FULL0x08/* 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 --- drivers/staging/speakup/fakekey.c| 10 +- drivers/staging/speakup/i18n.c | 14 +++--- drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/speakup_acntsa.c | 2 +- drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_decext.c | 2 +- drivers/staging/speakup/speakup_decpc.c | 4 ++-- drivers/staging/speakup/speakup_dtlk.c | 2 +- drivers/staging/speakup/speakup_dtlk.h | 10 +- drivers/staging/speakup/speakup_ltlk.c | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/staging/speakup/fakekey.c b/drivers/staging/speakup/fakekey.c index 8f058b42f68d..d76da0a1382c 100644 --- a/drivers/staging/speakup/fakekey.c +++ b/drivers/staging/speakup/fakekey.c @@ -63,8 +63,8 @@ void speakup_remove_virtual_keyboard(void) } /* -* Send a simulated down-arrow to the application. -*/ + * Send a simulated down-arrow to the application. + */ void speakup_fake_down_arrow(void) { unsigned long flags; @@ -87,9 +87,9 @@ void speakup_fake_down_arrow(void) } /* -* Are we handling a simulated keypress on the current CPU? -* Returns a boolean. -*/ + * Are we handling a simulated keypress on the current CPU? + * Returns a boolean. + */ bool speakup_fake_key_pressed(void) { return this_cpu_read(reporting_keystroke); diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index 8960079e4d60..2f9b3df7f78d 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -401,7 +401,7 @@ char *spk_msg_get(enum msg_index_t index) * Finds the start of the next format specifier in the argument string. * Return value: pointer to start of format * specifier, or NULL if no specifier exists. -*/ + */ static char *next_specifier(char *input) { int found = 0; @@ -450,7 +450,7 @@ static char *skip_width(char *input) * Note that this code only accepts a handful of conversion specifiers: * c d s x and ld. Not accidental; these are exactly the ones used in * the default group of formatted messages. -*/ + */ static char *skip_conversion(char *input) { if ((input[0] == 'l') && (input[1] == 'd')) @@ -463,7 +463,7 @@ static
[PATCH v4] staging: rtl8192e: Aligning the * on each line in block comments
This patch fixes the issue by aligning the * on each line in block comments. [Patch v1] is rejected as the changes done is not following the linux coding style and [Patch v2] is rejected because forgot to mention the cause of rejection of [Patch v1].The cause of rejection of [Patch v3] is that the mention of the cause was not in the correct format. Signed-off-by: Arushi --- In the [patch v1] to allign the * on each line in block was not correct as it is also not following the correct coding style of kernel so it got rejected and the details of all the other patch versions is given above. --- drivers/staging/speakup/fakekey.c| 10 +- drivers/staging/speakup/i18n.c | 14 +++--- drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/speakup_acntsa.c | 2 +- drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_decext.c | 2 +- drivers/staging/speakup/speakup_decpc.c | 4 ++-- drivers/staging/speakup/speakup_dtlk.c | 2 +- drivers/staging/speakup/speakup_dtlk.h | 10 +- drivers/staging/speakup/speakup_ltlk.c | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/staging/speakup/fakekey.c b/drivers/staging/speakup/fakekey.c index 8f058b42f68d..d76da0a1382c 100644 --- a/drivers/staging/speakup/fakekey.c +++ b/drivers/staging/speakup/fakekey.c @@ -63,8 +63,8 @@ void speakup_remove_virtual_keyboard(void) } /* -* Send a simulated down-arrow to the application. -*/ + * Send a simulated down-arrow to the application. + */ void speakup_fake_down_arrow(void) { unsigned long flags; @@ -87,9 +87,9 @@ void speakup_fake_down_arrow(void) } /* -* Are we handling a simulated keypress on the current CPU? -* Returns a boolean. -*/ + * Are we handling a simulated keypress on the current CPU? + * Returns a boolean. + */ bool speakup_fake_key_pressed(void) { return this_cpu_read(reporting_keystroke); diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index 8960079e4d60..2f9b3df7f78d 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -401,7 +401,7 @@ char *spk_msg_get(enum msg_index_t index) * Finds the start of the next format specifier in the argument string. * Return value: pointer to start of format * specifier, or NULL if no specifier exists. -*/ + */ static char *next_specifier(char *input) { int found = 0; @@ -450,7 +450,7 @@ static char *skip_width(char *input) * Note that this code only accepts a handful of conversion specifiers: * c d s x and ld. Not accidental; these are exactly the ones used in * the default group of formatted messages. -*/ + */ static char *skip_conversion(char *input) { if ((input[0] == 'l') && (input[1] == 'd')) @@ -463,7 +463,7 @@ static char *skip_conversion(char *input) /* * Function: find_specifier_end * Return a pointer to the end of the format specifier. -*/ + */ static char *find_specifier_end(char *input) { input++;/* Advance over %. */ @@ -478,7 +478,7 @@ static char *find_specifier_end(char *input) * Compare the format specifiers pointed to by *input1 and *input2. * Return 1 if they are the same, 0 otherwise. Advance *input1 and *input2 * so that they point to the character following the end of the specifier. -*/ + */ static int compare_specifiers(char **input1, char **input2) { int same = 0; @@ -500,7 +500,7 @@ static int compare_specifiers(char **input1, char **input2) * Check that two format strings contain the same number of format specifiers, * and that the order of specifiers is the same in both strings. * Return 1 if the condition holds, 0 if it doesn't. -*/ + */ static int fmt_validate(char *template, char *user) { int valid = 1; @@ -537,7 +537,7 @@ static int fmt_validate(char *template, char *user) * Failure conditions: * -EINVAL - Invalid format specifiers in formatted message or illegal index. * -ENOMEM - Unable to allocate memory. -*/ + */ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) { int rc = 0; @@ -573,7 +573,7 @@ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) /* * Find a message group, given its name. Return a pointer to the structure * if found, or NULL otherwise. -*/ + */ struct msg_group_t *spk_find_msg_group(const char *group_name) { struct msg_group_t *group = NULL; diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index bf539d38..c2f70ef5b9b3 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -16,7 +16,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -*/ + */ #include #include dif
[PATCH v4] staging: rtl8192e: Aligning the * on each line in block comments
This patch fixes the issue by aligning the * on each line in block comments. [Patch v1] is rejected as the changes done is not following the linux coding style and [Patch v2] is rejected because forgot to mention the cause of rejection of [Patch v1].The cause of rejection of [Patch v3] is that the mention of the cause was not in the correct format. Signed-off-by: Arushi --- In the [patch v1] to allign the * on each line in block was not correct as it is also not following the correct coding style of kernel so it got rejected and the details of all the other patch versions is given above. --- drivers/staging/speakup/fakekey.c| 10 +- drivers/staging/speakup/i18n.c | 14 +++--- drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/speakup_acntsa.c | 2 +- drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_decext.c | 2 +- drivers/staging/speakup/speakup_decpc.c | 4 ++-- drivers/staging/speakup/speakup_dtlk.c | 2 +- drivers/staging/speakup/speakup_dtlk.h | 10 +- drivers/staging/speakup/speakup_ltlk.c | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/staging/speakup/fakekey.c b/drivers/staging/speakup/fakekey.c index 8f058b42f68d..d76da0a1382c 100644 --- a/drivers/staging/speakup/fakekey.c +++ b/drivers/staging/speakup/fakekey.c @@ -63,8 +63,8 @@ void speakup_remove_virtual_keyboard(void) } /* -* Send a simulated down-arrow to the application. -*/ + * Send a simulated down-arrow to the application. + */ void speakup_fake_down_arrow(void) { unsigned long flags; @@ -87,9 +87,9 @@ void speakup_fake_down_arrow(void) } /* -* Are we handling a simulated keypress on the current CPU? -* Returns a boolean. -*/ + * Are we handling a simulated keypress on the current CPU? + * Returns a boolean. + */ bool speakup_fake_key_pressed(void) { return this_cpu_read(reporting_keystroke); diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index 8960079e4d60..2f9b3df7f78d 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -401,7 +401,7 @@ char *spk_msg_get(enum msg_index_t index) * Finds the start of the next format specifier in the argument string. * Return value: pointer to start of format * specifier, or NULL if no specifier exists. -*/ + */ static char *next_specifier(char *input) { int found = 0; @@ -450,7 +450,7 @@ static char *skip_width(char *input) * Note that this code only accepts a handful of conversion specifiers: * c d s x and ld. Not accidental; these are exactly the ones used in * the default group of formatted messages. -*/ + */ static char *skip_conversion(char *input) { if ((input[0] == 'l') && (input[1] == 'd')) @@ -463,7 +463,7 @@ static char *skip_conversion(char *input) /* * Function: find_specifier_end * Return a pointer to the end of the format specifier. -*/ + */ static char *find_specifier_end(char *input) { input++;/* Advance over %. */ @@ -478,7 +478,7 @@ static char *find_specifier_end(char *input) * Compare the format specifiers pointed to by *input1 and *input2. * Return 1 if they are the same, 0 otherwise. Advance *input1 and *input2 * so that they point to the character following the end of the specifier. -*/ + */ static int compare_specifiers(char **input1, char **input2) { int same = 0; @@ -500,7 +500,7 @@ static int compare_specifiers(char **input1, char **input2) * Check that two format strings contain the same number of format specifiers, * and that the order of specifiers is the same in both strings. * Return 1 if the condition holds, 0 if it doesn't. -*/ + */ static int fmt_validate(char *template, char *user) { int valid = 1; @@ -537,7 +537,7 @@ static int fmt_validate(char *template, char *user) * Failure conditions: * -EINVAL - Invalid format specifiers in formatted message or illegal index. * -ENOMEM - Unable to allocate memory. -*/ + */ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) { int rc = 0; @@ -573,7 +573,7 @@ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) /* * Find a message group, given its name. Return a pointer to the structure * if found, or NULL otherwise. -*/ + */ struct msg_group_t *spk_find_msg_group(const char *group_name) { struct msg_group_t *group = NULL; diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index bf539d38..c2f70ef5b9b3 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -16,7 +16,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -*/ + */ #include #include dif
[PATCH] staging: rtl8192e: Aligning the * on each line in block comments
This patch fixes the issue by aligning the * on each line in block comments. Signed-off-by: Arushi --- [Patch v1] is rejected as the changes done is not correct and is not following the linux kernel coding style in file drivers/staging/speakup/speakup_decpc.c as * on each line in block was not correctly alligned.[Patch v2] is rejected for not to mention the cause of rejection of [Patch v1] but warnings is corrected.The cause of rejection of [Patch v3] is that the mention of the cause was not in the correct format and is not descriptive.In [Patch v4] didn't send patch message to all the list members so asked to again repatch it. --- drivers/staging/speakup/fakekey.c| 10 +- drivers/staging/speakup/i18n.c | 14 +++--- drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/speakup_acntsa.c | 2 +- drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_decext.c | 2 +- drivers/staging/speakup/speakup_decpc.c | 4 ++-- drivers/staging/speakup/speakup_dtlk.c | 2 +- drivers/staging/speakup/speakup_dtlk.h | 10 +- drivers/staging/speakup/speakup_ltlk.c | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/staging/speakup/fakekey.c b/drivers/staging/speakup/fakekey.c index 8f058b42f68d..d76da0a1382c 100644 --- a/drivers/staging/speakup/fakekey.c +++ b/drivers/staging/speakup/fakekey.c @@ -63,8 +63,8 @@ void speakup_remove_virtual_keyboard(void) } /* -* Send a simulated down-arrow to the application. -*/ + * Send a simulated down-arrow to the application. + */ void speakup_fake_down_arrow(void) { unsigned long flags; @@ -87,9 +87,9 @@ void speakup_fake_down_arrow(void) } /* -* Are we handling a simulated keypress on the current CPU? -* Returns a boolean. -*/ + * Are we handling a simulated keypress on the current CPU? + * Returns a boolean. + */ bool speakup_fake_key_pressed(void) { return this_cpu_read(reporting_keystroke); diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index 8960079e4d60..2f9b3df7f78d 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -401,7 +401,7 @@ char *spk_msg_get(enum msg_index_t index) * Finds the start of the next format specifier in the argument string. * Return value: pointer to start of format * specifier, or NULL if no specifier exists. -*/ + */ static char *next_specifier(char *input) { int found = 0; @@ -450,7 +450,7 @@ static char *skip_width(char *input) * Note that this code only accepts a handful of conversion specifiers: * c d s x and ld. Not accidental; these are exactly the ones used in * the default group of formatted messages. -*/ + */ static char *skip_conversion(char *input) { if ((input[0] == 'l') && (input[1] == 'd')) @@ -463,7 +463,7 @@ static char *skip_conversion(char *input) /* * Function: find_specifier_end * Return a pointer to the end of the format specifier. -*/ + */ static char *find_specifier_end(char *input) { input++;/* Advance over %. */ @@ -478,7 +478,7 @@ static char *find_specifier_end(char *input) * Compare the format specifiers pointed to by *input1 and *input2. * Return 1 if they are the same, 0 otherwise. Advance *input1 and *input2 * so that they point to the character following the end of the specifier. -*/ + */ static int compare_specifiers(char **input1, char **input2) { int same = 0; @@ -500,7 +500,7 @@ static int compare_specifiers(char **input1, char **input2) * Check that two format strings contain the same number of format specifiers, * and that the order of specifiers is the same in both strings. * Return 1 if the condition holds, 0 if it doesn't. -*/ + */ static int fmt_validate(char *template, char *user) { int valid = 1; @@ -537,7 +537,7 @@ static int fmt_validate(char *template, char *user) * Failure conditions: * -EINVAL - Invalid format specifiers in formatted message or illegal index. * -ENOMEM - Unable to allocate memory. -*/ + */ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) { int rc = 0; @@ -573,7 +573,7 @@ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) /* * Find a message group, given its name. Return a pointer to the structure * if found, or NULL otherwise. -*/ + */ struct msg_group_t *spk_find_msg_group(const char *group_name) { struct msg_group_t *group = NULL; diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index bf539d38..c2f70ef5b9b3 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -16,7 +16,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details.
[PATCH v5] staging: rtl8192e: Aligning the * on each line in block comments
This patch fixes the issue by aligning the * on each line in block comments. Signed-off-by: Arushi --- [Patch v1] is rejected as the changes done is not correct and is not following the linux kernel coding style in file drivers/staging/speakup/speakup_decpc.c as * on each line in block was not correctly alligned.[Patch v2] is rejected for not to mention the cause of rejection of [Patch v1] but warnings is corrected.The cause of rejection of [Patch v3] is that the mention of the cause was not in the correct format and is not descriptive.In [Patch v4] didn't send patch message to all the list members so asked to again repatch it. --- drivers/staging/speakup/fakekey.c| 10 +- drivers/staging/speakup/i18n.c | 14 +++--- drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/speakup_acntsa.c | 2 +- drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_decext.c | 2 +- drivers/staging/speakup/speakup_decpc.c | 4 ++-- drivers/staging/speakup/speakup_dtlk.c | 2 +- drivers/staging/speakup/speakup_dtlk.h | 10 +- drivers/staging/speakup/speakup_ltlk.c | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/staging/speakup/fakekey.c b/drivers/staging/speakup/fakekey.c index 8f058b42f68d..d76da0a1382c 100644 --- a/drivers/staging/speakup/fakekey.c +++ b/drivers/staging/speakup/fakekey.c @@ -63,8 +63,8 @@ void speakup_remove_virtual_keyboard(void) } /* -* Send a simulated down-arrow to the application. -*/ + * Send a simulated down-arrow to the application. + */ void speakup_fake_down_arrow(void) { unsigned long flags; @@ -87,9 +87,9 @@ void speakup_fake_down_arrow(void) } /* -* Are we handling a simulated keypress on the current CPU? -* Returns a boolean. -*/ + * Are we handling a simulated keypress on the current CPU? + * Returns a boolean. + */ bool speakup_fake_key_pressed(void) { return this_cpu_read(reporting_keystroke); diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index 8960079e4d60..2f9b3df7f78d 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -401,7 +401,7 @@ char *spk_msg_get(enum msg_index_t index) * Finds the start of the next format specifier in the argument string. * Return value: pointer to start of format * specifier, or NULL if no specifier exists. -*/ + */ static char *next_specifier(char *input) { int found = 0; @@ -450,7 +450,7 @@ static char *skip_width(char *input) * Note that this code only accepts a handful of conversion specifiers: * c d s x and ld. Not accidental; these are exactly the ones used in * the default group of formatted messages. -*/ + */ static char *skip_conversion(char *input) { if ((input[0] == 'l') && (input[1] == 'd')) @@ -463,7 +463,7 @@ static char *skip_conversion(char *input) /* * Function: find_specifier_end * Return a pointer to the end of the format specifier. -*/ + */ static char *find_specifier_end(char *input) { input++;/* Advance over %. */ @@ -478,7 +478,7 @@ static char *find_specifier_end(char *input) * Compare the format specifiers pointed to by *input1 and *input2. * Return 1 if they are the same, 0 otherwise. Advance *input1 and *input2 * so that they point to the character following the end of the specifier. -*/ + */ static int compare_specifiers(char **input1, char **input2) { int same = 0; @@ -500,7 +500,7 @@ static int compare_specifiers(char **input1, char **input2) * Check that two format strings contain the same number of format specifiers, * and that the order of specifiers is the same in both strings. * Return 1 if the condition holds, 0 if it doesn't. -*/ + */ static int fmt_validate(char *template, char *user) { int valid = 1; @@ -537,7 +537,7 @@ static int fmt_validate(char *template, char *user) * Failure conditions: * -EINVAL - Invalid format specifiers in formatted message or illegal index. * -ENOMEM - Unable to allocate memory. -*/ + */ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) { int rc = 0; @@ -573,7 +573,7 @@ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) /* * Find a message group, given its name. Return a pointer to the structure * if found, or NULL otherwise. -*/ + */ struct msg_group_t *spk_find_msg_group(const char *group_name) { struct msg_group_t *group = NULL; diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index bf539d38..c2f70ef5b9b3 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -16,7 +16,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details.
[PATCH v6] staging: rtl8192e: Aligning the * on each line in block comments
This patch fixes the issue by aligning the * on each line in block comments. Signed-off-by: Arushi Singhal --- [Patch v1] is rejected as the changes done is not correct and is not following the linux kernel coding style in file drivers/staging/speakup/speakup_decpc.c as * on each line in block was not correctly alligned. [Patch v2] is rejected for not to mention the cause of rejection of [Patch v1] but warnings is corrected. In [Patch v3] mention of the cause was not in the correct format and is not descriptive. In [Patch v4] didn't send patch message to all the list members so asked to again repatch it. In [Patch v5] in description is not given with proper line-feeds. --- drivers/staging/speakup/fakekey.c| 10 +- drivers/staging/speakup/i18n.c | 14 +++--- drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/speakup_acntsa.c | 2 +- drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_decext.c | 2 +- drivers/staging/speakup/speakup_decpc.c | 4 ++-- drivers/staging/speakup/speakup_dtlk.c | 2 +- drivers/staging/speakup/speakup_dtlk.h | 10 +- drivers/staging/speakup/speakup_ltlk.c | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/staging/speakup/fakekey.c b/drivers/staging/speakup/fakekey.c index 8f058b42f68d..d76da0a1382c 100644 --- a/drivers/staging/speakup/fakekey.c +++ b/drivers/staging/speakup/fakekey.c @@ -63,8 +63,8 @@ void speakup_remove_virtual_keyboard(void) } /* -* Send a simulated down-arrow to the application. -*/ + * Send a simulated down-arrow to the application. + */ void speakup_fake_down_arrow(void) { unsigned long flags; @@ -87,9 +87,9 @@ void speakup_fake_down_arrow(void) } /* -* Are we handling a simulated keypress on the current CPU? -* Returns a boolean. -*/ + * Are we handling a simulated keypress on the current CPU? + * Returns a boolean. + */ bool speakup_fake_key_pressed(void) { return this_cpu_read(reporting_keystroke); diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index 8960079e4d60..2f9b3df7f78d 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -401,7 +401,7 @@ char *spk_msg_get(enum msg_index_t index) * Finds the start of the next format specifier in the argument string. * Return value: pointer to start of format * specifier, or NULL if no specifier exists. -*/ + */ static char *next_specifier(char *input) { int found = 0; @@ -450,7 +450,7 @@ static char *skip_width(char *input) * Note that this code only accepts a handful of conversion specifiers: * c d s x and ld. Not accidental; these are exactly the ones used in * the default group of formatted messages. -*/ + */ static char *skip_conversion(char *input) { if ((input[0] == 'l') && (input[1] == 'd')) @@ -463,7 +463,7 @@ static char *skip_conversion(char *input) /* * Function: find_specifier_end * Return a pointer to the end of the format specifier. -*/ + */ static char *find_specifier_end(char *input) { input++;/* Advance over %. */ @@ -478,7 +478,7 @@ static char *find_specifier_end(char *input) * Compare the format specifiers pointed to by *input1 and *input2. * Return 1 if they are the same, 0 otherwise. Advance *input1 and *input2 * so that they point to the character following the end of the specifier. -*/ + */ static int compare_specifiers(char **input1, char **input2) { int same = 0; @@ -500,7 +500,7 @@ static int compare_specifiers(char **input1, char **input2) * Check that two format strings contain the same number of format specifiers, * and that the order of specifiers is the same in both strings. * Return 1 if the condition holds, 0 if it doesn't. -*/ + */ static int fmt_validate(char *template, char *user) { int valid = 1; @@ -537,7 +537,7 @@ static int fmt_validate(char *template, char *user) * Failure conditions: * -EINVAL - Invalid format specifiers in formatted message or illegal index. * -ENOMEM - Unable to allocate memory. -*/ + */ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) { int rc = 0; @@ -573,7 +573,7 @@ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) /* * Find a message group, given its name. Return a pointer to the structure * if found, or NULL otherwise. -*/ + */ struct msg_group_t *spk_find_msg_group(const char *group_name) { struct msg_group_t *group = NULL; diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index bf539d38..c2f70ef5b9b3 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -16,7 +16,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[PATCH] staging:vt6656:baseband.h: fix function definition argument without identifier name issue
Function definitions arguments should also have an identifier name as reported by checkpatch.pl. Signed-off-by: Arushi Singhal --- drivers/staging/vt6655/baseband.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/vt6655/baseband.h b/drivers/staging/vt6655/baseband.h index 8a567c9155b4..c351e03f6ad2 100644 --- a/drivers/staging/vt6655/baseband.h +++ b/drivers/staging/vt6655/baseband.h @@ -75,13 +75,13 @@ void BBvSetShortSlotTime(struct vnt_private *); void BBvSetVGAGainOffset(struct vnt_private *, unsigned char byData); /* VT3253 Baseband */ -bool BBbVT3253Init(struct vnt_private *); -void BBvSoftwareReset(struct vnt_private *); -void BBvPowerSaveModeON(struct vnt_private *); -void BBvPowerSaveModeOFF(struct vnt_private *); -void BBvSetTxAntennaMode(struct vnt_private *, unsigned char byAntennaMode); -void BBvSetRxAntennaMode(struct vnt_private *, unsigned char byAntennaMode); -void BBvSetDeepSleep(struct vnt_private *, unsigned char byLocalID); -void BBvExitDeepSleep(struct vnt_private *, unsigned char byLocalID); +bool BBbVT3253Init(struct vnt_private *priv); +void BBvSoftwareReset(struct vnt_private *priv); +void BBvPowerSaveModeON(struct vnt_private *priv); +void BBvPowerSaveModeOFF(struct vnt_private *priv); +void BBvSetTxAntennaMode(struct vnt_private *priv, unsigned char byAntennaMode); +void BBvSetRxAntennaMode(struct vnt_private *priv, unsigned char byAntennaMode); +void BBvSetDeepSleep(struct vnt_private *priv, unsigned char byLocalID); +void BBvExitDeepSleep(struct vnt_private *priv, unsigned char byLocalID); #endif /* __BASEBAND_H__ */ -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8192e: Aligning the * on each line in block comments
This patch fixes the issue by aligning the * on each line in block comments. Signed-off-by: Arushi Singhal --- --- drivers/staging/speakup/fakekey.c| 10 +- drivers/staging/speakup/i18n.c | 14 +++--- drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/speakup_acntsa.c | 2 +- drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_decext.c | 2 +- drivers/staging/speakup/speakup_decpc.c | 4 ++-- drivers/staging/speakup/speakup_dtlk.c | 2 +- drivers/staging/speakup/speakup_dtlk.h | 10 +- drivers/staging/speakup/speakup_ltlk.c | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/staging/speakup/fakekey.c b/drivers/staging/speakup/fakekey.c index 8f058b42f68d..d76da0a1382c 100644 --- a/drivers/staging/speakup/fakekey.c +++ b/drivers/staging/speakup/fakekey.c @@ -63,8 +63,8 @@ void speakup_remove_virtual_keyboard(void) } /* -* Send a simulated down-arrow to the application. -*/ + * Send a simulated down-arrow to the application. + */ void speakup_fake_down_arrow(void) { unsigned long flags; @@ -87,9 +87,9 @@ void speakup_fake_down_arrow(void) } /* -* Are we handling a simulated keypress on the current CPU? -* Returns a boolean. -*/ + * Are we handling a simulated keypress on the current CPU? + * Returns a boolean. + */ bool speakup_fake_key_pressed(void) { return this_cpu_read(reporting_keystroke); diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index 8960079e4d60..2f9b3df7f78d 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -401,7 +401,7 @@ char *spk_msg_get(enum msg_index_t index) * Finds the start of the next format specifier in the argument string. * Return value: pointer to start of format * specifier, or NULL if no specifier exists. -*/ + */ static char *next_specifier(char *input) { int found = 0; @@ -450,7 +450,7 @@ static char *skip_width(char *input) * Note that this code only accepts a handful of conversion specifiers: * c d s x and ld. Not accidental; these are exactly the ones used in * the default group of formatted messages. -*/ + */ static char *skip_conversion(char *input) { if ((input[0] == 'l') && (input[1] == 'd')) @@ -463,7 +463,7 @@ static char *skip_conversion(char *input) /* * Function: find_specifier_end * Return a pointer to the end of the format specifier. -*/ + */ static char *find_specifier_end(char *input) { input++;/* Advance over %. */ @@ -478,7 +478,7 @@ static char *find_specifier_end(char *input) * Compare the format specifiers pointed to by *input1 and *input2. * Return 1 if they are the same, 0 otherwise. Advance *input1 and *input2 * so that they point to the character following the end of the specifier. -*/ + */ static int compare_specifiers(char **input1, char **input2) { int same = 0; @@ -500,7 +500,7 @@ static int compare_specifiers(char **input1, char **input2) * Check that two format strings contain the same number of format specifiers, * and that the order of specifiers is the same in both strings. * Return 1 if the condition holds, 0 if it doesn't. -*/ + */ static int fmt_validate(char *template, char *user) { int valid = 1; @@ -537,7 +537,7 @@ static int fmt_validate(char *template, char *user) * Failure conditions: * -EINVAL - Invalid format specifiers in formatted message or illegal index. * -ENOMEM - Unable to allocate memory. -*/ + */ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) { int rc = 0; @@ -573,7 +573,7 @@ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) /* * Find a message group, given its name. Return a pointer to the structure * if found, or NULL otherwise. -*/ + */ struct msg_group_t *spk_find_msg_group(const char *group_name) { struct msg_group_t *group = NULL; diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index bf539d38..c2f70ef5b9b3 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -16,7 +16,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -*/ + */ #include #include diff --git a/drivers/staging/speakup/speakup_acntsa.c b/drivers/staging/speakup/speakup_acntsa.c index b4e49cdd2014..b2e352712766 100644 --- a/drivers/staging/speakup/speakup_acntsa.c +++ b/drivers/staging/speakup/speakup_acntsa.c @@ -1,6 +1,6 @@ /* * originally written by: Kirk Reiser -* this version considerably modified by David Borowski, david...@rogers.com + * this version considerably modified by David Borowski, david...@rogers.com * * Copyright (C) 1998-99 Kirk Reiser. * Copyri
[PATCH] staging:nvec:nvec_ps2.c: Prefering kzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof(struct serio)...)
Prefer kzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof(struct serio)...) as reported by checkpatch.pl. Signed-off-by: Arushi Singhal --- drivers/staging/nvec/nvec_ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/nvec/nvec_ps2.c b/drivers/staging/nvec/nvec_ps2.c index 499952c8ef39..3b7bce3ffd19 100644 --- a/drivers/staging/nvec/nvec_ps2.c +++ b/drivers/staging/nvec/nvec_ps2.c @@ -107,7 +107,7 @@ static int nvec_mouse_probe(struct platform_device *pdev) struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent); struct serio *ser_dev; - ser_dev = kzalloc(sizeof(struct serio), GFP_KERNEL); + ser_dev = kzalloc(sizeof(*ser_dev), GFP_KERNEL); if (!ser_dev) return -ENOMEM; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: fwserial: replace 'a' with '(a)' to avoid precedence issues
Macro argument 'a' may be better as '(a)' to avoid precedence issues as reported by checkpatch.pl Signed-off-by: Arushi Singhal --- drivers/staging/fwserial/fwserial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c index 41a49c8194e5..bdfc0a8c7af3 100644 --- a/drivers/staging/fwserial/fwserial.c +++ b/drivers/staging/fwserial/fwserial.c @@ -98,7 +98,7 @@ struct fwtty_transaction { }; }; -#define to_device(a, b)(a->b) +#define to_device((a), b) (a->b) #define fwtty_err(p, fmt, ...) \ dev_err(to_device(p, device), fmt, ##__VA_ARGS__) #define fwtty_info(p, fmt, ...) \ -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: vt6656: Alignment should match open parenthesis
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis" Signed-off-by: Arushi Singhal --- drivers/staging/vt6656/firmware.c | 34 +- drivers/staging/vt6656/key.h | 2 +- drivers/staging/vt6656/rf.c | 12 ++-- drivers/staging/vt6656/usbpipe.c | 12 ++-- drivers/staging/vt6656/wcmd.c | 2 +- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/staging/vt6656/firmware.c b/drivers/staging/vt6656/firmware.c index 1b48f9c86f63..282f665aacfa 100644 --- a/drivers/staging/vt6656/firmware.c +++ b/drivers/staging/vt6656/firmware.c @@ -64,11 +64,11 @@ int vnt_download_firmware(struct vnt_private *priv) memcpy(buffer, fw->data + ii, length); status = vnt_control_out(priv, - 0, - 0x1200+ii, - 0x, - length, - buffer); +0, +0x1200+ii, +0x, +length, +buffer); dev_dbg(dev, "Download firmware...%d %zu\n", ii, fw->size); @@ -94,11 +94,11 @@ int vnt_firmware_branch_to_sram(struct vnt_private *priv) dev_dbg(&priv->usb->dev, ">Branch to Sram\n"); status = vnt_control_out(priv, - 1, - 0x1200, - 0x, - 0, - NULL); +1, +0x1200, +0x, +0, +NULL); return status == STATUS_SUCCESS; } @@ -107,14 +107,14 @@ int vnt_check_firmware_version(struct vnt_private *priv) int status; status = vnt_control_in(priv, - MESSAGE_TYPE_READ, - 0, - MESSAGE_REQUEST_VERSION, - 2, - (u8 *)&priv->firmware_version); + MESSAGE_TYPE_READ, + 0, + MESSAGE_REQUEST_VERSION, + 2, + (u8 *)&priv->firmware_version); dev_dbg(&priv->usb->dev, "Firmware Version [%04x]\n", - priv->firmware_version); + priv->firmware_version); if (status != STATUS_SUCCESS) { dev_dbg(&priv->usb->dev, "Firmware Invalid.\n"); @@ -126,7 +126,7 @@ int vnt_check_firmware_version(struct vnt_private *priv) } dev_dbg(&priv->usb->dev, "Firmware Version [%04x]\n", - priv->firmware_version); + priv->firmware_version); if (priv->firmware_version < FIRMWARE_VERSION) { /* branch to loader for download new firmware */ diff --git a/drivers/staging/vt6656/key.h b/drivers/staging/vt6656/key.h index 7861faf5138f..7be423004386 100644 --- a/drivers/staging/vt6656/key.h +++ b/drivers/staging/vt6656/key.h @@ -46,6 +46,6 @@ int vnt_key_init_table(struct vnt_private *); int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta, - struct ieee80211_vif *vif, struct ieee80211_key_conf *key); + struct ieee80211_vif *vif, struct ieee80211_key_conf *key); #endif /* __KEY_H__ */ diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index 6101a35582b6..068c1c89f653 100644 --- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -771,7 +771,7 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, u32 rate) ret &= vnt_rf_write_embedded(priv, 0x015C0800); } else { dev_dbg(&priv->usb->dev, - " vnt_rf_set_txpower> 11G mode\n"); + " vnt_rf_set_txpower> 11G mode\n"); power_setting = ((0x3f - power) << 20) | (0x7 << 8); @@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv) memcpy(array, addr1, length1); vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0, - MESSAGE_REQUEST_RF_INIT, length1, array); + MESSAGE_REQUEST_
[PATCH 2/2] staging: vt6656: Alignment match open parenthesis
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis" Signed-off-by: Arushi Singhal --- drivers/staging/vt6656/rxtx.c | 54 +-- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index aa59e7f14ab3..02820894ff27 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -90,7 +90,7 @@ static struct vnt_usb_send_context if (!context->in_use) { context->in_use = true; memset(context->data, 0, - MAX_TOTAL_SIZE_WITH_ALL_HEADERS); + MAX_TOTAL_SIZE_WITH_ALL_HEADERS); context->hdr = NULL; @@ -114,19 +114,19 @@ static __le16 vnt_time_stamp_off(struct vnt_private *priv, u16 rate) } static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type, - u32 frame_length, u16 rate, int need_ack) + u32 frame_length, u16 rate, int need_ack) { u32 data_time, ack_time; data_time = vnt_get_frame_time(priv->preamble_type, pkt_type, - frame_length, rate); + frame_length, rate); if (pkt_type == PK_TYPE_11B) ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type, - 14, (u16)priv->top_cck_basic_rate); + 14, (u16)priv->top_cck_basic_rate); else ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type, - 14, (u16)priv->top_ofdm_basic_rate); + 14, (u16)priv->top_ofdm_basic_rate); if (need_ack) return data_time + priv->sifs + ack_time; @@ -135,21 +135,21 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type, } static __le16 vnt_rxtx_rsvtime_le16(struct vnt_private *priv, u8 pkt_type, - u32 frame_length, u16 rate, int need_ack) +u32 frame_length, u16 rate, int need_ack) { return cpu_to_le16((u16)vnt_get_rsvtime(priv, pkt_type, frame_length, rate, need_ack)); } static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv, - u8 rsv_type, u8 pkt_type, u32 frame_length, u16 current_rate) +u8 rsv_type, u8 pkt_type, u32 frame_length, u16 current_rate) { u32 rrv_time, rts_time, cts_time, ack_time, data_time; rrv_time = rts_time = cts_time = ack_time = data_time = 0; data_time = vnt_get_frame_time(priv->preamble_type, pkt_type, - frame_length, current_rate); + frame_length, current_rate); if (rsv_type == 0) { rts_time = vnt_get_frame_time(priv->preamble_type, @@ -160,19 +160,19 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv, rts_time = vnt_get_frame_time(priv->preamble_type, pkt_type, 20, priv->top_cck_basic_rate); cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type, - 14, priv->top_cck_basic_rate); + 14, priv->top_cck_basic_rate); ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type, - 14, priv->top_ofdm_basic_rate); + 14, priv->top_ofdm_basic_rate); } else if (rsv_type == 2) { rts_time = vnt_get_frame_time(priv->preamble_type, pkt_type, - 20, priv->top_ofdm_basic_rate); + 20, priv->top_ofdm_basic_rate); cts_time = ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type, 14, priv->top_ofdm_basic_rate); } else if (rsv_type == 3) { cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type, - 14, priv->top_cck_basic_rate); + 14, priv->top_cck_basic_rate); ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type, - 14, priv->top_ofdm_basic_rate); + 14, priv->top_ofdm_basic_rate); rrv_time = cts_time + ack_time + data_time + 2 * priv->sifs; @@ -185,7 +185,7 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv, } static __le16 vnt_get_duration_le(struct vnt_private *priv, - u8 pkt_type, int need_ack) + u8 pkt_t
[PATCH] staging: xgifb: function definition argument should also have an identifier name
function definition argument 'struct vb_device_info *' should also have an identifier name. Signed-off-by: Arushi Singhal --- drivers/staging/xgifb/vb_init.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/xgifb/vb_init.h b/drivers/staging/xgifb/vb_init.h index 500cabe41a3c..022486a516d6 100644 --- a/drivers/staging/xgifb/vb_init.h +++ b/drivers/staging/xgifb/vb_init.h @@ -1,6 +1,6 @@ #ifndef _VBINIT_ #define _VBINIT_ unsigned char XGIInitNew(struct pci_dev *pdev); -void XGIRegInit(struct vb_device_info *, unsigned long); +void XGIRegInit(struct vb_device_info *pVBInfo, unsigned long); #endif -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: xgifb: function definition argument should also have an identifier name
function definition argument 'struct vb_device_info *' and 'unsigned long' should also have an identifier name. Signed-off-by: Arushi Singhal --- drivers/staging/xgifb/vb_init.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/xgifb/vb_init.h b/drivers/staging/xgifb/vb_init.h index 500cabe41a3c..e4929314d33e 100644 --- a/drivers/staging/xgifb/vb_init.h +++ b/drivers/staging/xgifb/vb_init.h @@ -1,6 +1,6 @@ #ifndef _VBINIT_ #define _VBINIT_ unsigned char XGIInitNew(struct pci_dev *pdev); -void XGIRegInit(struct vb_device_info *, unsigned long); +void XGIRegInit(struct vb_device_info *pVBInfo, unsigned long BaseAddr); #endif -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: xgifb: function definition argument should also have an identifier name
function definition argument 'struct vb_device_info *' and 'unsigned long' should also have an identifier name. Signed-off-by: Arushi Singhal --- drivers/staging/xgifb/vb_init.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/xgifb/vb_init.h b/drivers/staging/xgifb/vb_init.h index 500cabe41a3c..e4929314d33e 100644 --- a/drivers/staging/xgifb/vb_init.h +++ b/drivers/staging/xgifb/vb_init.h @@ -1,6 +1,6 @@ #ifndef _VBINIT_ #define _VBINIT_ unsigned char XGIInitNew(struct pci_dev *pdev); -void XGIRegInit(struct vb_device_info *, unsigned long); +void XGIRegInit(struct vb_device_info *pVBInfo, unsigned long BaseAddr); #endif -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: xgifb: function definition argument should also have an identifier name'
function definition argument 'struct vb_device_info *' and 'unsigned long' should also have an identifier name. Signed-off-by: Arushi Singhal --- drivers/staging/xgifb/vb_init.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/xgifb/vb_init.h b/drivers/staging/xgifb/vb_init.h index 500cabe41a3c..e4929314d33e 100644 --- a/drivers/staging/xgifb/vb_init.h +++ b/drivers/staging/xgifb/vb_init.h @@ -1,6 +1,6 @@ #ifndef _VBINIT_ #define _VBINIT_ unsigned char XGIInitNew(struct pci_dev *pdev); -void XGIRegInit(struct vb_device_info *, unsigned long); +void XGIRegInit(struct vb_device_info *pVBInfo, unsigned long BaseAddr); #endif -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: xgifb: function definition argument should also have an identifier name'
function definition argument 'struct vb_device_info *' and 'unsigned long' should also have an identifier name. Signed-off-by: Arushi Singhal --- drivers/staging/xgifb/vb_init.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/xgifb/vb_init.h b/drivers/staging/xgifb/vb_init.h index 500cabe41a3c..e835054b87bf 100644 --- a/drivers/staging/xgifb/vb_init.h +++ b/drivers/staging/xgifb/vb_init.h @@ -1,6 +1,5 @@ #ifndef _VBINIT_ #define _VBINIT_ unsigned char XGIInitNew(struct pci_dev *pdev); -void XGIRegInit(struct vb_device_info *, unsigned long); +void XGIRegInit(struct vb_device_info *XGI_Pr, unsigned long BaseAddr); #endif - -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: xgifb: function definition argument should also have an identifier name'
function definition argument 'struct vb_device_info *' and 'unsigned long' should also have an identifier name. Signed-off-by: Arushi Singhal --- drivers/staging/xgifb/vb_init.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/xgifb/vb_init.h b/drivers/staging/xgifb/vb_init.h index 500cabe41a3c..e835054b87bf 100644 --- a/drivers/staging/xgifb/vb_init.h +++ b/drivers/staging/xgifb/vb_init.h @@ -1,6 +1,5 @@ #ifndef _VBINIT_ #define _VBINIT_ unsigned char XGIInitNew(struct pci_dev *pdev); -void XGIRegInit(struct vb_device_info *, unsigned long); +void XGIRegInit(struct vb_device_info *XGI_Pr, unsigned long BaseAddr); #endif - -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: ks7010: Block comments use * on subsequent lines
Some of the block comments styles are not encouraged: for example: /* block comment without introductory * */ and /* * block comment with line terminating */ Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks7010_sdio.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index a604c83c957e..2c263f98bdbb 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -495,8 +495,10 @@ static void ks7010_rw_function(struct work_struct *work) /* wiat after WAKEUP */ while (time_after(priv->last_wakeup + ((30 * HZ) / 1000), jiffies)) { DPRINTK(4, "wait after WAKEUP\n"); -/* queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,&priv->ks_wlan_hw.rw_wq, - (priv->last_wakeup + ((30*HZ)/1000) - jiffies));*/ +/* + * queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,&priv->ks_wlan_hw.rw_wq, + * (priv->last_wakeup + ((30*HZ)/1000) - jiffies)); + */ dev_info(&priv->ks_wlan_hw.sdio_card->func->dev, "wake: %lu %lu\n", priv->last_wakeup + (30 * HZ) / 1000, -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: ks7010: Unnecessary parentheses should be avoided
Unnecessary parentheses as reported by checkpatch.pl Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks_hostif.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 1fbd495e5e63..819e08b5fa91 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -113,7 +113,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) int rc = 0; DPRINTK(3, "\n"); - ap = &(priv->current_ap); + ap = &priv->current_ap; if ((priv->connect_status & CONNECT_STATUS_MASK) == DISCONNECT_STATUS) { memset(ap, 0, sizeof(struct local_ap_t)); @@ -121,19 +121,19 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) } /* bssid */ - memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); + memcpy(&ap->bssid[0], &ap_info->bssid[0], ETH_ALEN); /* essid */ - memcpy(&(ap->ssid.body[0]), &(priv->reg.ssid.body[0]), + memcpy(&ap->ssid.body[0], &priv->reg.ssid.body[0], priv->reg.ssid.size); ap->ssid.size = priv->reg.ssid.size; /* rate_set */ - memcpy(&(ap->rate_set.body[0]), &(ap_info->rate_set.body[0]), + memcpy(&ap->rate_set.body[0], &ap_info->rate_set.body[0], ap_info->rate_set.size); ap->rate_set.size = ap_info->rate_set.size; if (ap_info->ext_rate_set.size) { /* rate_set */ - memcpy(&(ap->rate_set.body[ap->rate_set.size]), - &(ap_info->ext_rate_set.body[0]), + memcpy(&ap->rate_set.body[ap->rate_set.size], + &ap_info->ext_rate_set.body[0], ap_info->ext_rate_set.size); ap->rate_set.size += ap_info->ext_rate_set.size; } @@ -153,11 +153,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->rsn_ie.id = 0x30; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->rsn_ie.size = ap_info->rsn.size; - memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(&ap->rsn_ie.body[0], &ap_info->rsn.body[0], ap_info->rsn.size); } else { ap->rsn_ie.size = RSN_IE_BODY_MAX; - memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(&ap->rsn_ie.body[0], &ap_info->rsn.body[0], RSN_IE_BODY_MAX); } } else if ((ap_info->rsn_mode & RSN_MODE_WPA) @@ -165,11 +165,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->wpa_ie.id = 0xdd; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->wpa_ie.size = ap_info->rsn.size; - memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(&ap->wpa_ie.body[0], &ap_info->rsn.body[0], ap_info->rsn.size); } else { ap->wpa_ie.size = RSN_IE_BODY_MAX; - memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(&ap->wpa_ie.body[0], &ap_info->rsn.body[0], RSN_IE_BODY_MAX); } } else { -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: ks7010: There should be no spaces at the start of a line
The following patch the checkpatch.pl warning: drivers/staging/ks7010/ks_hostif.c warning: please, no spaces at the start of a line Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks_hostif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 819e08b5fa91..3b2e28749b63 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -191,8 +191,8 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) } DPRINTK(4, "\nLink AP\n"); DPRINTK(4, "bssid=%02X:%02X:%02X:%02X:%02X:%02X\n \ - essid=%s\nrate_set=%02X,%02X,%02X,%02X,%02X,%02X,%02X,%02X\n channel=%d\n \ - rssi=%d\nsq=%d\ncapability=%04X\n", ap->bssid[0], ap->bssid[1], ap->bssid[2], ap->bssid[3], ap->bssid[4], ap->bssid[5], &(ap->ssid.body[0]), ap->rate_set.body[0], ap->rate_set.body[1], ap->rate_set.body[2], ap->rate_set.body[3], ap->rate_set.body[4], ap->rate_set.body[5], ap->rate_set.body[6], ap->rate_set.body[7], ap->channel, ap->rssi, ap->sq, ap->capability); +essid=%s\nrate_set=%02X,%02X,%02X,%02X,%02X,%02X,%02X,%02X\n channel=%d\n \ +rssi=%d\nsq=%d\ncapability=%04X\n", ap->bssid[0], ap->bssid[1], ap->bssid[2], ap->bssid[3], ap->bssid[4], ap->bssid[5], &(ap->ssid.body[0]), ap->rate_set.body[0], ap->rate_set.body[1], ap->rate_set.body[2], ap->rate_set.body[3], ap->rate_set.body[4], ap->rate_set.body[5], ap->rate_set.body[6], ap->rate_set.body[7], ap->channel, ap->rssi, ap->sq, ap->capability); DPRINTK(4, "\nLink AP\nrsn.mode=%d\nrsn.size=%d\n", ap_info->rsn_mode, ap_info->rsn.size); DPRINTK(4, "\next_rate_set_size=%d\nrate_set_size=%d\n", -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: ks7010: Unnecessary parentheses should be avoided
Unnecessary parentheses should be avoided as reported by checkpatch.pl Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks_hostif.c | 24 drivers/staging/ks7010/ks_wlan_net.c | 20 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 3b2e28749b63..bbc39cbabdc1 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -212,7 +212,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, memset(ap, 0, sizeof(struct local_ap_t)); /* bssid */ - memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); + memcpy(&ap->bssid[0], &ap_info->bssid[0], ETH_ALEN); /* rssi */ ap->rssi = ap_info->rssi; /* sq */ @@ -224,7 +224,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, /* channel */ ap->channel = ap_info->ch_info; - bp = &(ap_info->body[0]); + bp = &ap_info->body[0]; bsize = ap_info->body_size; offset = 0; @@ -239,19 +239,19 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->ssid.size = SSID_MAX_SIZE; } - memcpy(&(ap->ssid.body[0]), bp + 2, ap->ssid.size); + memcpy(&ap->ssid.body[0], bp + 2, ap->ssid.size); break; case 1: /* rate */ case 50:/* ext rate */ if ((*(bp + 1) + ap->rate_set.size) <= RATE_SET_MAX_SIZE) { - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, *(bp + 1)); ap->rate_set.size += *(bp + 1); } else { DPRINTK(1, "size over :: rate size=%d\n", (*(bp + 1) + ap->rate_set.size)); - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, RATE_SET_MAX_SIZE - ap->rate_set.size); ap->rate_set.size += @@ -269,7 +269,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->rsn_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->rsn_ie.body[0]), bp + 2, ap->rsn_ie.size); + memcpy(&ap->rsn_ie.body[0], bp + 2, ap->rsn_ie.size); break; case 221: /* WPA */ if (!memcmp(bp + 2, "\x00\x50\xf2\x01", 4)) { /* WPA OUI check */ @@ -282,7 +282,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->wpa_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->wpa_ie.body[0]), bp + 2, + memcpy(&ap->wpa_ie.body[0], bp + 2, ap->wpa_ie.size); } break; @@ -832,8 +832,8 @@ void hostif_scan_indication(struct ks_wlan_private *priv) if (priv->scan_ind_count != 0) { for (i = 0; i < priv->aplist.size; i++) { /* bssid check */ if (!memcmp - (&(ap_info->bssid[0]), -&(priv->aplist.ap[i].bssid[0]), ETH_ALEN)) { + (&ap_info->bssid[0], +&priv->aplist.ap[i].bssid[0], ETH_ALEN)) { if (ap_info->frame_type == FRAME_TYPE_PROBE_RESP) get_ap_information(priv, ap_info, @@ -2652,7 +2652,7 @@ int hostif_init(struct ks_wlan_private *priv) priv->aplist.size = 0; for (i = 0; i < LOCAL_APLIST_MAX; i++) - memset(&(priv->aplist.ap[i]), 0, sizeof(struct local_ap_t)); + memset(&priv->aplist.ap[i], 0, sizeof(struct local_ap_t)); priv->infra_status = 0; priv->current_rate = 4; priv->conn
[PATCH v2 1/2] staging: ks7010: Unnecessary parentheses should be avoided
Unnecessary parentheses should be avoided as reported by checkpatch.pl Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks_hostif.c | 24 drivers/staging/ks7010/ks_wlan_net.c | 20 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 3b2e28749b63..bbc39cbabdc1 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -212,7 +212,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, memset(ap, 0, sizeof(struct local_ap_t)); /* bssid */ - memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); + memcpy(&ap->bssid[0], &ap_info->bssid[0], ETH_ALEN); /* rssi */ ap->rssi = ap_info->rssi; /* sq */ @@ -224,7 +224,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, /* channel */ ap->channel = ap_info->ch_info; - bp = &(ap_info->body[0]); + bp = &ap_info->body[0]; bsize = ap_info->body_size; offset = 0; @@ -239,19 +239,19 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->ssid.size = SSID_MAX_SIZE; } - memcpy(&(ap->ssid.body[0]), bp + 2, ap->ssid.size); + memcpy(&ap->ssid.body[0], bp + 2, ap->ssid.size); break; case 1: /* rate */ case 50:/* ext rate */ if ((*(bp + 1) + ap->rate_set.size) <= RATE_SET_MAX_SIZE) { - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, *(bp + 1)); ap->rate_set.size += *(bp + 1); } else { DPRINTK(1, "size over :: rate size=%d\n", (*(bp + 1) + ap->rate_set.size)); - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, RATE_SET_MAX_SIZE - ap->rate_set.size); ap->rate_set.size += @@ -269,7 +269,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->rsn_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->rsn_ie.body[0]), bp + 2, ap->rsn_ie.size); + memcpy(&ap->rsn_ie.body[0], bp + 2, ap->rsn_ie.size); break; case 221: /* WPA */ if (!memcmp(bp + 2, "\x00\x50\xf2\x01", 4)) { /* WPA OUI check */ @@ -282,7 +282,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->wpa_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->wpa_ie.body[0]), bp + 2, + memcpy(&ap->wpa_ie.body[0], bp + 2, ap->wpa_ie.size); } break; @@ -832,8 +832,8 @@ void hostif_scan_indication(struct ks_wlan_private *priv) if (priv->scan_ind_count != 0) { for (i = 0; i < priv->aplist.size; i++) { /* bssid check */ if (!memcmp - (&(ap_info->bssid[0]), -&(priv->aplist.ap[i].bssid[0]), ETH_ALEN)) { + (&ap_info->bssid[0], +&priv->aplist.ap[i].bssid[0], ETH_ALEN)) { if (ap_info->frame_type == FRAME_TYPE_PROBE_RESP) get_ap_information(priv, ap_info, @@ -2652,7 +2652,7 @@ int hostif_init(struct ks_wlan_private *priv) priv->aplist.size = 0; for (i = 0; i < LOCAL_APLIST_MAX; i++) - memset(&(priv->aplist.ap[i]), 0, sizeof(struct local_ap_t)); + memset(&priv->aplist.ap[i], 0, sizeof(struct local_ap_t)); priv->infra_status = 0; priv->current_rate = 4; priv->conn
[PATCH v2 2/2] staging: ks7010: Unnecessary parentheses should be avoided
Unnecessary parentheses should be avoided as reported by checkpatch.pl Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks_hostif.c | 24 drivers/staging/ks7010/ks_wlan_net.c | 20 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 3b2e28749b63..bbc39cbabdc1 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -212,7 +212,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, memset(ap, 0, sizeof(struct local_ap_t)); /* bssid */ - memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); + memcpy(&ap->bssid[0], &ap_info->bssid[0], ETH_ALEN); /* rssi */ ap->rssi = ap_info->rssi; /* sq */ @@ -224,7 +224,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, /* channel */ ap->channel = ap_info->ch_info; - bp = &(ap_info->body[0]); + bp = &ap_info->body[0]; bsize = ap_info->body_size; offset = 0; @@ -239,19 +239,19 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->ssid.size = SSID_MAX_SIZE; } - memcpy(&(ap->ssid.body[0]), bp + 2, ap->ssid.size); + memcpy(&ap->ssid.body[0], bp + 2, ap->ssid.size); break; case 1: /* rate */ case 50:/* ext rate */ if ((*(bp + 1) + ap->rate_set.size) <= RATE_SET_MAX_SIZE) { - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, *(bp + 1)); ap->rate_set.size += *(bp + 1); } else { DPRINTK(1, "size over :: rate size=%d\n", (*(bp + 1) + ap->rate_set.size)); - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, RATE_SET_MAX_SIZE - ap->rate_set.size); ap->rate_set.size += @@ -269,7 +269,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->rsn_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->rsn_ie.body[0]), bp + 2, ap->rsn_ie.size); + memcpy(&ap->rsn_ie.body[0], bp + 2, ap->rsn_ie.size); break; case 221: /* WPA */ if (!memcmp(bp + 2, "\x00\x50\xf2\x01", 4)) { /* WPA OUI check */ @@ -282,7 +282,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->wpa_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->wpa_ie.body[0]), bp + 2, + memcpy(&ap->wpa_ie.body[0], bp + 2, ap->wpa_ie.size); } break; @@ -832,8 +832,8 @@ void hostif_scan_indication(struct ks_wlan_private *priv) if (priv->scan_ind_count != 0) { for (i = 0; i < priv->aplist.size; i++) { /* bssid check */ if (!memcmp - (&(ap_info->bssid[0]), -&(priv->aplist.ap[i].bssid[0]), ETH_ALEN)) { + (&ap_info->bssid[0], +&priv->aplist.ap[i].bssid[0], ETH_ALEN)) { if (ap_info->frame_type == FRAME_TYPE_PROBE_RESP) get_ap_information(priv, ap_info, @@ -2652,7 +2652,7 @@ int hostif_init(struct ks_wlan_private *priv) priv->aplist.size = 0; for (i = 0; i < LOCAL_APLIST_MAX; i++) - memset(&(priv->aplist.ap[i]), 0, sizeof(struct local_ap_t)); + memset(&priv->aplist.ap[i], 0, sizeof(struct local_ap_t)); priv->infra_status = 0; priv->current_rate = 4; priv->conn
[PATCH 1/2] staging: ks7010: Unnecessary parentheses are removed.
Unnecessary parentheses should be avoided as reported by checkpatch.pl. Remove unnecessary parentheses, as reported by checkpatch as are nicer to read.For example:- It's often nicer to read if &(foo[0]) is converted to foo like: memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks_hostif.c | 24 drivers/staging/ks7010/ks_wlan_net.c | 20 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 3b2e28749b63..bbc39cbabdc1 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -212,7 +212,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, memset(ap, 0, sizeof(struct local_ap_t)); /* bssid */ - memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); + memcpy(&ap->bssid[0], &ap_info->bssid[0], ETH_ALEN); /* rssi */ ap->rssi = ap_info->rssi; /* sq */ @@ -224,7 +224,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, /* channel */ ap->channel = ap_info->ch_info; - bp = &(ap_info->body[0]); + bp = &ap_info->body[0]; bsize = ap_info->body_size; offset = 0; @@ -239,19 +239,19 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->ssid.size = SSID_MAX_SIZE; } - memcpy(&(ap->ssid.body[0]), bp + 2, ap->ssid.size); + memcpy(&ap->ssid.body[0], bp + 2, ap->ssid.size); break; case 1: /* rate */ case 50:/* ext rate */ if ((*(bp + 1) + ap->rate_set.size) <= RATE_SET_MAX_SIZE) { - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, *(bp + 1)); ap->rate_set.size += *(bp + 1); } else { DPRINTK(1, "size over :: rate size=%d\n", (*(bp + 1) + ap->rate_set.size)); - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, RATE_SET_MAX_SIZE - ap->rate_set.size); ap->rate_set.size += @@ -269,7 +269,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->rsn_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->rsn_ie.body[0]), bp + 2, ap->rsn_ie.size); + memcpy(&ap->rsn_ie.body[0], bp + 2, ap->rsn_ie.size); break; case 221: /* WPA */ if (!memcmp(bp + 2, "\x00\x50\xf2\x01", 4)) { /* WPA OUI check */ @@ -282,7 +282,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->wpa_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->wpa_ie.body[0]), bp + 2, + memcpy(&ap->wpa_ie.body[0], bp + 2, ap->wpa_ie.size); } break; @@ -832,8 +832,8 @@ void hostif_scan_indication(struct ks_wlan_private *priv) if (priv->scan_ind_count != 0) { for (i = 0; i < priv->aplist.size; i++) { /* bssid check */ if (!memcmp - (&(ap_info->bssid[0]), -&(priv->aplist.ap[i].bssid[0]), ETH_ALEN)) { + (&ap_info->bssid[0], +&priv->aplist.ap[i].bssid[0], ETH_ALEN)) { if (ap_info->frame_type == FRAME_TYPE_PROBE_RESP) get_ap_information(priv, ap_info, @@ -2652,7 +2652,7 @@ int hostif_init(struct ks_wlan_private *priv) priv->aplist.size = 0;
[PATCH 2/2] staging: ks7010: Unnecessary parentheses are removed to make coder nicer.
Unnecessary parentheses should be avoided as reported by checkpatch.pl. Remove unnecessary parentheses, as reported by checkpatch as are nicer to read.For example:- It's often nicer to read if &(foo[0]) is converted to foo like: memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks_hostif.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 1fbd495e5e63..819e08b5fa91 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -113,7 +113,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) int rc = 0; DPRINTK(3, "\n"); - ap = &(priv->current_ap); + ap = &priv->current_ap; if ((priv->connect_status & CONNECT_STATUS_MASK) == DISCONNECT_STATUS) { memset(ap, 0, sizeof(struct local_ap_t)); @@ -121,19 +121,19 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) } /* bssid */ - memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); + memcpy(&ap->bssid[0], &ap_info->bssid[0], ETH_ALEN); /* essid */ - memcpy(&(ap->ssid.body[0]), &(priv->reg.ssid.body[0]), + memcpy(&ap->ssid.body[0], &priv->reg.ssid.body[0], priv->reg.ssid.size); ap->ssid.size = priv->reg.ssid.size; /* rate_set */ - memcpy(&(ap->rate_set.body[0]), &(ap_info->rate_set.body[0]), + memcpy(&ap->rate_set.body[0], &ap_info->rate_set.body[0], ap_info->rate_set.size); ap->rate_set.size = ap_info->rate_set.size; if (ap_info->ext_rate_set.size) { /* rate_set */ - memcpy(&(ap->rate_set.body[ap->rate_set.size]), - &(ap_info->ext_rate_set.body[0]), + memcpy(&ap->rate_set.body[ap->rate_set.size], + &ap_info->ext_rate_set.body[0], ap_info->ext_rate_set.size); ap->rate_set.size += ap_info->ext_rate_set.size; } @@ -153,11 +153,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->rsn_ie.id = 0x30; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->rsn_ie.size = ap_info->rsn.size; - memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(&ap->rsn_ie.body[0], &ap_info->rsn.body[0], ap_info->rsn.size); } else { ap->rsn_ie.size = RSN_IE_BODY_MAX; - memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(&ap->rsn_ie.body[0], &ap_info->rsn.body[0], RSN_IE_BODY_MAX); } } else if ((ap_info->rsn_mode & RSN_MODE_WPA) @@ -165,11 +165,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->wpa_ie.id = 0xdd; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->wpa_ie.size = ap_info->rsn.size; - memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(&ap->wpa_ie.body[0], &ap_info->rsn.body[0], ap_info->rsn.size); } else { ap->wpa_ie.size = RSN_IE_BODY_MAX; - memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(&ap->wpa_ie.body[0], &ap_info->rsn.body[0], RSN_IE_BODY_MAX); } } else { -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: ks7010: Unnecessary parentheses are removed to make coder nicer.
Unnecessary parentheses should be avoided as reported by checkpatch.pl. Remove unnecessary parentheses, as reported by checkpatch as are nicer to read.For example:- It's often nicer to read if &(foo[0]) is converted to foo like: memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks_hostif.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 1fbd495e5e63..ba283ab741a7 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -113,7 +113,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) int rc = 0; DPRINTK(3, "\n"); - ap = &(priv->current_ap); + ap = priv->current_ap; if ((priv->connect_status & CONNECT_STATUS_MASK) == DISCONNECT_STATUS) { memset(ap, 0, sizeof(struct local_ap_t)); @@ -121,19 +121,19 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) } /* bssid */ - memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); + memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); /* essid */ - memcpy(&(ap->ssid.body[0]), &(priv->reg.ssid.body[0]), + memcpy(ap->ssid.body, priv->reg.ssid.body, priv->reg.ssid.size); ap->ssid.size = priv->reg.ssid.size; /* rate_set */ - memcpy(&(ap->rate_set.body[0]), &(ap_info->rate_set.body[0]), + memcpy(ap->rate_set.body, ap_info->rate_set.body, ap_info->rate_set.size); ap->rate_set.size = ap_info->rate_set.size; if (ap_info->ext_rate_set.size) { /* rate_set */ - memcpy(&(ap->rate_set.body[ap->rate_set.size]), - &(ap_info->ext_rate_set.body[0]), + memcpy(&ap->rate_set.body[ap->rate_set.size], + ap_info->ext_rate_set.body, ap_info->ext_rate_set.size); ap->rate_set.size += ap_info->ext_rate_set.size; } @@ -153,11 +153,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->rsn_ie.id = 0x30; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->rsn_ie.size = ap_info->rsn.size; - memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->rsn_ie.body, ap_info->rsn.body, ap_info->rsn.size); } else { ap->rsn_ie.size = RSN_IE_BODY_MAX; - memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->rsn_ie.body, ap_info->rsn.body, RSN_IE_BODY_MAX); } } else if ((ap_info->rsn_mode & RSN_MODE_WPA) @@ -165,11 +165,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->wpa_ie.id = 0xdd; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->wpa_ie.size = ap_info->rsn.size; - memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->wpa_ie.body, ap_info->rsn.body, ap_info->rsn.size); } else { ap->wpa_ie.size = RSN_IE_BODY_MAX; - memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->wpa_ie.body, ap_info->rsn.body, RSN_IE_BODY_MAX); } } else { @@ -212,7 +212,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, memset(ap, 0, sizeof(struct local_ap_t)); /* bssid */ - memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); + memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); /* rssi */ ap->rssi = ap_info->rssi; /* sq */ @@ -224,7 +224,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, /* channel */ ap->channel = ap_info->ch_info; - bp = &(ap_info->body[0]); + bp = ap_info->body; bsize = ap_info->body_size; offset = 0; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: ks7010: Unnecessary parentheses are removed.
Unnecessary parentheses should be avoided as reported by checkpatch.pl. Remove unnecessary parentheses, as reported by checkpatch as are nicer to read.For example:- It's often nicer to read if &(foo[0]) is converted to foo like: memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks_hostif.c | 20 ++-- drivers/staging/ks7010/ks_wlan_net.c | 20 ++-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index ba283ab741a7..2d5ec57c5cfd 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -239,19 +239,19 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->ssid.size = SSID_MAX_SIZE; } - memcpy(&(ap->ssid.body[0]), bp + 2, ap->ssid.size); + memcpy(ap->ssid.body, bp + 2, ap->ssid.size); break; case 1: /* rate */ case 50:/* ext rate */ if ((*(bp + 1) + ap->rate_set.size) <= RATE_SET_MAX_SIZE) { - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, *(bp + 1)); ap->rate_set.size += *(bp + 1); } else { DPRINTK(1, "size over :: rate size=%d\n", (*(bp + 1) + ap->rate_set.size)); - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, RATE_SET_MAX_SIZE - ap->rate_set.size); ap->rate_set.size += @@ -269,7 +269,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->rsn_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->rsn_ie.body[0]), bp + 2, ap->rsn_ie.size); + memcpy(ap->rsn_ie.body, bp + 2, ap->rsn_ie.size); break; case 221: /* WPA */ if (!memcmp(bp + 2, "\x00\x50\xf2\x01", 4)) { /* WPA OUI check */ @@ -282,7 +282,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->wpa_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->wpa_ie.body[0]), bp + 2, + memcpy(ap->wpa_ie.body, bp + 2, ap->wpa_ie.size); } break; @@ -832,8 +832,8 @@ void hostif_scan_indication(struct ks_wlan_private *priv) if (priv->scan_ind_count != 0) { for (i = 0; i < priv->aplist.size; i++) { /* bssid check */ if (!memcmp - (&(ap_info->bssid[0]), -&(priv->aplist.ap[i].bssid[0]), ETH_ALEN)) { + (ap_info->bssid, +&priv->aplist.ap[i].bssid[0], ETH_ALEN)) { if (ap_info->frame_type == FRAME_TYPE_PROBE_RESP) get_ap_information(priv, ap_info, @@ -2652,7 +2652,7 @@ int hostif_init(struct ks_wlan_private *priv) priv->aplist.size = 0; for (i = 0; i < LOCAL_APLIST_MAX; i++) - memset(&(priv->aplist.ap[i]), 0, sizeof(struct local_ap_t)); + memset(&priv->aplist.ap[i], 0, sizeof(struct local_ap_t)); priv->infra_status = 0; priv->current_rate = 4; priv->connect_status = DISCONNECT_STATUS; @@ -2675,12 +2675,12 @@ int hostif_init(struct ks_wlan_private *priv) INIT_WORK(&priv->ks_wlan_wakeup_task, ks_wlan_hw_wakeup_task); /* WPA */ - memset(&(priv->wpa), 0, sizeof(priv->wpa)); + memset(&priv->wpa, 0, sizeof(priv->wpa)); priv->wpa.rsn_enabled = 0; priv->wpa.mic_failure.failure = 0; priv->wpa.mic_failure.las
[PATCH v2 1/2] staging: ks7010: Unnecessary parentheses are removed and also improved coding style.
Unnecessary parentheses are removed as reported by checkpatch.pl to make coder nicer and to improve readability. Also coding style is improved.For example:- It's often nicer to read if &(foo[0]) is converted to foo like: memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); Signed-off-by: Arushi Singhal --- Changes in v2: - Make the commit message more clearer. - And correct the error on line number 116 in file drivers/staging/ks7010/ks_hostif.c changes:- ap = priv->current_ap; is changed to ap = &priv->current_ap; --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index ba283ab741a7..b643a37fb943 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -113,7 +113,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) int rc = 0; DPRINTK(3, "\n"); - ap = priv->current_ap; + ap = &priv->current_ap; if ((priv->connect_status & CONNECT_STATUS_MASK) == DISCONNECT_STATUS) { memset(ap, 0, sizeof(struct local_ap_t)); -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] staging: ks7010: Unnecessary parentheses are removed and also improved coding style.
Unnecessary parentheses are removed as reported by checkpatch.pl to make coder nicer and to improve readability. Also coding style is improved.For example:- It's often nicer to read if &(foo[0]) is converted to foo like: memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks_hostif.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 1fbd495e5e63..b643a37fb943 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -113,7 +113,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) int rc = 0; DPRINTK(3, "\n"); - ap = &(priv->current_ap); + ap = &priv->current_ap; if ((priv->connect_status & CONNECT_STATUS_MASK) == DISCONNECT_STATUS) { memset(ap, 0, sizeof(struct local_ap_t)); @@ -121,19 +121,19 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) } /* bssid */ - memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); + memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); /* essid */ - memcpy(&(ap->ssid.body[0]), &(priv->reg.ssid.body[0]), + memcpy(ap->ssid.body, priv->reg.ssid.body, priv->reg.ssid.size); ap->ssid.size = priv->reg.ssid.size; /* rate_set */ - memcpy(&(ap->rate_set.body[0]), &(ap_info->rate_set.body[0]), + memcpy(ap->rate_set.body, ap_info->rate_set.body, ap_info->rate_set.size); ap->rate_set.size = ap_info->rate_set.size; if (ap_info->ext_rate_set.size) { /* rate_set */ - memcpy(&(ap->rate_set.body[ap->rate_set.size]), - &(ap_info->ext_rate_set.body[0]), + memcpy(&ap->rate_set.body[ap->rate_set.size], + ap_info->ext_rate_set.body, ap_info->ext_rate_set.size); ap->rate_set.size += ap_info->ext_rate_set.size; } @@ -153,11 +153,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->rsn_ie.id = 0x30; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->rsn_ie.size = ap_info->rsn.size; - memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->rsn_ie.body, ap_info->rsn.body, ap_info->rsn.size); } else { ap->rsn_ie.size = RSN_IE_BODY_MAX; - memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->rsn_ie.body, ap_info->rsn.body, RSN_IE_BODY_MAX); } } else if ((ap_info->rsn_mode & RSN_MODE_WPA) @@ -165,11 +165,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->wpa_ie.id = 0xdd; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->wpa_ie.size = ap_info->rsn.size; - memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->wpa_ie.body, ap_info->rsn.body, ap_info->rsn.size); } else { ap->wpa_ie.size = RSN_IE_BODY_MAX; - memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->wpa_ie.body, ap_info->rsn.body, RSN_IE_BODY_MAX); } } else { @@ -212,7 +212,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, memset(ap, 0, sizeof(struct local_ap_t)); /* bssid */ - memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); + memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); /* rssi */ ap->rssi = ap_info->rssi; /* sq */ @@ -224,7 +224,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, /* channel */ ap->channel = ap_info->ch_info; - bp = &(ap_info->body[0]); + bp = ap_info->body; bsize = ap_info->body_size; offset = 0; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: ks7010: Unnecessary parentheses are removed and also improved coding style.
Unnecessary parentheses are removed as reported by checkpatch.pl to make coder nicer and to improve readability. Also coding style is improved.For example:- It's often nicer to read if &(foo[0]) is converted to foo like: memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks_hostif.c | 20 ++-- drivers/staging/ks7010/ks_wlan_net.c | 20 ++-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index b643a37fb943..6e36aa2aea99 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -239,19 +239,19 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->ssid.size = SSID_MAX_SIZE; } - memcpy(&(ap->ssid.body[0]), bp + 2, ap->ssid.size); + memcpy(ap->ssid.body, bp + 2, ap->ssid.size); break; case 1: /* rate */ case 50:/* ext rate */ if ((*(bp + 1) + ap->rate_set.size) <= RATE_SET_MAX_SIZE) { - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, *(bp + 1)); ap->rate_set.size += *(bp + 1); } else { DPRINTK(1, "size over :: rate size=%d\n", (*(bp + 1) + ap->rate_set.size)); - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, RATE_SET_MAX_SIZE - ap->rate_set.size); ap->rate_set.size += @@ -269,7 +269,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->rsn_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->rsn_ie.body[0]), bp + 2, ap->rsn_ie.size); + memcpy(ap->rsn_ie.body, bp + 2, ap->rsn_ie.size); break; case 221: /* WPA */ if (!memcmp(bp + 2, "\x00\x50\xf2\x01", 4)) { /* WPA OUI check */ @@ -282,7 +282,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->wpa_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->wpa_ie.body[0]), bp + 2, + memcpy(ap->wpa_ie.body, bp + 2, ap->wpa_ie.size); } break; @@ -832,8 +832,8 @@ void hostif_scan_indication(struct ks_wlan_private *priv) if (priv->scan_ind_count != 0) { for (i = 0; i < priv->aplist.size; i++) { /* bssid check */ if (!memcmp - (&(ap_info->bssid[0]), -&(priv->aplist.ap[i].bssid[0]), ETH_ALEN)) { + (ap_info->bssid, +&priv->aplist.ap[i].bssid[0], ETH_ALEN)) { if (ap_info->frame_type == FRAME_TYPE_PROBE_RESP) get_ap_information(priv, ap_info, @@ -2652,7 +2652,7 @@ int hostif_init(struct ks_wlan_private *priv) priv->aplist.size = 0; for (i = 0; i < LOCAL_APLIST_MAX; i++) - memset(&(priv->aplist.ap[i]), 0, sizeof(struct local_ap_t)); + memset(&priv->aplist.ap[i], 0, sizeof(struct local_ap_t)); priv->infra_status = 0; priv->current_rate = 4; priv->connect_status = DISCONNECT_STATUS; @@ -2675,12 +2675,12 @@ int hostif_init(struct ks_wlan_private *priv) INIT_WORK(&priv->ks_wlan_wakeup_task, ks_wlan_hw_wakeup_task); /* WPA */ - memset(&(priv->wpa), 0, sizeof(priv->wpa)); + memset(&priv->wpa, 0, sizeof(priv->wpa)); priv->wpa.rsn_enabled = 0; priv->wpa.mic_failure.failure = 0; priv->wpa.mic_failure.las
[PATCH] staging: xgifb: correct the multiple line dereference to fix coding stye errors
Error was reported by checkpatch.pl as WARNING: Avoid multiple line dereference... if there is boolean operator then it is fixed by Splitting line at boolean operator. Signed-off-by: Arushi Singhal --- drivers/staging/xgifb/XGI_main_26.c | 15 +-- drivers/staging/xgifb/vb_setmode.c | 19 +++ 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 6930f7eb741b..4fd9bfafccc5 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -880,28 +880,23 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info) if ((filter >= 0) && (filter <= 7)) { pr_debug("FilterTable[%d]-%d: %*ph\n", filter_tb, filter, -4, XGI_TV_filter[filter_tb]. - filter[filter]); +4, XGI_TV_filter[filter_tb].filter[filter]); xgifb_reg_set( XGIPART2, 0x35, - (XGI_TV_filter[filter_tb]. - filter[filter][0])); + (XGI_TV_filter[filter_tb].filter[filter][0])); xgifb_reg_set( XGIPART2, 0x36, - (XGI_TV_filter[filter_tb]. - filter[filter][1])); + (XGI_TV_filter[filter_tb].filter[filter][1])); xgifb_reg_set( XGIPART2, 0x37, - (XGI_TV_filter[filter_tb]. - filter[filter][2])); + (XGI_TV_filter[filter_tb].filter[filter][2])); xgifb_reg_set( XGIPART2, 0x38, - (XGI_TV_filter[filter_tb]. - filter[filter][3])); + (XGI_TV_filter[filter_tb].filter[filter][3])); } } } diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 7c7c8c8f1df3..00f1ae3adcda 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -221,8 +221,7 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex, for (; XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID == tempbx; (*i)--) { - infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)]. - Ext_InfoFlag; + infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; if (infoflag & tempax) return 1; @@ -231,8 +230,7 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex, } for ((*i) = 0;; (*i)++) { - infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)]. - Ext_InfoFlag; + infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; if (XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID != tempbx) { return 0; @@ -654,8 +652,8 @@ static void XGI_UpdateXG21CRTC(unsigned short ModeNo, (XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC == RES640x480x60)) index = 12; - else if (ModeNo == 0x2E && (XGI330_RefIndex[RefreshRateTableIndex]. - Ext_CRT1CRTC == RES640x480x72)) + else if (ModeNo == 0x2E && (XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC == + RES640x480x72)) index = 13; else if (ModeNo == 0x2F) index = 14; @@ -5092,8 +5090,7 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, i = 0; do { - if (XGI330_RefIndex[RefreshRateTableIndex + i]. - ModeID != ModeNo) + if (XGI330_RefIndex[RefreshRateTableIndex + i].ModeID != ModeNo) break; temp = XGI330_RefIndex[RefreshRateTableIndex + i].Ext_InfoFlag; temp &= ModeTypeMask; @@ -5105,8 +5102,7 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_
[PATCH] staging: xgifb: function definition argument should have an identifier name
function definition argument like 'struct vb_device_info *','unsigned long' etc. should have an identifier name. Signed-off-by: Arushi Singhal --- drivers/staging/xgifb/vb_setmode.h | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/staging/xgifb/vb_setmode.h b/drivers/staging/xgifb/vb_setmode.h index 6f082a7a5a4a..e4cf9a633676 100644 --- a/drivers/staging/xgifb/vb_setmode.h +++ b/drivers/staging/xgifb/vb_setmode.h @@ -1,14 +1,15 @@ #ifndef _VBSETMODE_ #define _VBSETMODE_ -void InitTo330Pointer(unsigned char, struct vb_device_info *); -void XGI_UnLockCRT2(struct vb_device_info *); -void XGI_LockCRT2(struct vb_device_info *); -void XGI_DisplayOff(struct xgifb_video_info *, - struct xgi_hw_device_info *, - struct vb_device_info *); -void XGI_GetVBType(struct vb_device_info *); -void XGI_SenseCRT1(struct vb_device_info *); +void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo); +void XGI_UnLockCRT2(struct vb_device_info *pVBInfo); +void XGI_LockCRT2(struct vb_device_info *pVBInfo); +void XGI_DisplayOff(struct xgifb_video_info *xgifb_info, + struct xgi_hw_device_info *pXGIHWDE, + struct vb_device_info *pVBInfo); +void XGI_GetVBType(struct vb_device_info *pVBInfo); + pVBInfo->VBInfo = DisableCRT2Display; +void XGI_SenseCRT1(struct vb_device_info *pVBInfo); unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, struct xgi_hw_device_info *HwDeviceExtension, unsigned short ModeNo); @@ -18,6 +19,6 @@ unsigned char XGI_SearchModeID(unsigned short ModeNo, unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, unsigned short ModeNo, unsigned short ModeIdIndex, - struct vb_device_info *); + struct vb_device_info *pVBInfo); #endif -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: xgifb: function definition argument should also have an identifier name'
function definition argument like 'struct vb_device_info *','unsigned long' etc. should also have an identifier name. Signed-off-by: Arushi Singhal Changes in v2: - By mistake one irrelevant line was added which is removed in this patch. --- drivers/staging/xgifb/vb_setmode.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/xgifb/vb_setmode.h b/drivers/staging/xgifb/vb_setmode.h index 6f082a7a5a4a..c6317ab00474 100644 --- a/drivers/staging/xgifb/vb_setmode.h +++ b/drivers/staging/xgifb/vb_setmode.h @@ -1,14 +1,14 @@ #ifndef _VBSETMODE_ #define _VBSETMODE_ -void InitTo330Pointer(unsigned char, struct vb_device_info *); -void XGI_UnLockCRT2(struct vb_device_info *); -void XGI_LockCRT2(struct vb_device_info *); -void XGI_DisplayOff(struct xgifb_video_info *, - struct xgi_hw_device_info *, - struct vb_device_info *); -void XGI_GetVBType(struct vb_device_info *); -void XGI_SenseCRT1(struct vb_device_info *); +void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo); +void XGI_UnLockCRT2(struct vb_device_info *pVBInfo); +void XGI_LockCRT2(struct vb_device_info *pVBInfo); +void XGI_DisplayOff(struct xgifb_video_info *xgifb_info, + struct xgi_hw_device_info *pXGIHWDE, + struct vb_device_info *pVBInfo); +void XGI_GetVBType(struct vb_device_info *pVBInfo); +void XGI_SenseCRT1(struct vb_device_info *pVBInfo); unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, struct xgi_hw_device_info *HwDeviceExtension, unsigned short ModeNo); @@ -18,6 +18,6 @@ unsigned char XGI_SearchModeID(unsigned short ModeNo, unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, unsigned short ModeNo, unsigned short ModeIdIndex, - struct vb_device_info *); + struct vb_device_info *pVBInfo); #endif -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3] staging: xgifb: function definition argument should also have an identifier name
function definition argument like 'struct vb_device_info *','unsigned long' etc. should also have an identifier name. Signed-off-by: Arushi Singhal --- Changes in v2: - By mistake one irrelevant line was added which is removed in this patch. - write the changes done in previous version in correct format. --- drivers/staging/xgifb/vb_setmode.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/xgifb/vb_setmode.h b/drivers/staging/xgifb/vb_setmode.h index 6f082a7a5a4a..c6317ab00474 100644 --- a/drivers/staging/xgifb/vb_setmode.h +++ b/drivers/staging/xgifb/vb_setmode.h @@ -1,14 +1,14 @@ #ifndef _VBSETMODE_ #define _VBSETMODE_ -void InitTo330Pointer(unsigned char, struct vb_device_info *); -void XGI_UnLockCRT2(struct vb_device_info *); -void XGI_LockCRT2(struct vb_device_info *); -void XGI_DisplayOff(struct xgifb_video_info *, - struct xgi_hw_device_info *, - struct vb_device_info *); -void XGI_GetVBType(struct vb_device_info *); -void XGI_SenseCRT1(struct vb_device_info *); +void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo); +void XGI_UnLockCRT2(struct vb_device_info *pVBInfo); +void XGI_LockCRT2(struct vb_device_info *pVBInfo); +void XGI_DisplayOff(struct xgifb_video_info *xgifb_info, + struct xgi_hw_device_info *pXGIHWDE, + struct vb_device_info *pVBInfo); +void XGI_GetVBType(struct vb_device_info *pVBInfo); +void XGI_SenseCRT1(struct vb_device_info *pVBInfo); unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, struct xgi_hw_device_info *HwDeviceExtension, unsigned short ModeNo); @@ -18,6 +18,6 @@ unsigned char XGI_SearchModeID(unsigned short ModeNo, unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, unsigned short ModeNo, unsigned short ModeIdIndex, - struct vb_device_info *); + struct vb_device_info *pVBInfo); #endif -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: xgifb: function prototype argument should have an identifier name
function prototype arguments like 'struct vb_device_info *','unsigned long' etc. should have an identifier name. Signed-off-by: Arushi Singhal --- Changes in v3: - By mistake one irrelevant line was added which is removed in this patch. - write the changes done in previous version in correct format. - make the commit subject more relevant and accurate. --- drivers/staging/xgifb/vb_setmode.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/xgifb/vb_setmode.h b/drivers/staging/xgifb/vb_setmode.h index 6f082a7a5a4a..c6317ab00474 100644 --- a/drivers/staging/xgifb/vb_setmode.h +++ b/drivers/staging/xgifb/vb_setmode.h @@ -1,14 +1,14 @@ #ifndef _VBSETMODE_ #define _VBSETMODE_ -void InitTo330Pointer(unsigned char, struct vb_device_info *); -void XGI_UnLockCRT2(struct vb_device_info *); -void XGI_LockCRT2(struct vb_device_info *); -void XGI_DisplayOff(struct xgifb_video_info *, - struct xgi_hw_device_info *, - struct vb_device_info *); -void XGI_GetVBType(struct vb_device_info *); -void XGI_SenseCRT1(struct vb_device_info *); +void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo); +void XGI_UnLockCRT2(struct vb_device_info *pVBInfo); +void XGI_LockCRT2(struct vb_device_info *pVBInfo); +void XGI_DisplayOff(struct xgifb_video_info *xgifb_info, + struct xgi_hw_device_info *pXGIHWDE, + struct vb_device_info *pVBInfo); +void XGI_GetVBType(struct vb_device_info *pVBInfo); +void XGI_SenseCRT1(struct vb_device_info *pVBInfo); unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, struct xgi_hw_device_info *HwDeviceExtension, unsigned short ModeNo); @@ -18,6 +18,6 @@ unsigned char XGI_SearchModeID(unsigned short ModeNo, unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, unsigned short ModeNo, unsigned short ModeIdIndex, - struct vb_device_info *); + struct vb_device_info *pVBInfo); #endif -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 1/1] staging: ks7010: Unnecessary parentheses are removed and also improved coding style.
Unnecessary parentheses are removed as reported by checkpatch.pl to make coder nicer and to improve readability. Also coding style is improved.For example:- It's often nicer to read if &(foo[0]) is converted to foo like: memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); Signed-off-by: Arushi Singhal --- Changes in v3: - Commit message made more accurate and as per the changes. - previously versions were not marked. --- drivers/staging/ks7010/ks_hostif.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 1fbd495e5e63..b643a37fb943 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -113,7 +113,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) int rc = 0; DPRINTK(3, "\n"); - ap = &(priv->current_ap); + ap = &priv->current_ap; if ((priv->connect_status & CONNECT_STATUS_MASK) == DISCONNECT_STATUS) { memset(ap, 0, sizeof(struct local_ap_t)); @@ -121,19 +121,19 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) } /* bssid */ - memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); + memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); /* essid */ - memcpy(&(ap->ssid.body[0]), &(priv->reg.ssid.body[0]), + memcpy(ap->ssid.body, priv->reg.ssid.body, priv->reg.ssid.size); ap->ssid.size = priv->reg.ssid.size; /* rate_set */ - memcpy(&(ap->rate_set.body[0]), &(ap_info->rate_set.body[0]), + memcpy(ap->rate_set.body, ap_info->rate_set.body, ap_info->rate_set.size); ap->rate_set.size = ap_info->rate_set.size; if (ap_info->ext_rate_set.size) { /* rate_set */ - memcpy(&(ap->rate_set.body[ap->rate_set.size]), - &(ap_info->ext_rate_set.body[0]), + memcpy(&ap->rate_set.body[ap->rate_set.size], + ap_info->ext_rate_set.body, ap_info->ext_rate_set.size); ap->rate_set.size += ap_info->ext_rate_set.size; } @@ -153,11 +153,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->rsn_ie.id = 0x30; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->rsn_ie.size = ap_info->rsn.size; - memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->rsn_ie.body, ap_info->rsn.body, ap_info->rsn.size); } else { ap->rsn_ie.size = RSN_IE_BODY_MAX; - memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->rsn_ie.body, ap_info->rsn.body, RSN_IE_BODY_MAX); } } else if ((ap_info->rsn_mode & RSN_MODE_WPA) @@ -165,11 +165,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->wpa_ie.id = 0xdd; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->wpa_ie.size = ap_info->rsn.size; - memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->wpa_ie.body, ap_info->rsn.body, ap_info->rsn.size); } else { ap->wpa_ie.size = RSN_IE_BODY_MAX; - memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->wpa_ie.body, ap_info->rsn.body, RSN_IE_BODY_MAX); } } else { @@ -212,7 +212,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, memset(ap, 0, sizeof(struct local_ap_t)); /* bssid */ - memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); + memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); /* rssi */ ap->rssi = ap_info->rssi; /* sq */ @@ -224,7 +224,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, /* channel */ ap->channel = ap_info->ch_info; - bp = &(ap_info->body[0]); + bp = ap_info->body; bsize = ap_info->body_size; offset = 0; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 2/2] staging: ks7010: Unnecessary parentheses are removed and also improved coding style.
Unnecessary parentheses are removed as reported by checkpatch.pl to make coder nicer and to improve readability. Also coding style is improved.For example:- It's often nicer to read if &(foo[0]) is converted to foo like: memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); Signed-off-by: Arushi Singhal --- Changes in v3: - Commit message made more accurate and as per the changes. - previously versions were not marked. --- drivers/staging/ks7010/ks_hostif.c | 20 ++-- drivers/staging/ks7010/ks_wlan_net.c | 20 ++-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index b643a37fb943..6e36aa2aea99 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -239,19 +239,19 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->ssid.size = SSID_MAX_SIZE; } - memcpy(&(ap->ssid.body[0]), bp + 2, ap->ssid.size); + memcpy(ap->ssid.body, bp + 2, ap->ssid.size); break; case 1: /* rate */ case 50:/* ext rate */ if ((*(bp + 1) + ap->rate_set.size) <= RATE_SET_MAX_SIZE) { - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, *(bp + 1)); ap->rate_set.size += *(bp + 1); } else { DPRINTK(1, "size over :: rate size=%d\n", (*(bp + 1) + ap->rate_set.size)); - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, RATE_SET_MAX_SIZE - ap->rate_set.size); ap->rate_set.size += @@ -269,7 +269,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->rsn_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->rsn_ie.body[0]), bp + 2, ap->rsn_ie.size); + memcpy(ap->rsn_ie.body, bp + 2, ap->rsn_ie.size); break; case 221: /* WPA */ if (!memcmp(bp + 2, "\x00\x50\xf2\x01", 4)) { /* WPA OUI check */ @@ -282,7 +282,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->wpa_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->wpa_ie.body[0]), bp + 2, + memcpy(ap->wpa_ie.body, bp + 2, ap->wpa_ie.size); } break; @@ -832,8 +832,8 @@ void hostif_scan_indication(struct ks_wlan_private *priv) if (priv->scan_ind_count != 0) { for (i = 0; i < priv->aplist.size; i++) { /* bssid check */ if (!memcmp - (&(ap_info->bssid[0]), -&(priv->aplist.ap[i].bssid[0]), ETH_ALEN)) { + (ap_info->bssid, +&priv->aplist.ap[i].bssid[0], ETH_ALEN)) { if (ap_info->frame_type == FRAME_TYPE_PROBE_RESP) get_ap_information(priv, ap_info, @@ -2652,7 +2652,7 @@ int hostif_init(struct ks_wlan_private *priv) priv->aplist.size = 0; for (i = 0; i < LOCAL_APLIST_MAX; i++) - memset(&(priv->aplist.ap[i]), 0, sizeof(struct local_ap_t)); + memset(&priv->aplist.ap[i], 0, sizeof(struct local_ap_t)); priv->infra_status = 0; priv->current_rate = 4; priv->connect_status = DISCONNECT_STATUS; @@ -2675,12 +2675,12 @@ int hostif_init(struct ks_wlan_private *priv) INIT_WORK(&priv->ks_wlan_wakeup_task, ks_wlan_hw_wakeup_task); /* WPA */ - memset(&(priv->wpa), 0, sizeof(priv->wpa)); + memset(&priv->wpa, 0, sizeof(priv->wpa)); priv->w
[PATCH v3] staging: xgifb: function prototype argument should also have an identifier name
function prototype argument 'struct vb_device_info *' and 'unsigned long' should also have an identifier name. Signed-off-by: Arushi Singhal --- changes in v3 -make the subject title more relevant. -change the identifier of struct vb_device_info to XGI_Pr. --- drivers/staging/xgifb/vb_init.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/xgifb/vb_init.h b/drivers/staging/xgifb/vb_init.h index 500cabe41a3c..e835054b87bf 100644 --- a/drivers/staging/xgifb/vb_init.h +++ b/drivers/staging/xgifb/vb_init.h @@ -1,6 +1,5 @@ #ifndef _VBINIT_ #define _VBINIT_ unsigned char XGIInitNew(struct pci_dev *pdev); -void XGIRegInit(struct vb_device_info *, unsigned long); +void XGIRegInit(struct vb_device_info *XGI_Pr, unsigned long BaseAddr); #endif - -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: ks7010: codes in the comments are removed
Commenting Code Is a Bad Idea. Comments are their to explain the code and how the code achieves its goal and as codes in the comments does not explain what the code is doing so there is no use of commenting them. So in thos patch codes in the comments are removed. Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks7010_sdio.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index 2c263f98bdbb..54aa2e2f516f 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -495,10 +495,6 @@ static void ks7010_rw_function(struct work_struct *work) /* wiat after WAKEUP */ while (time_after(priv->last_wakeup + ((30 * HZ) / 1000), jiffies)) { DPRINTK(4, "wait after WAKEUP\n"); -/* - * queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,&priv->ks_wlan_hw.rw_wq, - * (priv->last_wakeup + ((30*HZ)/1000) - jiffies)); - */ dev_info(&priv->ks_wlan_hw.sdio_card->func->dev, "wake: %lu %lu\n", priv->last_wakeup + (30 * HZ) / 1000, -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: xgifb: correct the multiple line dereference
Error was reported by checkpatch.pl as WARNING: Avoid multiple line dereference... And If there is boolean operator then it is fixed by Splitting line at boolean operator.This is a coding style error. The changes are made such that the other errors does not generate beacause of this change like line exceeding 80 characters length. Signed-off-by: Arushi Singhal --- changes in v2 - changes done such that no other errors can generate. --- drivers/staging/xgifb/XGI_main_26.c | 21 + drivers/staging/xgifb/vb_setmode.c | 14 +++--- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 6930f7eb741b..651987398d42 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -878,30 +878,27 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info) } if ((filter >= 0) && (filter <= 7)) { + const u8 *f = XGI_TV_filter[filter_tb].filter[filter]; + pr_debug("FilterTable[%d]-%d: %*ph\n", filter_tb, filter, -4, XGI_TV_filter[filter_tb]. - filter[filter]); +4, f); xgifb_reg_set( XGIPART2, 0x35, - (XGI_TV_filter[filter_tb]. - filter[filter][0])); - xgifb_reg_set( + (f[0])); + xgifb_reg_set( XGIPART2, 0x36, - (XGI_TV_filter[filter_tb]. - filter[filter][1])); - xgifb_reg_set( + (f[1])); + xgifb_reg_set( XGIPART2, 0x37, - (XGI_TV_filter[filter_tb]. - filter[filter][2])); + (f[2])); xgifb_reg_set( XGIPART2, 0x38, - (XGI_TV_filter[filter_tb]. - filter[filter][3])); + (f[3])); } } } diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 7c7c8c8f1df3..1220d0cea87d 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -221,8 +221,8 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex, for (; XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID == tempbx; (*i)--) { - infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)]. - Ext_InfoFlag; + infoflag = + XGI330_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; if (infoflag & tempax) return 1; @@ -231,8 +231,8 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex, } for ((*i) = 0;; (*i)++) { - infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)]. - Ext_InfoFlag; + infoflag = + XGI330_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; if (XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID != tempbx) { return 0; @@ -5092,8 +5092,8 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, i = 0; do { - if (XGI330_RefIndex[RefreshRateTableIndex + i]. - ModeID != ModeNo) + if (XGI330_RefIndex[RefreshRateTableIndex + i].ModeID + != ModeNo) break; temp = XGI330_RefIndex[RefreshRateTableIndex + i].Ext_InfoFlag; temp &= ModeTypeMask; @@ -5484,7 +5484,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, return 0; pVBInfo->ModeType = XGI330_EModeIDTable[ModeIdIndex]. - Ext_ModeFlag & ModeTypeMask; + Ext_ModeFlag & ModeTypeMask; pVBInfo-&g
[PATCH v3] staging: xgifb: correct the multiple line dereference
Error was reported by checkpatch.pl as "Avoid multiple line dereference".And If there is boolean operator then it is fixed by Splitting line at boolean operator to satisfy coding style. Signed-off-by: Arushi Singhal --- changes in v3 - changes done such that no other errors can generate. - Improve the coding style. drivers/staging/xgifb/XGI_main_26.c | 30 +- drivers/staging/xgifb/vb_setmode.c | 14 +++--- 2 files changed, 16 insertions(+), 28 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 6930f7eb741b..f363c7c1963d 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -878,30 +878,18 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info) } if ((filter >= 0) && (filter <= 7)) { + const u8 *f = XGI_TV_filter[filter_tb].filter[filter]; + pr_debug("FilterTable[%d]-%d: %*ph\n", -filter_tb, filter, -4, XGI_TV_filter[filter_tb]. - filter[filter]); - xgifb_reg_set( - XGIPART2, - 0x35, - (XGI_TV_filter[filter_tb]. - filter[filter][0])); - xgifb_reg_set( - XGIPART2, - 0x36, - (XGI_TV_filter[filter_tb]. - filter[filter][1])); +filter_tb, filter, 4, f); xgifb_reg_set( - XGIPART2, - 0x37, - (XGI_TV_filter[filter_tb]. - filter[filter][2])); + XGIPART2, 0x35, f[0]); + xgifb_reg_set( + XGIPART2, 0x36, f[1]); + xgifb_reg_set( + XGIPART2, 0x37, f[2]); xgifb_reg_set( - XGIPART2, - 0x38, - (XGI_TV_filter[filter_tb]. - filter[filter][3])); + XGIPART2, 0x38, f[3]); } } } diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 7c7c8c8f1df3..1220d0cea87d 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -221,8 +221,8 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex, for (; XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID == tempbx; (*i)--) { - infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)]. - Ext_InfoFlag; + infoflag = + XGI330_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; if (infoflag & tempax) return 1; @@ -231,8 +231,8 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex, } for ((*i) = 0;; (*i)++) { - infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)]. - Ext_InfoFlag; + infoflag = + XGI330_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; if (XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID != tempbx) { return 0; @@ -5092,8 +5092,8 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, i = 0; do { - if (XGI330_RefIndex[RefreshRateTableIndex + i]. - ModeID != ModeNo) + if (XGI330_RefIndex[RefreshRateTableIndex + i].ModeID + != ModeNo) break; temp = XGI330_RefIndex[RefreshRateTableIndex + i].Ext_InfoFlag; temp &= ModeTypeMask; @@ -5484,7 +5484,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, return 0; pVBInfo->ModeType = XGI330_EModeIDTable[ModeIdIndex]. - Ext_ModeFlag & ModeTypeMask; + Ext_ModeFlag & ModeTypeMask; pVBInfo->SetFlag = 0;
[PATCH v2] staging: ks7010: remove code in comments.
Commenting Code Is a Bad Idea. Comments are their to explain the code and how the code achieves its goal and as codes in the comments does not explain what the code is doing so there is no use of commenting them. So in this patch codes in the comments are removed. Signed-off-by: Arushi Singhal --- changes in v2 - subject lines is made short. drivers/staging/ks7010/ks7010_sdio.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index 2c263f98bdbb..54aa2e2f516f 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -495,10 +495,6 @@ static void ks7010_rw_function(struct work_struct *work) /* wiat after WAKEUP */ while (time_after(priv->last_wakeup + ((30 * HZ) / 1000), jiffies)) { DPRINTK(4, "wait after WAKEUP\n"); -/* - * queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,&priv->ks_wlan_hw.rw_wq, - * (priv->last_wakeup + ((30*HZ)/1000) - jiffies)); - */ dev_info(&priv->ks_wlan_hw.sdio_card->func->dev, "wake: %lu %lu\n", priv->last_wakeup + (30 * HZ) / 1000, -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4] staging: xgifb: correct the multiple line dereference
Error was reported by checkpatch.pl as "Avoid multiple line dereference".And If there is boolean operator then it is fixed by Splitting line at boolean operator to satisfy coding style. Signed-off-by: Arushi Singhal --- changes in v4 - changes done such that no other errors can generate. - Improve the coding style. drivers/staging/xgifb/XGI_main_26.c | 30 +++--- drivers/staging/xgifb/vb_setmode.c | 14 +++--- 2 files changed, 14 insertions(+), 30 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 6930f7eb741b..825f7dcd2f49 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -878,30 +878,14 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info) } if ((filter >= 0) && (filter <= 7)) { + const u8 *f = XGI_TV_filter[filter_tb].filter[filter]; + pr_debug("FilterTable[%d]-%d: %*ph\n", -filter_tb, filter, -4, XGI_TV_filter[filter_tb]. - filter[filter]); - xgifb_reg_set( - XGIPART2, - 0x35, - (XGI_TV_filter[filter_tb]. - filter[filter][0])); - xgifb_reg_set( - XGIPART2, - 0x36, - (XGI_TV_filter[filter_tb]. - filter[filter][1])); - xgifb_reg_set( - XGIPART2, - 0x37, - (XGI_TV_filter[filter_tb]. - filter[filter][2])); - xgifb_reg_set( - XGIPART2, - 0x38, - (XGI_TV_filter[filter_tb]. - filter[filter][3])); +filter_tb, filter, 4, f); + xgifb_reg_set(XGIPART2, 0x35, f[0]); + xgifb_reg_set(XGIPART2, 0x36, f[1]); + xgifb_reg_set(XGIPART2, 0x37, f[2]); + xgifb_reg_set(XGIPART2, 0x38, f[3]); } } } diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 7c7c8c8f1df3..1220d0cea87d 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -221,8 +221,8 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex, for (; XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID == tempbx; (*i)--) { - infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)]. - Ext_InfoFlag; + infoflag = + XGI330_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; if (infoflag & tempax) return 1; @@ -231,8 +231,8 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex, } for ((*i) = 0;; (*i)++) { - infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)]. - Ext_InfoFlag; + infoflag = + XGI330_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; if (XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID != tempbx) { return 0; @@ -5092,8 +5092,8 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, i = 0; do { - if (XGI330_RefIndex[RefreshRateTableIndex + i]. - ModeID != ModeNo) + if (XGI330_RefIndex[RefreshRateTableIndex + i].ModeID + != ModeNo) break; temp = XGI330_RefIndex[RefreshRateTableIndex + i].Ext_InfoFlag; temp &= ModeTypeMask; @@ -5484,7 +5484,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, return 0; pVBInfo->ModeType = XGI330_EModeIDTable[ModeIdIndex]. - Ext_ModeFlag & ModeTypeMask; + Ext_ModeFlag & ModeTypeMask; pVBInfo->SetFlag = 0; pVBInfo->VBInfo = DisableCRT2Display; -- 2.11.0 __
[PATCH v4 1/2] staging: ks7010: Unnecessary parentheses are removed.
Unnecessary parentheses are removed as reported by checkpatch.pl to make coder nicer and to improve readability. Also coding style is improved.For example:- It's often nicer to read if &(foo[0]) is converted to foo like: memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); Signed-off-by: Arushi Singhal --- Changes in v4: - Commit message made more accurate and as per the changes. drivers/staging/ks7010/ks_hostif.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index b643a37fb943..1fbd495e5e63 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -113,7 +113,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) int rc = 0; DPRINTK(3, "\n"); - ap = &priv->current_ap; + ap = &(priv->current_ap); if ((priv->connect_status & CONNECT_STATUS_MASK) == DISCONNECT_STATUS) { memset(ap, 0, sizeof(struct local_ap_t)); @@ -121,19 +121,19 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) } /* bssid */ - memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); + memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); /* essid */ - memcpy(ap->ssid.body, priv->reg.ssid.body, + memcpy(&(ap->ssid.body[0]), &(priv->reg.ssid.body[0]), priv->reg.ssid.size); ap->ssid.size = priv->reg.ssid.size; /* rate_set */ - memcpy(ap->rate_set.body, ap_info->rate_set.body, + memcpy(&(ap->rate_set.body[0]), &(ap_info->rate_set.body[0]), ap_info->rate_set.size); ap->rate_set.size = ap_info->rate_set.size; if (ap_info->ext_rate_set.size) { /* rate_set */ - memcpy(&ap->rate_set.body[ap->rate_set.size], - ap_info->ext_rate_set.body, + memcpy(&(ap->rate_set.body[ap->rate_set.size]), + &(ap_info->ext_rate_set.body[0]), ap_info->ext_rate_set.size); ap->rate_set.size += ap_info->ext_rate_set.size; } @@ -153,11 +153,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->rsn_ie.id = 0x30; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->rsn_ie.size = ap_info->rsn.size; - memcpy(ap->rsn_ie.body, ap_info->rsn.body, + memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), ap_info->rsn.size); } else { ap->rsn_ie.size = RSN_IE_BODY_MAX; - memcpy(ap->rsn_ie.body, ap_info->rsn.body, + memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), RSN_IE_BODY_MAX); } } else if ((ap_info->rsn_mode & RSN_MODE_WPA) @@ -165,11 +165,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->wpa_ie.id = 0xdd; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->wpa_ie.size = ap_info->rsn.size; - memcpy(ap->wpa_ie.body, ap_info->rsn.body, + memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), ap_info->rsn.size); } else { ap->wpa_ie.size = RSN_IE_BODY_MAX; - memcpy(ap->wpa_ie.body, ap_info->rsn.body, + memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), RSN_IE_BODY_MAX); } } else { @@ -212,7 +212,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, memset(ap, 0, sizeof(struct local_ap_t)); /* bssid */ - memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); + memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); /* rssi */ ap->rssi = ap_info->rssi; /* sq */ @@ -224,7 +224,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, /* channel */ ap->channel = ap_info->ch_info; - bp = ap_info->body; + bp = &(ap_info->body[0]); bsize = ap_info->body_size; offset = 0; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4 2/2] staging: ks7010: Unnecessary parentheses are removed.
Unnecessary parentheses are removed as reported by checkpatch.pl to make coder nicer and to improve readability. Also coding style is improved.For example:- It's often nicer to read if &(foo[0]) is converted to foo like: memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); Signed-off-by: Arushi Singhal --- Changes in v4: - Commit message made more accurate and as per the changes. - previously versions were not marked. drivers/staging/ks7010/ks_hostif.c | 44 ++-- drivers/staging/ks7010/ks_wlan_net.c | 20 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 6e36aa2aea99..1fbd495e5e63 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -113,7 +113,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) int rc = 0; DPRINTK(3, "\n"); - ap = &priv->current_ap; + ap = &(priv->current_ap); if ((priv->connect_status & CONNECT_STATUS_MASK) == DISCONNECT_STATUS) { memset(ap, 0, sizeof(struct local_ap_t)); @@ -121,19 +121,19 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) } /* bssid */ - memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); + memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); /* essid */ - memcpy(ap->ssid.body, priv->reg.ssid.body, + memcpy(&(ap->ssid.body[0]), &(priv->reg.ssid.body[0]), priv->reg.ssid.size); ap->ssid.size = priv->reg.ssid.size; /* rate_set */ - memcpy(ap->rate_set.body, ap_info->rate_set.body, + memcpy(&(ap->rate_set.body[0]), &(ap_info->rate_set.body[0]), ap_info->rate_set.size); ap->rate_set.size = ap_info->rate_set.size; if (ap_info->ext_rate_set.size) { /* rate_set */ - memcpy(&ap->rate_set.body[ap->rate_set.size], - ap_info->ext_rate_set.body, + memcpy(&(ap->rate_set.body[ap->rate_set.size]), + &(ap_info->ext_rate_set.body[0]), ap_info->ext_rate_set.size); ap->rate_set.size += ap_info->ext_rate_set.size; } @@ -153,11 +153,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->rsn_ie.id = 0x30; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->rsn_ie.size = ap_info->rsn.size; - memcpy(ap->rsn_ie.body, ap_info->rsn.body, + memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), ap_info->rsn.size); } else { ap->rsn_ie.size = RSN_IE_BODY_MAX; - memcpy(ap->rsn_ie.body, ap_info->rsn.body, + memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), RSN_IE_BODY_MAX); } } else if ((ap_info->rsn_mode & RSN_MODE_WPA) @@ -165,11 +165,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->wpa_ie.id = 0xdd; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->wpa_ie.size = ap_info->rsn.size; - memcpy(ap->wpa_ie.body, ap_info->rsn.body, + memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), ap_info->rsn.size); } else { ap->wpa_ie.size = RSN_IE_BODY_MAX; - memcpy(ap->wpa_ie.body, ap_info->rsn.body, + memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), RSN_IE_BODY_MAX); } } else { @@ -212,7 +212,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, memset(ap, 0, sizeof(struct local_ap_t)); /* bssid */ - memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); + memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); /* rssi */ ap->rssi = ap_info->rssi; /* sq */ @@ -224,7 +224,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, /* channel */ ap->channel = ap_info->ch_info; - bp = ap_info->body; + bp = &(ap_info->body[0]); bsize = ap_info->body_size; offset = 0; @@ -239,19 +239,19
[PATCH v5] staging: xgifb: correct the multiple line dereference
Error reported by checkpatch.pl as "avoid multiple line dereference". Addition of new variables to make the code more readable and also to correct about mentioned error as by itroducing new variables line is not exceeding 80 characters. Signed-off-by: Arushi Singhal --- changes in v5 - changes done such that no other errors can generate. - Improve the coding style. - Introduced new variables. drivers/staging/xgifb/XGI_main_26.c | 29 ++--- drivers/staging/xgifb/vb_setmode.c | 17 +++-- 2 files changed, 17 insertions(+), 29 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 69ed137337ce..9870ea3b76b4 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -878,30 +878,13 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info) } if ((filter >= 0) && (filter <= 7)) { + const u8 *f = XGI_TV_filter[filter_tb].filter[filter]; pr_debug("FilterTable[%d]-%d: %*ph\n", -filter_tb, filter, -4, XGI_TV_filter[filter_tb]. - filter[filter]); - xgifb_reg_set( - XGIPART2, - 0x35, - (XGI_TV_filter[filter_tb]. - filter[filter][0])); - xgifb_reg_set( - XGIPART2, - 0x36, - (XGI_TV_filter[filter_tb]. - filter[filter][1])); - xgifb_reg_set( - XGIPART2, - 0x37, - (XGI_TV_filter[filter_tb]. - filter[filter][2])); - xgifb_reg_set( - XGIPART2, - 0x38, - (XGI_TV_filter[filter_tb]. - filter[filter][3])); +filter_tb, filter, 4, f); + xgifb_reg_set(XGIPART2, 0x35, f[0]); + xgifb_reg_set(XGIPART2, 0x36, f[1]); + xgifb_reg_set(XGIPART2, 0x37, f[2]); + xgifb_reg_set(XGIPART2, 0x38, f[3]); } } } diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 7c7c8c8f1df3..b18da43319e1 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -221,8 +221,11 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex, for (; XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID == tempbx; (*i)--) { - infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)]. - Ext_InfoFlag; + int j; + + j = XGI330_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; + infoflag = j; + if (infoflag & tempax) return 1; @@ -231,8 +234,11 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex, } for ((*i) = 0;; (*i)++) { - infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)]. - Ext_InfoFlag; + int m; + + m = XGI330_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; + infoflag = m; + if (XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID != tempbx) { return 0; @@ -5092,8 +5098,7 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, i = 0; do { - if (XGI330_RefIndex[RefreshRateTableIndex + i]. - ModeID != ModeNo) + if (XGI330_RefIndex[RefreshRateTableIndex + i].ModeID != ModeNo) break; temp = XGI330_RefIndex[RefreshRateTableIndex + i].Ext_InfoFlag; temp &= ModeTypeMask; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v6] staging: xgifb: correct the multiple line dereference
Error reported by checkpatch.pl as "avoid multiple line dereference". Addition of new variables to make the code more readable and also to correct about mentioned error as by itroducing new variables line is not exceeding 80 characters. Signed-off-by: Arushi Singhal --- changes in v6 - changes done such that no other errors can generate. - Improve the coding style. - Introduced new variables. - type of the variable is changed. drivers/staging/xgifb/XGI_main_26.c | 29 ++--- drivers/staging/xgifb/vb_setmode.c | 17 +++-- 2 files changed, 17 insertions(+), 29 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 69ed137337ce..9870ea3b76b4 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -878,30 +878,13 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info) } if ((filter >= 0) && (filter <= 7)) { + const u8 *f = XGI_TV_filter[filter_tb].filter[filter]; pr_debug("FilterTable[%d]-%d: %*ph\n", -filter_tb, filter, -4, XGI_TV_filter[filter_tb]. - filter[filter]); - xgifb_reg_set( - XGIPART2, - 0x35, - (XGI_TV_filter[filter_tb]. - filter[filter][0])); - xgifb_reg_set( - XGIPART2, - 0x36, - (XGI_TV_filter[filter_tb]. - filter[filter][1])); - xgifb_reg_set( - XGIPART2, - 0x37, - (XGI_TV_filter[filter_tb]. - filter[filter][2])); - xgifb_reg_set( - XGIPART2, - 0x38, - (XGI_TV_filter[filter_tb]. - filter[filter][3])); +filter_tb, filter, 4, f); + xgifb_reg_set(XGIPART2, 0x35, f[0]); + xgifb_reg_set(XGIPART2, 0x36, f[1]); + xgifb_reg_set(XGIPART2, 0x37, f[2]); + xgifb_reg_set(XGIPART2, 0x38, f[3]); } } } diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 7c7c8c8f1df3..249a32804c06 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -221,8 +221,11 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex, for (; XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID == tempbx; (*i)--) { - infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)]. - Ext_InfoFlag; + unsigned short j; + + j = XGI330_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; + infoflag = j; + if (infoflag & tempax) return 1; @@ -231,8 +234,11 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex, } for ((*i) = 0;; (*i)++) { - infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)]. - Ext_InfoFlag; + unsigned short m; + + m = XGI330_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; + infoflag = m; + if (XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID != tempbx) { return 0; @@ -5092,8 +5098,7 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, i = 0; do { - if (XGI330_RefIndex[RefreshRateTableIndex + i]. - ModeID != ModeNo) + if (XGI330_RefIndex[RefreshRateTableIndex + i].ModeID != ModeNo) break; temp = XGI330_RefIndex[RefreshRateTableIndex + i].Ext_InfoFlag; temp &= ModeTypeMask; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v7] staging: xgifb: correct the multiple line dereference
Error reported by checkpatch.pl as "avoid multiple line dereference". Addition of new variables to make the code more readable. Signed-off-by: Arushi Singhal --- changes in v7 - Improve the coding style. - Introduced new variables. drivers/staging/xgifb/XGI_main_26.c | 29 ++--- drivers/staging/xgifb/vb_setmode.c | 11 +-- 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 69ed137337ce..9870ea3b76b4 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -878,30 +878,13 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info) } if ((filter >= 0) && (filter <= 7)) { + const u8 *f = XGI_TV_filter[filter_tb].filter[filter]; pr_debug("FilterTable[%d]-%d: %*ph\n", -filter_tb, filter, -4, XGI_TV_filter[filter_tb]. - filter[filter]); - xgifb_reg_set( - XGIPART2, - 0x35, - (XGI_TV_filter[filter_tb]. - filter[filter][0])); - xgifb_reg_set( - XGIPART2, - 0x36, - (XGI_TV_filter[filter_tb]. - filter[filter][1])); - xgifb_reg_set( - XGIPART2, - 0x37, - (XGI_TV_filter[filter_tb]. - filter[filter][2])); - xgifb_reg_set( - XGIPART2, - 0x38, - (XGI_TV_filter[filter_tb]. - filter[filter][3])); +filter_tb, filter, 4, f); + xgifb_reg_set(XGIPART2, 0x35, f[0]); + xgifb_reg_set(XGIPART2, 0x36, f[1]); + xgifb_reg_set(XGIPART2, 0x37, f[2]); + xgifb_reg_set(XGIPART2, 0x38, f[3]); } } } diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 7c7c8c8f1df3..ab84adbc542d 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -221,8 +221,8 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex, for (; XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID == tempbx; (*i)--) { - infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)]. - Ext_InfoFlag; + infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; + if (infoflag & tempax) return 1; @@ -231,8 +231,8 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex, } for ((*i) = 0;; (*i)++) { - infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)]. - Ext_InfoFlag; + infoflag = XGI330_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; + if (XGI330_RefIndex[RefreshRateTableIndex + (*i)].ModeID != tempbx) { return 0; @@ -5092,8 +5092,7 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, i = 0; do { - if (XGI330_RefIndex[RefreshRateTableIndex + i]. - ModeID != ModeNo) + if (XGI330_RefIndex[RefreshRateTableIndex + i].ModeID != ModeNo) break; temp = XGI330_RefIndex[RefreshRateTableIndex + i].Ext_InfoFlag; temp &= ModeTypeMask; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: ks7010: Unnecessary parentheses removed and improved coding style.
Unnecessary parentheses are removed as reported by checkpatch.pl to make coder nicer and to improve readability. Also coding style is improved as it's often nicer to read if &(foo[0]) is converted to foo like: memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks_hostif.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index a533408cf0b9..ae7cf3ffae8e 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -113,7 +113,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) int rc = 0; DPRINTK(3, "\n"); - ap = &(priv->current_ap); + ap = &priv->current_ap; if ((priv->connect_status & CONNECT_STATUS_MASK) == DISCONNECT_STATUS) { memset(ap, 0, sizeof(struct local_ap_t)); @@ -121,19 +121,19 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) } /* bssid */ - memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); + memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); /* essid */ - memcpy(&(ap->ssid.body[0]), &(priv->reg.ssid.body[0]), + memcpy(ap->ssid.body, priv->reg.ssid.body, priv->reg.ssid.size); ap->ssid.size = priv->reg.ssid.size; /* rate_set */ - memcpy(&(ap->rate_set.body[0]), &(ap_info->rate_set.body[0]), + memcpy(ap->rate_set.body, ap_info->rate_set.body, ap_info->rate_set.size); ap->rate_set.size = ap_info->rate_set.size; if (ap_info->ext_rate_set.size) { /* rate_set */ - memcpy(&(ap->rate_set.body[ap->rate_set.size]), - &(ap_info->ext_rate_set.body[0]), + memcpy(&ap->rate_set.body[ap->rate_set.size], + ap_info->ext_rate_set.body, ap_info->ext_rate_set.size); ap->rate_set.size += ap_info->ext_rate_set.size; } @@ -153,11 +153,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->rsn_ie.id = 0x30; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->rsn_ie.size = ap_info->rsn.size; - memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->rsn_ie.body, ap_info->rsn.body, ap_info->rsn.size); } else { ap->rsn_ie.size = RSN_IE_BODY_MAX; - memcpy(&(ap->rsn_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->rsn_ie.body, ap_info->rsn.body, RSN_IE_BODY_MAX); } } else if ((ap_info->rsn_mode & RSN_MODE_WPA) @@ -165,11 +165,11 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) ap->wpa_ie.id = 0xdd; if (ap_info->rsn.size <= RSN_IE_BODY_MAX) { ap->wpa_ie.size = ap_info->rsn.size; - memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->wpa_ie.body, ap_info->rsn.body, ap_info->rsn.size); } else { ap->wpa_ie.size = RSN_IE_BODY_MAX; - memcpy(&(ap->wpa_ie.body[0]), &(ap_info->rsn.body[0]), + memcpy(ap->wpa_ie.body, ap_info->rsn.body, RSN_IE_BODY_MAX); } } else { @@ -184,7 +184,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) wrqu.ap_addr.sa_family = ARPHRD_ETHER; if ((priv->connect_status & CONNECT_STATUS_MASK) == CONNECT_STATUS) { memcpy(wrqu.ap_addr.sa_data, - &(priv->current_ap.bssid[0]), ETH_ALEN); + priv->current_ap.bssid, ETH_ALEN); DPRINTK(3, "IWEVENT: connect bssid=%pM\n", wrqu.ap_addr.sa_data); wireless_send_event(netdev, SIOCGIWAP, &wrqu, NULL); @@ -212,7 +212,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, memset(ap, 0, sizeof(struct local_ap_t)); /* bssid */ - memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); + memcpy(ap->bssid, ap_info->bssid, ETH_ALEN);
[PATCH] staging: ks7010: Unnecessary parentheses removed and improved coding style.
Unnecessary parentheses are removed as reported by checkpatch.pl to make coder nicer and to improve readability. Also coding style is improved as it's often nicer to read if &(foo[0]) is converted to foo like: memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks_hostif.c | 23 +++ drivers/staging/ks7010/ks_wlan_net.c | 18 +- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index ae7cf3ffae8e..946bb784935f 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -239,19 +239,19 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->ssid.size = SSID_MAX_SIZE; } - memcpy(&(ap->ssid.body[0]), bp + 2, ap->ssid.size); + memcpy(ap->ssid.body, bp + 2, ap->ssid.size); break; case 1: /* rate */ case 50:/* ext rate */ if ((*(bp + 1) + ap->rate_set.size) <= RATE_SET_MAX_SIZE) { - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, *(bp + 1)); ap->rate_set.size += *(bp + 1); } else { DPRINTK(1, "size over :: rate size=%d\n", (*(bp + 1) + ap->rate_set.size)); - memcpy(&(ap->rate_set.body[ap->rate_set.size]), + memcpy(&ap->rate_set.body[ap->rate_set.size], bp + 2, RATE_SET_MAX_SIZE - ap->rate_set.size); ap->rate_set.size += @@ -269,7 +269,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->rsn_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->rsn_ie.body[0]), bp + 2, ap->rsn_ie.size); + memcpy(ap->rsn_ie.body, bp + 2, ap->rsn_ie.size); break; case 221: /* WPA */ if (!memcmp(bp + 2, "\x00\x50\xf2\x01", 4)) { /* WPA OUI check */ @@ -282,7 +282,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, *(bp + 1)); ap->wpa_ie.size = RSN_IE_BODY_MAX; } - memcpy(&(ap->wpa_ie.body[0]), bp + 2, + memcpy(ap->wpa_ie.body, bp + 2, ap->wpa_ie.size); } break; @@ -828,13 +828,12 @@ void hostif_scan_indication(struct ks_wlan_private *priv) if (priv->scan_ind_count != 0) { for (i = 0; i < priv->aplist.size; i++) { /* bssid check */ if (!memcmp - (&(ap_info->bssid[0]), -&(priv->aplist.ap[i].bssid[0]), ETH_ALEN)) { + (ap_info->bssid, +priv->aplist.ap[i].bssid, ETH_ALEN)) { if (ap_info->frame_type == FRAME_TYPE_PROBE_RESP) get_ap_information(priv, ap_info, - &(priv->aplist. -ap[i])); + &priv->aplist.ap[i]); return; } } @@ -2639,7 +2638,7 @@ int hostif_init(struct ks_wlan_private *priv) priv->aplist.size = 0; for (i = 0; i < LOCAL_APLIST_MAX; i++) - memset(&(priv->aplist.ap[i]), 0, sizeof(struct local_ap_t)); + memset(&priv->aplist.ap[i], 0, sizeof(struct local_ap_t)); priv->infra_status = 0; priv->current_rate = 4; priv->connect_status = DISCONNECT_STATUS; @@ -2662,12 +2661,12 @@ int hostif_init(struct ks_wlan_private *priv) INIT_WORK(&priv->ks_wlan_wakeup_
[PATCH] staging: xgifb: Improved coding style
New variable is added to make the code more readable. Signed-off-by: Arushi Singhal --- drivers/staging/xgifb/XGI_main_26.c | 29 ++--- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 69ed137337ce..9870ea3b76b4 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -878,30 +878,13 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info) } if ((filter >= 0) && (filter <= 7)) { + const u8 *f = XGI_TV_filter[filter_tb].filter[filter]; pr_debug("FilterTable[%d]-%d: %*ph\n", -filter_tb, filter, -4, XGI_TV_filter[filter_tb]. - filter[filter]); - xgifb_reg_set( - XGIPART2, - 0x35, - (XGI_TV_filter[filter_tb]. - filter[filter][0])); - xgifb_reg_set( - XGIPART2, - 0x36, - (XGI_TV_filter[filter_tb]. - filter[filter][1])); - xgifb_reg_set( - XGIPART2, - 0x37, - (XGI_TV_filter[filter_tb]. - filter[filter][2])); - xgifb_reg_set( - XGIPART2, - 0x38, - (XGI_TV_filter[filter_tb]. - filter[filter][3])); +filter_tb, filter, 4, f); + xgifb_reg_set(XGIPART2, 0x35, f[0]); + xgifb_reg_set(XGIPART2, 0x36, f[1]); + xgifb_reg_set(XGIPART2, 0x37, f[2]); + xgifb_reg_set(XGIPART2, 0x38, f[3]); } } } -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: iio: ad9832: Move header file content to source file
The contents of the header file are used only by this single source file. Move content into .c and remove .h. Signed-off-by: Arushi Singhal --- drivers/staging/iio/frequency/ad9832.c | 100 +- drivers/staging/iio/frequency/ad9832.h | 128 - 2 files changed, 99 insertions(+), 129 deletions(-) delete mode 100644 drivers/staging/iio/frequency/ad9832.h diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c index a5b2f068168d..8302ec91b2d7 100644 --- a/drivers/staging/iio/frequency/ad9832.c +++ b/drivers/staging/iio/frequency/ad9832.c @@ -20,7 +20,105 @@ #include #include "dds.h" -#include "ad9832.h" +#define AD9832_FREQ0LL 0x0 +#define AD9832_FREQ0HL 0x1 +#define AD9832_FREQ0LM 0x2 +#define AD9832_FREQ0HM 0x3 +#define AD9832_FREQ1LL 0x4 +#define AD9832_FREQ1HL 0x5 +#define AD9832_FREQ1LM 0x6 +#define AD9832_FREQ1HM 0x7 +#define AD9832_PHASE0L 0x8 +#define AD9832_PHASE0H 0x9 +#define AD9832_PHASE1L 0xA +#define AD9832_PHASE1H 0xB +#define AD9832_PHASE2L 0xC +#define AD9832_PHASE2H 0xD +#define AD9832_PHASE3L 0xE +#define AD9832_PHASE3H 0xF + +#define AD9832_PHASE_SYM 0x10 +#define AD9832_FREQ_SYM0x11 +#define AD9832_PINCTRL_EN 0x12 +#define AD9832_OUTPUT_EN 0x13 + +/* Command Control Bits */ + +#define AD9832_CMD_PHA8BITSW 0x1 +#define AD9832_CMD_PHA16BITSW 0x0 +#define AD9832_CMD_FRE8BITSW 0x3 +#define AD9832_CMD_FRE16BITSW 0x2 +#define AD9832_CMD_FPSELECT0x6 +#define AD9832_CMD_SYNCSELSRC 0x8 +#define AD9832_CMD_SLEEPRESCLR 0xC + +#define AD9832_FREQBIT(11) +#define AD9832_PHASE(x)(((x) & 3) << 9) +#define AD9832_SYNCBIT(13) +#define AD9832_SELSRC BIT(12) +#define AD9832_SLEEP BIT(13) +#define AD9832_RESET BIT(12) +#define AD9832_CLR BIT(11) +#define CMD_SHIFT 12 +#define ADD_SHIFT 8 +#define AD9832_FREQ_BITS 32 +#define AD9832_PHASE_BITS 12 +#define RES_MASK(bits) ((1 << (bits)) - 1) + +/** + * struct ad9832_state - driver instance specific data + * @spi: spi_device + * @avdd: supply regulator for the analog section + * @dvdd: supply regulator for the digital section + * @mclk: external master clock + * @ctrl_fp: cached frequency/phase control word + * @ctrl_ss: cached sync/selsrc control word + * @ctrl_src: cached sleep/reset/clr word + * @xfer: default spi transfer + * @msg: default spi message + * @freq_xfer: tuning word spi transfer + * @freq_msg: tuning word spi message + * @phase_xfer:tuning word spi transfer + * @phase_msg: tuning word spi message + * @data: spi transmit buffer + * @phase_data:tuning word spi transmit buffer + * @freq_data: tuning word spi transmit buffer + */ + +struct ad9832_state { + struct spi_device *spi; + struct regulator*avdd; + struct regulator*dvdd; + unsigned long mclk; + unsigned short ctrl_fp; + unsigned short ctrl_ss; + unsigned short ctrl_src; + struct spi_transfer xfer; + struct spi_message msg; + struct spi_transfer freq_xfer[4]; + struct spi_message freq_msg; + struct spi_transfer phase_xfer[2]; + struct spi_message phase_msg; + /* +* DMA (thus cache coherency maintenance) requires the +* transfer buffers to live in their own cache lines. +*/ + union { + __be16 freq_data[4]cacheline_aligned; + __be16 phase_data[2]; + __be16 data; + }; +}; + +struct ad9832_platform_data { + unsigned long mclk; + unsigned long freq0; + unsigned long freq1; + unsigned short phase0; + unsigned short phase1; + unsigned short phase2; + unsigned short phase3; +}; static unsigned long ad9832_calc_freqreg(unsigned long mclk, unsigned long fout) { diff --git a/drivers/staging/iio/frequency/ad9832.h b/drivers/staging/iio/frequency/ad9832.h deleted file mode 100644 index 1b08b04482a4.. --- a/drivers/staging/iio/frequency/ad9832.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * AD9832 SPI DDS driver - * - * Copyright 2011 Analog Devices Inc. - * - * Licensed under the GPL-2 or later. - */ -#ifndef IIO_DDS_AD9832_H_ -#define IIO_DDS_AD9832_H_ - -/* Registers */ -
[PATCH] staging: speakup: Comparison to NULL could be written
Fixed coding style for null comparisons in speakup driver to be more consistant with the rest of the kernel coding style. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/fakekey.c | 2 +- drivers/staging/speakup/kobjects.c | 2 +- drivers/staging/speakup/main.c | 38 +++--- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/staging/speakup/fakekey.c b/drivers/staging/speakup/fakekey.c index d76da0a1382c..294c74b47224 100644 --- a/drivers/staging/speakup/fakekey.c +++ b/drivers/staging/speakup/fakekey.c @@ -56,7 +56,7 @@ int speakup_add_virtual_keyboard(void) void speakup_remove_virtual_keyboard(void) { - if (virt_keyboard != NULL) { + if (virt_keyboard) { input_unregister_device(virt_keyboard); virt_keyboard = NULL; } diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c index 5d871ec3693c..fdd6e4b33951 100644 --- a/drivers/staging/speakup/kobjects.c +++ b/drivers/staging/speakup/kobjects.c @@ -391,7 +391,7 @@ static ssize_t synth_store(struct kobject *kobj, struct kobj_attribute *attr, len--; new_synth_name[len] = '\0'; spk_strlwr(new_synth_name); - if ((synth != NULL) && (!strcmp(new_synth_name, synth->name))) { + if ((synth) && (!strcmp(new_synth_name, synth->name))) { pr_warn("%s already in use\n", new_synth_name); } else if (synth_init(new_synth_name) != 0) { pr_warn("failed to init synth %s\n", new_synth_name); diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index c2f70ef5b9b3..3d3d62c7a5ef 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -299,7 +299,7 @@ static void speakup_shut_up(struct vc_data *vc) spk_shut_up |= 0x01; spk_parked &= 0xfe; speakup_date(vc); - if (synth != NULL) + if (synth) spk_do_flush(); } @@ -441,7 +441,7 @@ static void speak_char(u_char ch) synth_printf("%s", spk_str_caps_stop); return; } - if (cp == NULL) { + if (!cp) { pr_info("speak_char: cp == NULL!\n"); return; } @@ -1157,7 +1157,7 @@ static void do_handle_shift(struct vc_data *vc, u_char value, char up_flag) { unsigned long flags; - if (synth == NULL || up_flag || spk_killed) + if (!synth || up_flag || spk_killed) return; spin_lock_irqsave(&speakup_info.spinlock, flags); if (cursor_track == read_all_mode) { @@ -1195,7 +1195,7 @@ static void do_handle_latin(struct vc_data *vc, u_char value, char up_flag) spin_unlock_irqrestore(&speakup_info.spinlock, flags); return; } - if (synth == NULL || spk_killed) { + if (!synth || spk_killed) { spin_unlock_irqrestore(&speakup_info.spinlock, flags); return; } @@ -1279,7 +1279,7 @@ void spk_reset_default_chars(void) /* First, free any non-default */ for (i = 0; i < 256; i++) { - if ((spk_characters[i] != NULL) + if ((spk_characters[i]) && (spk_characters[i] != spk_default_chars[i])) kfree(spk_characters[i]); } @@ -1321,10 +1321,10 @@ static int speakup_allocate(struct vc_data *vc) int vc_num; vc_num = vc->vc_num; - if (speakup_console[vc_num] == NULL) { + if (!speakup_console[vc_num]) { speakup_console[vc_num] = kzalloc(sizeof(*speakup_console[0]), GFP_ATOMIC); - if (speakup_console[vc_num] == NULL) + if (!speakup_console[vc_num]) return -ENOMEM; speakup_date(vc); } else if (!spk_parked) @@ -1373,7 +1373,7 @@ static void kbd_fakekey2(struct vc_data *vc, int command) static void read_all_doc(struct vc_data *vc) { - if ((vc->vc_num != fg_console) || synth == NULL || spk_shut_up) + if ((vc->vc_num != fg_console) || !synth || spk_shut_up) return; if (!synth_supports_indexing()) return; @@ -1487,7 +1487,7 @@ static int pre_handle_cursor(struct vc_data *vc, u_char value, char up_flag) spin_lock_irqsave(&speakup_info.spinlock, flags); if (cursor_track == read_all_mode) { spk_parked &= 0xfe; - if (synth == NULL || up_flag || spk_shut_up) { + if (!synth || up_flag || spk_shut_up) { spin_unlock_irqrestore(&speakup_info.spinlock, flags); return NOTIFY_STOP; } @@ -1509,7 +1509,7 @@ static void do_handle_cursor(struct vc_data
[PATCH] staging: speakup:indentation should use tabs
Indentation should always use tabs and never spaces. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/i18n.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index 1a3e34880ac1..11f1418b4006 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -552,7 +552,7 @@ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) if (index >= MSG_FORMATTED_START && index <= MSG_FORMATTED_END && !fmt_validate(speakup_default_msgs[index], - newstr)) { + newstr)) { kfree(newstr); return -EINVAL; } -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: speakup: Alignment match open parenthesis
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis" Signed-off-by: Arushi Singhal --- drivers/staging/speakup/i18n.c | 2 +- drivers/staging/speakup/kobjects.c | 38 +++--- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index 11f1418b4006..ac1ebead3c3f 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -607,7 +607,7 @@ void spk_reset_msg_group(struct msg_group_t *group) void spk_initialize_msgs(void) { memcpy(speakup_msgs, speakup_default_msgs, - sizeof(speakup_default_msgs)); + sizeof(speakup_default_msgs)); } /* Free user-supplied strings when module is unloaded: */ diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c index fdd6e4b33951..61656c7c2dc9 100644 --- a/drivers/staging/speakup/kobjects.c +++ b/drivers/staging/speakup/kobjects.c @@ -79,7 +79,7 @@ static ssize_t chars_chartab_show(struct kobject *kobj, * character descriptions or chartab entries. */ static void report_char_chartab_status(int reset, int received, int used, - int rejected, int do_characters) + int rejected, int do_characters) { static char const *object_type[] = { "character class entries", @@ -92,7 +92,7 @@ static void report_char_chartab_status(int reset, int received, int used, pr_info("%s reset to defaults\n", object_type[do_characters]); } else if (received) { len = snprintf(buf, sizeof(buf), - " updated %d of %d %s\n", + " updated %d of %d %s\n", used, received, object_type[do_characters]); if (rejected) snprintf(buf + (len - 1), sizeof(buf) - (len - 1), @@ -213,7 +213,7 @@ static ssize_t chars_chartab_store(struct kobject *kobj, spin_unlock_irqrestore(&speakup_info.spinlock, flags); report_char_chartab_status(reset, received, used, rejected, - do_characters); + do_characters); return retval; } @@ -221,7 +221,7 @@ static ssize_t chars_chartab_store(struct kobject *kobj, * This is called when a user reads the keymap parameter. */ static ssize_t keymap_show(struct kobject *kobj, struct kobj_attribute *attr, - char *buf) + char *buf) { char *cp = buf; int i; @@ -257,7 +257,7 @@ static ssize_t keymap_show(struct kobject *kobj, struct kobj_attribute *attr, * This is called when a user changes the keymap parameter. */ static ssize_t keymap_store(struct kobject *kobj, struct kobj_attribute *attr, - const char *buf, size_t count) +const char *buf, size_t count) { int i; ssize_t ret = count; @@ -291,9 +291,9 @@ static ssize_t keymap_store(struct kobject *kobj, struct kobj_attribute *attr, 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)) { + i + SHIFT_TBL_SIZE + 4 >= sizeof(spk_key_buf)) { pr_warn("i %d %d %d %d\n", i, - (int)cp1[-3], (int)cp1[-2], (int)cp1[-1]); + (int)cp1[-3], (int)cp1[-2], (int)cp1[-1]); kfree(in_buff); spin_unlock_irqrestore(&speakup_info.spinlock, flags); return -EINVAL; @@ -307,7 +307,7 @@ static ssize_t keymap_store(struct kobject *kobj, struct kobj_attribute *attr, if (i != 0 || cp1[-1] != KEY_MAP_VER || cp1[-2] != 0) { ret = -EINVAL; pr_warn("end %d %d %d %d\n", i, - (int)cp1[-3], (int)cp1[-2], (int)cp1[-1]); + (int)cp1[-3], (int)cp1[-2], (int)cp1[-1]); } else { if (spk_set_key_info(in_buff, spk_key_buf)) { spk_set_key_info(spk_key_defaults, spk_key_buf); @@ -324,7 +324,7 @@ static ssize_t keymap_store(struct kobject *kobj, struct kobj_attribute *attr, * This is called when a user changes the value of the silent parameter. */ static ssize_t silent_store(struct kobject *kobj, struct kobj_attribute *attr, - const char *buf, size_t count) +const char *buf, size_t count) { int len; struct vc_data *vc = vc_cons[fg_console].d; @@ -363,7 +363,7 @@ static ssize_t silent_store(struct kobject *kobj, struct kobj_attribute *attr, * This is called when a user reads the synth setting. */ static ssize_t synth_show(struct kobject *kobj, struct kobj_attribute *attr, - char *buf) +
[PATCH v2] staging: speakup: Comparison to NULL could be written
Fixed coding style for null comparisons in speakup driver to be more consistant with the rest of the kernel coding style. Signed-off-by: Arushi Singhal --- changes in v2 - fixed coding style error and upto the coding style. drivers/staging/speakup/fakekey.c | 2 +- drivers/staging/speakup/kobjects.c | 2 +- drivers/staging/speakup/main.c | 38 +++--- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/staging/speakup/fakekey.c b/drivers/staging/speakup/fakekey.c index d76da0a1382c..294c74b47224 100644 --- a/drivers/staging/speakup/fakekey.c +++ b/drivers/staging/speakup/fakekey.c @@ -56,7 +56,7 @@ int speakup_add_virtual_keyboard(void) void speakup_remove_virtual_keyboard(void) { - if (virt_keyboard != NULL) { + if (virt_keyboard) { input_unregister_device(virt_keyboard); virt_keyboard = NULL; } diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c index 5d871ec3693c..2fef55569bfd 100644 --- a/drivers/staging/speakup/kobjects.c +++ b/drivers/staging/speakup/kobjects.c @@ -391,7 +391,7 @@ static ssize_t synth_store(struct kobject *kobj, struct kobj_attribute *attr, len--; new_synth_name[len] = '\0'; spk_strlwr(new_synth_name); - if ((synth != NULL) && (!strcmp(new_synth_name, synth->name))) { + if (synth && !strcmp(new_synth_name, synth->name)) { pr_warn("%s already in use\n", new_synth_name); } else if (synth_init(new_synth_name) != 0) { pr_warn("failed to init synth %s\n", new_synth_name); diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index c2f70ef5b9b3..a12ec2b061fe 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -299,7 +299,7 @@ static void speakup_shut_up(struct vc_data *vc) spk_shut_up |= 0x01; spk_parked &= 0xfe; speakup_date(vc); - if (synth != NULL) + if (synth) spk_do_flush(); } @@ -441,7 +441,7 @@ static void speak_char(u_char ch) synth_printf("%s", spk_str_caps_stop); return; } - if (cp == NULL) { + if (!cp) { pr_info("speak_char: cp == NULL!\n"); return; } @@ -1157,7 +1157,7 @@ static void do_handle_shift(struct vc_data *vc, u_char value, char up_flag) { unsigned long flags; - if (synth == NULL || up_flag || spk_killed) + if (!synth || up_flag || spk_killed) return; spin_lock_irqsave(&speakup_info.spinlock, flags); if (cursor_track == read_all_mode) { @@ -1195,7 +1195,7 @@ static void do_handle_latin(struct vc_data *vc, u_char value, char up_flag) spin_unlock_irqrestore(&speakup_info.spinlock, flags); return; } - if (synth == NULL || spk_killed) { + if (!synth || spk_killed) { spin_unlock_irqrestore(&speakup_info.spinlock, flags); return; } @@ -1279,7 +1279,7 @@ void spk_reset_default_chars(void) /* First, free any non-default */ for (i = 0; i < 256; i++) { - if ((spk_characters[i] != NULL) + if (spk_characters[i] && (spk_characters[i] != spk_default_chars[i])) kfree(spk_characters[i]); } @@ -1321,10 +1321,10 @@ static int speakup_allocate(struct vc_data *vc) int vc_num; vc_num = vc->vc_num; - if (speakup_console[vc_num] == NULL) { + if (!speakup_console[vc_num]) { speakup_console[vc_num] = kzalloc(sizeof(*speakup_console[0]), GFP_ATOMIC); - if (speakup_console[vc_num] == NULL) + if (!speakup_console[vc_num]) return -ENOMEM; speakup_date(vc); } else if (!spk_parked) @@ -1373,7 +1373,7 @@ static void kbd_fakekey2(struct vc_data *vc, int command) static void read_all_doc(struct vc_data *vc) { - if ((vc->vc_num != fg_console) || synth == NULL || spk_shut_up) + if ((vc->vc_num != fg_console) || !synth || spk_shut_up) return; if (!synth_supports_indexing()) return; @@ -1487,7 +1487,7 @@ static int pre_handle_cursor(struct vc_data *vc, u_char value, char up_flag) spin_lock_irqsave(&speakup_info.spinlock, flags); if (cursor_track == read_all_mode) { spk_parked &= 0xfe; - if (synth == NULL || up_flag || spk_shut_up) { + if (!synth || up_flag || spk_shut_up) { spin_unlock_irqrestore(&speakup_info.spinlock, flags); return NOTIFY_STOP; } @@ -150
[PATCH] staging: speakup: Alignment match open parenthesis
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal --- changes in v2 - Aligned the lines which are not aligned in previous patch. drivers/staging/speakup/i18n.c | 2 +- drivers/staging/speakup/kobjects.c | 40 +++--- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index 11f1418b4006..ac1ebead3c3f 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -607,7 +607,7 @@ void spk_reset_msg_group(struct msg_group_t *group) void spk_initialize_msgs(void) { memcpy(speakup_msgs, speakup_default_msgs, - sizeof(speakup_default_msgs)); + sizeof(speakup_default_msgs)); } /* Free user-supplied strings when module is unloaded: */ diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c index 2fef55569bfd..8c93188b832c 100644 --- a/drivers/staging/speakup/kobjects.c +++ b/drivers/staging/speakup/kobjects.c @@ -79,7 +79,7 @@ static ssize_t chars_chartab_show(struct kobject *kobj, * character descriptions or chartab entries. */ static void report_char_chartab_status(int reset, int received, int used, - int rejected, int do_characters) + int rejected, int do_characters) { static char const *object_type[] = { "character class entries", @@ -92,8 +92,8 @@ static void report_char_chartab_status(int reset, int received, int used, pr_info("%s reset to defaults\n", object_type[do_characters]); } else if (received) { len = snprintf(buf, sizeof(buf), - " updated %d of %d %s\n", - used, received, object_type[do_characters]); + " updated %d of %d %s\n", + used, received, object_type[do_characters]); if (rejected) snprintf(buf + (len - 1), sizeof(buf) - (len - 1), " with %d reject%s\n", @@ -213,7 +213,7 @@ static ssize_t chars_chartab_store(struct kobject *kobj, spin_unlock_irqrestore(&speakup_info.spinlock, flags); report_char_chartab_status(reset, received, used, rejected, - do_characters); + do_characters); return retval; } @@ -221,7 +221,7 @@ static ssize_t chars_chartab_store(struct kobject *kobj, * This is called when a user reads the keymap parameter. */ static ssize_t keymap_show(struct kobject *kobj, struct kobj_attribute *attr, - char *buf) + char *buf) { char *cp = buf; int i; @@ -257,7 +257,7 @@ static ssize_t keymap_show(struct kobject *kobj, struct kobj_attribute *attr, * This is called when a user changes the keymap parameter. */ static ssize_t keymap_store(struct kobject *kobj, struct kobj_attribute *attr, - const char *buf, size_t count) +const char *buf, size_t count) { int i; ssize_t ret = count; @@ -291,9 +291,9 @@ static ssize_t keymap_store(struct kobject *kobj, struct kobj_attribute *attr, 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)) { + i + SHIFT_TBL_SIZE + 4 >= sizeof(spk_key_buf)) { pr_warn("i %d %d %d %d\n", i, - (int)cp1[-3], (int)cp1[-2], (int)cp1[-1]); + (int)cp1[-3], (int)cp1[-2], (int)cp1[-1]); kfree(in_buff); spin_unlock_irqrestore(&speakup_info.spinlock, flags); return -EINVAL; @@ -307,7 +307,7 @@ static ssize_t keymap_store(struct kobject *kobj, struct kobj_attribute *attr, if (i != 0 || cp1[-1] != KEY_MAP_VER || cp1[-2] != 0) { ret = -EINVAL; pr_warn("end %d %d %d %d\n", i, - (int)cp1[-3], (int)cp1[-2], (int)cp1[-1]); + (int)cp1[-3], (int)cp1[-2], (int)cp1[-1]); } else { if (spk_set_key_info(in_buff, spk_key_buf)) { spk_set_key_info(spk_key_defaults, spk_key_buf); @@ -324,7 +324,7 @@ static ssize_t keymap_store(struct kobject *kobj, struct kobj_attribute *attr, * This is called when a user changes the value of the silent parameter. */ static ssize_t silent_store(struct kobject *kobj, struct kobj_attribute *attr, - const char *buf, size_t count) +const char *buf, size_t count) { int len; struct vc_data *vc = vc_cons[fg_console].d; @@ -363,7 +363,7 @@ static ssize_t silent_store(s
[PATCH 1/4] staging: speakup: Placed Logical on the previous line
Placed Logical continuations on the previous line as reported by checkpatch.pl. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index a12ec2b061fe..25acebb9311f 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -2144,10 +2144,10 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym, if (up_flag || spk_killed || type == KT_SHIFT) goto out; spk_shut_up &= 0xfe; - kh = (value == KVAL(K_DOWN)) - || (value == KVAL(K_UP)) - || (value == KVAL(K_LEFT)) - || (value == KVAL(K_RIGHT)); + kh = (value == KVAL(K_DOWN)) || + (value == KVAL(K_UP)) || + (value == KVAL(K_LEFT)) || + (value == KVAL(K_RIGHT)); if ((cursor_track != read_all_mode) || !kh) if (!spk_no_intr) spk_do_flush(); -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/4] staging: speakup: spaces preferred around operator
Fixed the checkpatch.pl issues like: CHECK: spaces preferred around that '&' (ctx:VxV) CHECK: spaces preferred around that '|' (ctx:VxV) CHECK: spaces preferred around that '-' (ctx:VxV) CHECK: spaces preferred around that '+' (ctx:VxV) etc. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/serialio.c | 4 ++-- drivers/staging/speakup/speakup.h| 12 ++-- drivers/staging/speakup/speakup_acntpc.c | 4 ++-- drivers/staging/speakup/speakup_decpc.c | 22 +++--- drivers/staging/speakup/speakup_dtlk.c | 16 drivers/staging/speakup/speakup_keypc.c | 12 ++-- drivers/staging/speakup/speakup_ltlk.c | 2 +- 7 files changed, 36 insertions(+), 36 deletions(-) diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c index 657a48b6f8d3..aade52ee15a0 100644 --- a/drivers/staging/speakup/serialio.c +++ b/drivers/staging/speakup/serialio.c @@ -120,8 +120,8 @@ static void start_serial_interrupt(int irq) outb(UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2, speakup_info.port_tts + UART_MCR); /* Turn on Interrupts */ - outb(UART_IER_MSI|UART_IER_RLSI|UART_IER_RDI, - speakup_info.port_tts + UART_IER); + outb(UART_IER_MSI | UART_IER_RLSI | UART_IER_RDI, +speakup_info.port_tts + UART_IER); inb(speakup_info.port_tts + UART_LSR); inb(speakup_info.port_tts + UART_RX); inb(speakup_info.port_tts + UART_IIR); diff --git a/drivers/staging/speakup/speakup.h b/drivers/staging/speakup/speakup.h index b203f0f883a9..7a2c3e5ad564 100644 --- a/drivers/staging/speakup/speakup.h +++ b/drivers/staging/speakup/speakup.h @@ -20,7 +20,7 @@ #define A_CAP 0x0007 #define B_NUM 0x0008 #define NUM 0x0009 -#define ALPHANUM (B_ALPHA|B_NUM) +#define ALPHANUM (B_ALPHA | B_NUM) #define SOME 0x0010 #define MOST 0x0020 #define PUNC 0x0040 @@ -30,13 +30,13 @@ #define B_EXNUM 0x0100 #define CH_RPT 0x0200 #define B_CTL 0x0400 -#define A_CTL (B_CTL+SYNTH_OK) +#define A_CTL (B_CTL + SYNTH_OK) #define B_SYM 0x0800 -#define B_CAPSYM (B_CAP|B_SYM) +#define B_CAPSYM (B_CAP | B_SYM) -#define IS_WDLM(x) (spk_chartab[((u_char)x)]&B_WDLM) -#define IS_CHAR(x, type) (spk_chartab[((u_char)x)]&type) -#define IS_TYPE(x, type) ((spk_chartab[((u_char)x)]&type) == type) +#define IS_WDLM(x) (spk_chartab[((u_char)x)] & B_WDLM) +#define IS_CHAR(x, type) (spk_chartab[((u_char)x)] & type) +#define IS_TYPE(x, type) ((spk_chartab[((u_char)x)] & type) == type) int speakup_thread(void *data); void spk_reset_default_chars(void); diff --git a/drivers/staging/speakup/speakup_acntpc.c b/drivers/staging/speakup/speakup_acntpc.c index cf6fcd63498d..bca386d9fbd1 100644 --- a/drivers/staging/speakup/speakup_acntpc.c +++ b/drivers/staging/speakup/speakup_acntpc.c @@ -280,7 +280,7 @@ static int synth_probe(struct spk_synth *synth) if (port_val == 0x53fc) { /* 'S' and out&input bits */ synth_port_control = synth_portlist[i]; - speakup_info.port_tts = synth_port_control+1; + speakup_info.port_tts = synth_port_control + 1; break; } } @@ -303,7 +303,7 @@ static int synth_probe(struct spk_synth *synth) static void accent_release(void) { if (speakup_info.port_tts) - synth_release_region(speakup_info.port_tts-1, SYNTH_IO_EXTENT); + synth_release_region(speakup_info.port_tts - 1, SYNTH_IO_EXTENT); speakup_info.port_tts = 0; } diff --git a/drivers/staging/speakup/speakup_decpc.c b/drivers/staging/speakup/speakup_decpc.c index 6bf38e49a96d..600eb057f830 100644 --- a/drivers/staging/speakup/speakup_decpc.c +++ b/drivers/staging/speakup/speakup_decpc.c @@ -251,7 +251,7 @@ static int dt_getstatus(void) static void dt_sendcmd(u_int cmd) { outb_p(cmd & 0xFF, speakup_info.port_tts); - outb_p((cmd >> 8) & 0xFF, speakup_info.port_tts+1); + outb_p((cmd >> 8) & 0xFF, speakup_info.port_tts + 1); } static int dt_waitbit(int bit) @@ -273,7 +273,7 @@ static int dt_wait_dma(void) if (!dt_waitbit(STAT_dma_ready)) return 0; while (--timeout > 0) { - if ((dt_getstatus()&STAT_dma_state) == state) + if ((dt_getstatus() & STAT_dma_state) == state) return 1; udelay(50); } @@ -287,11 +287,11 @@ static int dt_ctrl(u_int cmd) if (!dt_waitbit(STAT_cmd_ready)) return -1; - outb_p(0, speakup_info.port_tts+2); - outb_p(0, speakup_info.port_tts+3); + outb_p(0, speakup_info.port_tts + 2); + outb_p(0, speakup_info.port_tts + 3); dt_getstat
[PATCH 3/4] staging: speakup: identation should use tabs
Indentation should always use tabs and never spaces. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/speakup_dtlk.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/speakup/speakup_dtlk.h b/drivers/staging/speakup/speakup_dtlk.h index b3b3cfc3db07..46d885fcfb20 100644 --- a/drivers/staging/speakup/speakup_dtlk.h +++ b/drivers/staging/speakup/speakup_dtlk.h @@ -24,11 +24,11 @@ * usec later. */ #define TTS_ALMOST_FULL0x08/* 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 -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/4] staging: speakup: Alignment should match open parenthesis
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal --- drivers/staging/speakup/kobjects.c | 16 drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/selection.c | 2 +- drivers/staging/speakup/serialio.c | 2 +- drivers/staging/speakup/speakup_acntpc.c | 6 +++--- drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_decext.c | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c index 8c93188b832c..edde9e68779e 100644 --- a/drivers/staging/speakup/kobjects.c +++ b/drivers/staging/speakup/kobjects.c @@ -662,9 +662,9 @@ ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr, var_data = param->data; value = var_data->u.n.value; spk_reset_default_value("pitch", synth->default_pitch, - value); + value); spk_reset_default_value("vol", synth->default_vol, - value); + value); } break; case VAR_STRING: @@ -679,7 +679,7 @@ ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr, ret = spk_set_string_var(cp, param, len); if (ret == -E2BIG) pr_warn("value too long for %s\n", - param->name); + param->name); break; default: pr_warn("%s unknown type %d\n", @@ -699,7 +699,7 @@ EXPORT_SYMBOL_GPL(spk_var_store); */ static ssize_t message_show_helper(char *buf, enum msg_index_t first, - enum msg_index_t last) + enum msg_index_t last) { size_t bufsize = PAGE_SIZE; char *buf_pointer = buf; @@ -712,7 +712,7 @@ static ssize_t message_show_helper(char *buf, enum msg_index_t first, if (bufsize <= 1) break; printed = scnprintf(buf_pointer, bufsize, "%d\t%s\n", - index, spk_msg_get(cursor)); + index, spk_msg_get(cursor)); buf_pointer += printed; bufsize -= printed; } @@ -721,7 +721,7 @@ static ssize_t message_show_helper(char *buf, enum msg_index_t first, } static void report_msg_status(int reset, int received, int used, - int rejected, char *groupname) + int rejected, char *groupname) { int len; char buf[160]; @@ -742,7 +742,7 @@ static void report_msg_status(int reset, int received, int used, } static ssize_t message_store_helper(const char *buf, size_t count, - struct msg_group_t *group) +struct msg_group_t *group) { char *cp = (char *) buf; char *end = cp + count; @@ -843,7 +843,7 @@ static ssize_t message_show(struct kobject *kobj, } static ssize_t message_store(struct kobject *kobj, struct kobj_attribute *attr, - const char *buf, size_t count) + const char *buf, size_t count) { struct msg_group_t *group = spk_find_msg_group(attr->attr.name); diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 25acebb9311f..01eabc19039c 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -1140,7 +1140,7 @@ static void spkup_write(const char *in_buf, int count) if (last_type & CH_RPT) { synth_printf(" "); synth_printf(spk_msg_get(MSG_REPEAT_DESC2), - ++rep_count); +++rep_count); synth_printf(" "); } rep_count = 0; diff --git a/drivers/staging/speakup/selection.c b/drivers/staging/speakup/selection.c index afd9a446a06f..3d15eec37163 100644 --- a/drivers/staging/speakup/selection.c +++ b/drivers/staging/speakup/selection.c @@ -75,7 +75,7 @@ int speakup_set_selection(struct tty_struct *tty) speakup_clear_selection(); spk_sel_cons = vc_cons[fg_console].d; dev_warn(tty->dev, - "Selection: mark console not the same as cut\n"); +"Selection: mark console not the same as cut\n"); return -EINVAL; } diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c index aade52ee15a0..7e6bc3b05da3 100644 --- a/drivers/staging/speakup/serialio.c +++
[PATCH 2/4] staging: speakup: spaces preferred around operator
Fixed the checkpatch.pl issues like: CHECK: spaces preferred around that '&' (ctx:VxV) CHECK: spaces preferred around that '|' (ctx:VxV) CHECK: spaces preferred around that '-' (ctx:VxV) CHECK: spaces preferred around that '+' (ctx:VxV) etc. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/serialio.c | 4 ++-- drivers/staging/speakup/speakup.h| 12 ++-- drivers/staging/speakup/speakup_acntpc.c | 4 ++-- drivers/staging/speakup/speakup_decpc.c | 22 +++--- drivers/staging/speakup/speakup_dtlk.c | 16 drivers/staging/speakup/speakup_keypc.c | 12 ++-- drivers/staging/speakup/speakup_ltlk.c | 2 +- 7 files changed, 36 insertions(+), 36 deletions(-) diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c index 657a48b6f8d3..aade52ee15a0 100644 --- a/drivers/staging/speakup/serialio.c +++ b/drivers/staging/speakup/serialio.c @@ -120,8 +120,8 @@ static void start_serial_interrupt(int irq) outb(UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2, speakup_info.port_tts + UART_MCR); /* Turn on Interrupts */ - outb(UART_IER_MSI|UART_IER_RLSI|UART_IER_RDI, - speakup_info.port_tts + UART_IER); + outb(UART_IER_MSI | UART_IER_RLSI | UART_IER_RDI, +speakup_info.port_tts + UART_IER); inb(speakup_info.port_tts + UART_LSR); inb(speakup_info.port_tts + UART_RX); inb(speakup_info.port_tts + UART_IIR); diff --git a/drivers/staging/speakup/speakup.h b/drivers/staging/speakup/speakup.h index b203f0f883a9..7a2c3e5ad564 100644 --- a/drivers/staging/speakup/speakup.h +++ b/drivers/staging/speakup/speakup.h @@ -20,7 +20,7 @@ #define A_CAP 0x0007 #define B_NUM 0x0008 #define NUM 0x0009 -#define ALPHANUM (B_ALPHA|B_NUM) +#define ALPHANUM (B_ALPHA | B_NUM) #define SOME 0x0010 #define MOST 0x0020 #define PUNC 0x0040 @@ -30,13 +30,13 @@ #define B_EXNUM 0x0100 #define CH_RPT 0x0200 #define B_CTL 0x0400 -#define A_CTL (B_CTL+SYNTH_OK) +#define A_CTL (B_CTL + SYNTH_OK) #define B_SYM 0x0800 -#define B_CAPSYM (B_CAP|B_SYM) +#define B_CAPSYM (B_CAP | B_SYM) -#define IS_WDLM(x) (spk_chartab[((u_char)x)]&B_WDLM) -#define IS_CHAR(x, type) (spk_chartab[((u_char)x)]&type) -#define IS_TYPE(x, type) ((spk_chartab[((u_char)x)]&type) == type) +#define IS_WDLM(x) (spk_chartab[((u_char)x)] & B_WDLM) +#define IS_CHAR(x, type) (spk_chartab[((u_char)x)] & type) +#define IS_TYPE(x, type) ((spk_chartab[((u_char)x)] & type) == type) int speakup_thread(void *data); void spk_reset_default_chars(void); diff --git a/drivers/staging/speakup/speakup_acntpc.c b/drivers/staging/speakup/speakup_acntpc.c index cf6fcd63498d..bca386d9fbd1 100644 --- a/drivers/staging/speakup/speakup_acntpc.c +++ b/drivers/staging/speakup/speakup_acntpc.c @@ -280,7 +280,7 @@ static int synth_probe(struct spk_synth *synth) if (port_val == 0x53fc) { /* 'S' and out&input bits */ synth_port_control = synth_portlist[i]; - speakup_info.port_tts = synth_port_control+1; + speakup_info.port_tts = synth_port_control + 1; break; } } @@ -303,7 +303,7 @@ static int synth_probe(struct spk_synth *synth) static void accent_release(void) { if (speakup_info.port_tts) - synth_release_region(speakup_info.port_tts-1, SYNTH_IO_EXTENT); + synth_release_region(speakup_info.port_tts - 1, SYNTH_IO_EXTENT); speakup_info.port_tts = 0; } diff --git a/drivers/staging/speakup/speakup_decpc.c b/drivers/staging/speakup/speakup_decpc.c index 6bf38e49a96d..600eb057f830 100644 --- a/drivers/staging/speakup/speakup_decpc.c +++ b/drivers/staging/speakup/speakup_decpc.c @@ -251,7 +251,7 @@ static int dt_getstatus(void) static void dt_sendcmd(u_int cmd) { outb_p(cmd & 0xFF, speakup_info.port_tts); - outb_p((cmd >> 8) & 0xFF, speakup_info.port_tts+1); + outb_p((cmd >> 8) & 0xFF, speakup_info.port_tts + 1); } static int dt_waitbit(int bit) @@ -273,7 +273,7 @@ static int dt_wait_dma(void) if (!dt_waitbit(STAT_dma_ready)) return 0; while (--timeout > 0) { - if ((dt_getstatus()&STAT_dma_state) == state) + if ((dt_getstatus() & STAT_dma_state) == state) return 1; udelay(50); } @@ -287,11 +287,11 @@ static int dt_ctrl(u_int cmd) if (!dt_waitbit(STAT_cmd_ready)) return -1; - outb_p(0, speakup_info.port_tts+2); - outb_p(0, speakup_info.port_tts+3); + outb_p(0, speakup_info.port_tts + 2); + outb_p(0, speakup_info.port_tts + 3); dt_getstat
[PATCH 0/4] Fix multiple checkpatch issues
Improve readability by fixing multiple checkpatch.pl issues in speakup driver. Arushi Singhal (4): staging: speakup: Placed Logical on the previous line staging: speakup: spaces preferred around operator staging: speakup: identation should use tabs staging: speakup: Alignment should match open parenthesis drivers/staging/speakup/kobjects.c | 16 drivers/staging/speakup/main.c | 10 +- drivers/staging/speakup/selection.c | 2 +- drivers/staging/speakup/serialio.c | 6 +++--- drivers/staging/speakup/speakup.h| 12 ++-- drivers/staging/speakup/speakup_acntpc.c | 10 +- drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_decext.c | 4 ++-- drivers/staging/speakup/speakup_decpc.c | 22 +++--- drivers/staging/speakup/speakup_dtlk.c | 16 drivers/staging/speakup/speakup_dtlk.h | 10 +- drivers/staging/speakup/speakup_keypc.c | 12 ++-- drivers/staging/speakup/speakup_ltlk.c | 2 +- 13 files changed, 62 insertions(+), 62 deletions(-) -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/4] staging: speakup: Placed Logical on the previous line
Placed Logical continuations on the previous line as reported by checkpatch.pl. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index a12ec2b061fe..25acebb9311f 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -2144,10 +2144,10 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym, if (up_flag || spk_killed || type == KT_SHIFT) goto out; spk_shut_up &= 0xfe; - kh = (value == KVAL(K_DOWN)) - || (value == KVAL(K_UP)) - || (value == KVAL(K_LEFT)) - || (value == KVAL(K_RIGHT)); + kh = (value == KVAL(K_DOWN)) || + (value == KVAL(K_UP)) || + (value == KVAL(K_LEFT)) || + (value == KVAL(K_RIGHT)); if ((cursor_track != read_all_mode) || !kh) if (!spk_no_intr) spk_do_flush(); -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/4] staging: speakup: identation should use tabs
Indentation should always use tabs and never spaces. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/speakup_dtlk.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/speakup/speakup_dtlk.h b/drivers/staging/speakup/speakup_dtlk.h index b3b3cfc3db07..46d885fcfb20 100644 --- a/drivers/staging/speakup/speakup_dtlk.h +++ b/drivers/staging/speakup/speakup_dtlk.h @@ -24,11 +24,11 @@ * usec later. */ #define TTS_ALMOST_FULL0x08/* 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 -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/4] staging: speakup: Alignment should match open parenthesis
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal --- drivers/staging/speakup/kobjects.c | 16 drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/selection.c | 2 +- drivers/staging/speakup/serialio.c | 2 +- drivers/staging/speakup/speakup_acntpc.c | 6 +++--- drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_decext.c | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c index 8c93188b832c..edde9e68779e 100644 --- a/drivers/staging/speakup/kobjects.c +++ b/drivers/staging/speakup/kobjects.c @@ -662,9 +662,9 @@ ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr, var_data = param->data; value = var_data->u.n.value; spk_reset_default_value("pitch", synth->default_pitch, - value); + value); spk_reset_default_value("vol", synth->default_vol, - value); + value); } break; case VAR_STRING: @@ -679,7 +679,7 @@ ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr, ret = spk_set_string_var(cp, param, len); if (ret == -E2BIG) pr_warn("value too long for %s\n", - param->name); + param->name); break; default: pr_warn("%s unknown type %d\n", @@ -699,7 +699,7 @@ EXPORT_SYMBOL_GPL(spk_var_store); */ static ssize_t message_show_helper(char *buf, enum msg_index_t first, - enum msg_index_t last) + enum msg_index_t last) { size_t bufsize = PAGE_SIZE; char *buf_pointer = buf; @@ -712,7 +712,7 @@ static ssize_t message_show_helper(char *buf, enum msg_index_t first, if (bufsize <= 1) break; printed = scnprintf(buf_pointer, bufsize, "%d\t%s\n", - index, spk_msg_get(cursor)); + index, spk_msg_get(cursor)); buf_pointer += printed; bufsize -= printed; } @@ -721,7 +721,7 @@ static ssize_t message_show_helper(char *buf, enum msg_index_t first, } static void report_msg_status(int reset, int received, int used, - int rejected, char *groupname) + int rejected, char *groupname) { int len; char buf[160]; @@ -742,7 +742,7 @@ static void report_msg_status(int reset, int received, int used, } static ssize_t message_store_helper(const char *buf, size_t count, - struct msg_group_t *group) +struct msg_group_t *group) { char *cp = (char *) buf; char *end = cp + count; @@ -843,7 +843,7 @@ static ssize_t message_show(struct kobject *kobj, } static ssize_t message_store(struct kobject *kobj, struct kobj_attribute *attr, - const char *buf, size_t count) + const char *buf, size_t count) { struct msg_group_t *group = spk_find_msg_group(attr->attr.name); diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 25acebb9311f..01eabc19039c 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -1140,7 +1140,7 @@ static void spkup_write(const char *in_buf, int count) if (last_type & CH_RPT) { synth_printf(" "); synth_printf(spk_msg_get(MSG_REPEAT_DESC2), - ++rep_count); +++rep_count); synth_printf(" "); } rep_count = 0; diff --git a/drivers/staging/speakup/selection.c b/drivers/staging/speakup/selection.c index afd9a446a06f..3d15eec37163 100644 --- a/drivers/staging/speakup/selection.c +++ b/drivers/staging/speakup/selection.c @@ -75,7 +75,7 @@ int speakup_set_selection(struct tty_struct *tty) speakup_clear_selection(); spk_sel_cons = vc_cons[fg_console].d; dev_warn(tty->dev, - "Selection: mark console not the same as cut\n"); +"Selection: mark console not the same as cut\n"); return -EINVAL; } diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c index aade52ee15a0..7e6bc3b05da3 100644 --- a/drivers/staging/speakup/serialio.c +++
[PATCH] staging: speakup: else is not generally useful after a break or return
fixed checkpatch.pl warning: else is not generally useful after a break or return. Removed the else without affecting the logic. Dead code is also eliminated. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/keyhelp.c | 53 ++- 1 file changed, 19 insertions(+), 34 deletions(-) diff --git a/drivers/staging/speakup/keyhelp.c b/drivers/staging/speakup/keyhelp.c index 4e6e5daba50c..ad3efded37c1 100644 --- a/drivers/staging/speakup/keyhelp.c +++ b/drivers/staging/speakup/keyhelp.c @@ -176,43 +176,28 @@ int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key) synth_printf("%s\n", spk_msg_get(MSG_HELP_INFO)); build_key_data(); /* rebuild each time in case new mapping */ return 1; - } else { - name = NULL; - if ((type != KT_SPKUP) && (key > 0) && (key <= num_key_names)) { - synth_printf("%s\n", -spk_msg_get(MSG_KEYNAMES_START + key - 1)); - return 1; - } - for (i = 0; funcvals[i] != 0 && !name; i++) { - if (ch == funcvals[i]) - name = spk_msg_get(MSG_FUNCNAMES_START + i); - } - if (!name) - return -1; - kp = spk_our_keys[key] + 1; - for (i = 0; i < nstates; i++) { - if (ch == kp[i]) - break; - } - key += (state_tbl[i] << 8); - say_key(key); - synth_printf(spk_msg_get(MSG_KEYDESC), name); - synth_printf("\n"); - return 1; } - name = spk_msg_get(MSG_FUNCNAMES_START + cur_item); - func = funcvals[cur_item]; - synth_printf("%s", name); - if (key_offsets[func] == 0) { - synth_printf(" %s\n", spk_msg_get(MSG_IS_UNASSIGNED)); + + name = NULL; + if ((type != KT_SPKUP) && (key > 0) && (key <= num_key_names)) { + synth_printf("%s\n", +spk_msg_get(MSG_KEYNAMES_START + key - 1)); return 1; } - p_keys = key_data + key_offsets[func]; - for (n = 0; p_keys[n]; n++) { - val = p_keys[n]; - if (n > 0) - synth_printf("%s ", spk_msg_get(MSG_DISJUNCTION)); - say_key(val); + for (i = 0; funcvals[i] != 0 && !name; i++) { + if (ch == funcvals[i]) + name = spk_msg_get(MSG_FUNCNAMES_START + i); + } + if (!name) + return -1; + kp = spk_our_keys[key] + 1; + for (i = 0; i < nstates; i++) { + if (ch == kp[i]) + break; } + key += (state_tbl[i] << 8); + say_key(key); + synth_printf(spk_msg_get(MSG_KEYDESC), name); + synth_printf("\n"); return 1; } -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/6] staging: speakup: Add blank line after function/struct/union/enum declarations
This patch fixes the warnings reported by checkpatch.pl for please use a blank line after function/struct/union/enum declarations. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/main.c | 1 + drivers/staging/speakup/serialio.c | 1 + drivers/staging/speakup/speakup_dtlk.c | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 01eabc19039c..17df20ec94be 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -108,6 +108,7 @@ enum { CT_Window, CT_Max }; + #define read_all_mode CT_Max static struct tty_struct *tty; diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c index 7e6bc3b05da3..9b2626e85042 100644 --- a/drivers/staging/speakup/serialio.c +++ b/drivers/staging/speakup/serialio.c @@ -21,6 +21,7 @@ static void start_serial_interrupt(int irq); static const struct old_serial_port rs_table[] = { SERIAL_PORT_DFNS }; + static const struct old_serial_port *serstate; static int timeouts; diff --git a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c index 1ebe5012ec0b..e36360f65f36 100644 --- a/drivers/staging/speakup/speakup_dtlk.c +++ b/drivers/staging/speakup/speakup_dtlk.c @@ -43,6 +43,7 @@ static int port_forced; static unsigned int synth_portlist[] = { 0x25e, 0x29e, 0x2de, 0x31e, 0x35e, 0x39e, 0 }; + static u_char synth_status; static struct var_t vars[] = { -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/6] staging: speakup: simple_strtoul is replaced with kstrtoul
This patch fixes "simple_strtoul is obsolete, use kstrtoul instead" warning. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/kobjects.c| 4 ++-- drivers/staging/speakup/main.c| 2 +- drivers/staging/speakup/varhandlers.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c index edde9e68779e..a82698c66568 100644 --- a/drivers/staging/speakup/kobjects.c +++ b/drivers/staging/speakup/kobjects.c @@ -152,7 +152,7 @@ static ssize_t chars_chartab_store(struct kobject *kobj, continue; } - index = simple_strtoul(cp, &temp, 10); + index = kstrtoul(cp, &temp, 10); if (index > 255) { rejected++; cp = linefeed + 1; @@ -785,7 +785,7 @@ static ssize_t message_store_helper(const char *buf, size_t count, continue; } - index = simple_strtoul(cp, &temp, 10); + index = kstrtoul(cp, &temp, 10); while ((temp < linefeed) && (*temp == ' ' || *temp == '\t')) temp++; diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 17df20ec94be..b43e2e156602 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -1945,7 +1945,7 @@ static int handle_goto(struct vc_data *vc, u_char type, u_char ch, u_short key) return 1; } - goto_pos = simple_strtoul(goto_buf, &cp, 10); + goto_pos = kstrtoul(goto_buf, &cp, 10); if (*cp == 'x') { if (*goto_buf < '0') diff --git a/drivers/staging/speakup/varhandlers.c b/drivers/staging/speakup/varhandlers.c index cc984196020f..5107533bb45a 100644 --- a/drivers/staging/speakup/varhandlers.c +++ b/drivers/staging/speakup/varhandlers.c @@ -325,7 +325,7 @@ char *spk_s2uchar(char *start, char *dest) { int val; - val = simple_strtoul(skip_spaces(start), &start, 10); + val = kstrtoul(skip_spaces(start), &start, 10); if (*start == ',') start++; *dest = (u_char)val; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/6] staging: speakup: Logical continuations should be on the previous line
This patch fixes the checkpatch issue: CHECK: Logical continuations should be on the previous line. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/main.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index b43e2e156602..4c3b5c627718 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -564,18 +564,18 @@ static u_long get_word(struct vc_data *vc) *buf = '\0'; synth_printf("%s\n", spk_msg_get(MSG_SPACE)); return 0; - } else if ((tmpx < vc->vc_cols - 2) - && (ch == SPACE || ch == 0 || IS_WDLM(ch)) - && ((char)get_char(vc, (u_short *)&tmp_pos + 1, &temp) > - SPACE)) { + } else if ((tmpx < vc->vc_cols - 2) && + (ch == SPACE || ch == 0 || IS_WDLM(ch)) && + ((char)get_char(vc, (u_short *)&tmp_pos + 1, &temp) > + SPACE)) { tmp_pos += 2; tmpx++; } else while (tmpx > 0) { ch = (char)get_char(vc, (u_short *)tmp_pos - 1, &temp); - if ((ch == SPACE || ch == 0 || IS_WDLM(ch)) - && ((char)get_char(vc, (u_short *)tmp_pos, &temp) > - SPACE)) + if ((ch == SPACE || ch == 0 || IS_WDLM(ch)) && + ((char)get_char(vc, (u_short *)tmp_pos, &temp) > +SPACE)) break; tmp_pos -= 2; tmpx--; @@ -586,8 +586,8 @@ static u_long get_word(struct vc_data *vc) tmp_pos += 2; tmpx++; ch = (char)get_char(vc, (u_short *)tmp_pos, &temp); - if ((ch == SPACE) || ch == 0 - || (IS_WDLM(buf[cnt - 1]) && (ch > SPACE))) + if ((ch == SPACE) || ch == 0 || + (IS_WDLM(buf[cnt - 1]) && (ch > SPACE))) break; buf[cnt++] = ch; } @@ -725,8 +725,8 @@ static void spell_word(struct vc_data *vc) synth_printf("%s", str_cap); last_cap = str_cap; } - if (this_speakup_key == SPELL_PHONETIC - && (isascii(ch) && isalpha(ch))) { + if (this_speakup_key == SPELL_PHONETIC && + (isascii(ch) && isalpha(ch))) { ch &= 31; cp1 = phonetic[--ch]; } else { @@ -895,8 +895,8 @@ static int get_sentence_buf(struct vc_data *vc, int read_punc) while (start < end) { sentbuf[bn][i] = (char)get_char(vc, (u_short *)start, &tmp); if (i > 0) { - if (sentbuf[bn][i] == SPACE && sentbuf[bn][i - 1] == '.' - && numsentences[bn] < 9) { + if (sentbuf[bn][i] == SPACE && sentbuf[bn][i - 1] == '.' && + numsentences[bn] < 9) { /* Sentence Marker */ numsentences[bn]++; sentmarks[bn][numsentences[bn]] = @@ -1280,8 +1280,8 @@ void spk_reset_default_chars(void) /* First, free any non-default */ for (i = 0; i < 256; i++) { - if (spk_characters[i] - && (spk_characters[i] != spk_default_chars[i])) + if (spk_characters[i] && + (spk_characters[i] != spk_default_chars[i])) kfree(spk_characters[i]); } @@ -2073,8 +2073,8 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym, tty = vc->port.tty; if (type >= 0xf0) type -= 0xf0; - if (type == KT_PAD - && (vt_get_leds(fg_console, VC_NUMLOCK))) { + if (type == KT_PAD && + (vt_get_leds(fg_console, VC_NUMLOCK))) { if (up_flag) { spk_keydown = 0; goto out; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/6] multiple checkpatch issues
Improve readability by fixing multiple checkpatch.pl issues in speakup driver. Arushi Singhal (6): staging: speakup: Add blank line after function/struct/union/enum declarations staging: speakup: simple_strtoul is replaced with kstrtoul staging: speakup: Logical continuations should be on the previous line staging: speakup: Blank lines removed after an open brace '{' staging: speakup: Avoid multiple assignments on same line staging: speakup: fixes braces {} should be used on all arms of this statement drivers/staging/speakup/kobjects.c | 5 +- drivers/staging/speakup/main.c | 84 -- drivers/staging/speakup/serialio.c | 1 + drivers/staging/speakup/speakup_dtlk.c | 1 + drivers/staging/speakup/varhandlers.c | 2 +- 5 files changed, 55 insertions(+), 38 deletions(-) -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/6] staging: speakup: fixes braces {} should be used on all arms of this statement
This patch fixes the checks reported by checkpatch.pl for braces {} should be used on all arms of this statement. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/main.c | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 7915e75664f4..6179e0aafa25 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -640,8 +640,9 @@ static void say_prev_word(struct vc_data *vc) break; spk_y--; spk_x = vc->vc_cols - 1; - } else + } else{ spk_x--; + } spk_pos -= 2; ch = (char)get_char(vc, (u_short *)spk_pos, &temp); if (ch == SPACE || ch == 0) @@ -694,8 +695,9 @@ static void say_next_word(struct vc_data *vc) spk_y++; spk_x = 0; edge_said = edge_right; - } else + } else { spk_x++; + } spk_pos += 2; last_state = state; } @@ -722,8 +724,9 @@ static void spell_word(struct vc_data *vc) spk_pitch_shift++; else/* synth has no pitch */ last_cap = spk_str_caps_stop; - } else + } else { str_cap = spk_str_caps_stop; + } if (str_cap != last_cap) { synth_printf("%s", str_cap); last_cap = str_cap; @@ -1331,8 +1334,9 @@ static int speakup_allocate(struct vc_data *vc) if (!speakup_console[vc_num]) return -ENOMEM; speakup_date(vc); - } else if (!spk_parked) + } else if (!spk_parked) { speakup_date(vc); + } return 0; } @@ -1385,8 +1389,9 @@ static void read_all_doc(struct vc_data *vc) prev_cursor_track = cursor_track; cursor_track = read_all_mode; spk_reset_index_count(0); - if (get_sentence_buf(vc, 0) == -1) + if (get_sentence_buf(vc, 0) == -1) { kbd_fakekey2(vc, RA_DOWN_ARROW); + } else { say_sentence_num(0, 0); synth_insert_next_index(0); @@ -1434,8 +1439,9 @@ static void handle_cursor_read_all(struct vc_data *vc, int command) if (!say_sentence_num(sentcount + 1, 1)) { sn = 1; spk_reset_index_count(sn); - } else + } else { synth_insert_next_index(0); + } if (!say_sentence_num(sn, 0)) { kbd_fakekey2(vc, RA_FIND_NEXT_SENT); return; @@ -1464,8 +1470,9 @@ static void handle_cursor_read_all(struct vc_data *vc, int command) rv = get_sentence_buf(vc, 0); if (rv == -1) read_all_doc(vc); - if (rv == 0) + if (rv == 0) { kbd_fakekey2(vc, RA_FIND_NEXT_SENT); + } else { say_sentence_num(1, 0); synth_insert_next_index(0); @@ -2162,10 +2169,11 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym, if (type == KT_SPEC && value == 1) { value = '\n'; type = KT_LATIN; - } else if (type == KT_LETTER) + } else if (type == KT_LETTER) { type = KT_LATIN; - else if (value == 0x7f) + } else if (value == 0x7f) { value = 8; /* make del = backspace */ + } ret = (*spk_special_handler) (vc, type, value, keycode); spk_close_press = 0; if (ret < 0) @@ -2259,8 +2267,9 @@ static int vt_notifier_call(struct notifier_block *nb, speakup_deallocate(vc); break; case VT_WRITE: - if (param->c == '\b') + if (param->c == '\b') { speakup_bs(vc); + } else if (param->c < 0x100) { char d = param->c; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/6] staging: speakup: Blank lines removed after an open brace '{'
Blank lines aren't necessary after an open brace '{' as reported by Checkpatch.pl. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/kobjects.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c index a82698c66568..16c4d3d1e873 100644 --- a/drivers/staging/speakup/kobjects.c +++ b/drivers/staging/speakup/kobjects.c @@ -761,7 +761,6 @@ static ssize_t message_store_helper(const char *buf, size_t count, enum msg_index_t curmessage; while (cp < end) { - while ((cp < end) && (*cp == ' ' || *cp == '\t')) cp++; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/6] staging: speakup: Avoid multiple assignments on same line
This patch fixes the checkpatch.pl warning "multiple assignments should be avoided." Signed-off-by: Arushi Singhal --- drivers/staging/speakup/main.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 4c3b5c627718..7915e75664f4 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -269,9 +269,12 @@ static unsigned char get_attributes(struct vc_data *vc, u16 *pos) static void speakup_date(struct vc_data *vc) { - spk_x = spk_cx = vc->vc_x; - spk_y = spk_cy = vc->vc_y; - spk_pos = spk_cp = vc->vc_pos; + spk_x = vc->vc_x; + spk_cx = vc->vc_x; + spk_y = vc->vc_y; + spk_cy = vc->vc_y; + spk_pos = vc->vc_pos; + spk_cp = vc->vc_pos; spk_old_attr = spk_attr; spk_attr = get_attributes(vc, (u_short *)spk_pos); } @@ -1643,9 +1646,12 @@ static int speak_highlight(struct vc_data *vc) spk_do_flush(); spkup_write(speakup_console[vc_num]->ht.highbuf[hc], speakup_console[vc_num]->ht.highsize[hc]); - spk_pos = spk_cp = speakup_console[vc_num]->ht.rpos[hc]; - spk_x = spk_cx = speakup_console[vc_num]->ht.rx[hc]; - spk_y = spk_cy = speakup_console[vc_num]->ht.ry[hc]; + spk_pos = speakup_console[vc_num]->ht.rpos[hc]; + spk_cp = speakup_console[vc_num]->ht.rpos[hc]; + spk_x = speakup_console[vc_num]->ht.rx[hc]; + spk_cx = speakup_console[vc_num]->ht.rx[hc]; + spk_y = speakup_console[vc_num]->ht.ry[hc]; + spk_cy = speakup_console[vc_num]->ht.ry[hc]; return 1; } return 0; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/6] multiple checkpatch issues
Improve readability by fixing multiple checkpatch.pl issues in speakup driver. Arushi Singhal (6): staging: speakup: Add blank line after function/struct/union/enum declarations staging: speakup: Logical continuations should be on the previous line staging: speakup: Blank lines removed after an open brace '{' staging: speakup: Avoid multiple assignments on same line staging: speakup: fixes braces {} should be used on all arms of this statement staging: speakup: Comparison to NULL could be written drivers/staging/speakup/kobjects.c | 1 - drivers/staging/speakup/main.c | 85 -- drivers/staging/speakup/selection.c| 2 +- drivers/staging/speakup/serialio.c | 1 + drivers/staging/speakup/speakup_dtlk.c | 1 + drivers/staging/speakup/varhandlers.c | 6 +-- 6 files changed, 55 insertions(+), 41 deletions(-) -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/6] staging: speakup: Add blank line after function/struct/union/enum declarations
This patch fixes the warnings reported by checkpatch.pl for please use a blank line after function/struct/union/enum declarations. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/main.c | 1 + drivers/staging/speakup/serialio.c | 1 + drivers/staging/speakup/speakup_dtlk.c | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 01eabc19039c..17df20ec94be 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -108,6 +108,7 @@ enum { CT_Window, CT_Max }; + #define read_all_mode CT_Max static struct tty_struct *tty; diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c index 7e6bc3b05da3..9b2626e85042 100644 --- a/drivers/staging/speakup/serialio.c +++ b/drivers/staging/speakup/serialio.c @@ -21,6 +21,7 @@ static void start_serial_interrupt(int irq); static const struct old_serial_port rs_table[] = { SERIAL_PORT_DFNS }; + static const struct old_serial_port *serstate; static int timeouts; diff --git a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c index 1ebe5012ec0b..e36360f65f36 100644 --- a/drivers/staging/speakup/speakup_dtlk.c +++ b/drivers/staging/speakup/speakup_dtlk.c @@ -43,6 +43,7 @@ static int port_forced; static unsigned int synth_portlist[] = { 0x25e, 0x29e, 0x2de, 0x31e, 0x35e, 0x39e, 0 }; + static u_char synth_status; static struct var_t vars[] = { -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/6] staging: speakup: Comparison to NULL could be written
Fixed coding style for null comparisons in speakup driver to be more consistant with the rest of the kernel coding style. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/selection.c | 2 +- drivers/staging/speakup/varhandlers.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/speakup/selection.c b/drivers/staging/speakup/selection.c index 3d15eec37163..08f68fc2864e 100644 --- a/drivers/staging/speakup/selection.c +++ b/drivers/staging/speakup/selection.c @@ -175,7 +175,7 @@ static struct speakup_paste_work speakup_paste_work = { int speakup_paste_selection(struct tty_struct *tty) { - if (cmpxchg(&speakup_paste_work.tty, NULL, tty) != NULL) + if (cmpxchg(&speakup_paste_work.tty, NULL, tty)) return -EBUSY; tty_kref_get(tty); diff --git a/drivers/staging/speakup/varhandlers.c b/drivers/staging/speakup/varhandlers.c index cc984196020f..5910fe0b1365 100644 --- a/drivers/staging/speakup/varhandlers.c +++ b/drivers/staging/speakup/varhandlers.c @@ -98,7 +98,7 @@ void speakup_register_var(struct var_t *var) } } p_header = var_ptrs[var->var_id]; - if (p_header->data != NULL) + if (p_header->data) return; p_header->data = var; switch (p_header->var_type) { @@ -210,11 +210,11 @@ int spk_set_num_var(int input, struct st_var_header *var, int how) return -ERANGE; var_data->u.n.value = val; - if (var->var_type == VAR_TIME && p_val != NULL) { + if (var->var_type == VAR_TIME && p_val) { *p_val = msecs_to_jiffies(val); return 0; } - if (p_val != NULL) + if (p_val) *p_val = val; if (var->var_id == PUNC_LEVEL) { spk_punc_mask = spk_punc_masks[val]; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/6] staging: speakup: Avoid multiple assignments on same line
This patch fixes the checkpatch.pl warning "multiple assignments should be avoided." Signed-off-by: Arushi Singhal --- drivers/staging/speakup/main.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index c1c3ee7dc95a..6c21ae1ae2d3 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -269,9 +269,12 @@ static unsigned char get_attributes(struct vc_data *vc, u16 *pos) static void speakup_date(struct vc_data *vc) { - spk_x = spk_cx = vc->vc_x; - spk_y = spk_cy = vc->vc_y; - spk_pos = spk_cp = vc->vc_pos; + spk_x = vc->vc_x; + spk_cx = spk_x; + spk_y = vc->vc_y; + spk_cy = spk_y; + spk_pos = vc->vc_pos; + spk_cp = spk_pos; spk_old_attr = spk_attr; spk_attr = get_attributes(vc, (u_short *)spk_pos); } @@ -1643,9 +1646,12 @@ static int speak_highlight(struct vc_data *vc) spk_do_flush(); spkup_write(speakup_console[vc_num]->ht.highbuf[hc], speakup_console[vc_num]->ht.highsize[hc]); - spk_pos = spk_cp = speakup_console[vc_num]->ht.rpos[hc]; - spk_x = spk_cx = speakup_console[vc_num]->ht.rx[hc]; - spk_y = spk_cy = speakup_console[vc_num]->ht.ry[hc]; + spk_pos = speakup_console[vc_num]->ht.rpos[hc]; + spk_cp = speakup_console[vc_num]->ht.rpos[hc]; + spk_x = speakup_console[vc_num]->ht.rx[hc]; + spk_cx = speakup_console[vc_num]->ht.rx[hc]; + spk_y = speakup_console[vc_num]->ht.ry[hc]; + spk_cy = speakup_console[vc_num]->ht.ry[hc]; return 1; } return 0; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/6] staging: speakup: fixes braces {} should be used on all arms of this statement
This patch fixes the checks reported by checkpatch.pl for braces {} should be used on all arms of this statement. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/main.c | 32 +++- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 6c21ae1ae2d3..a3daf4ae5c0a 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -640,8 +640,9 @@ static void say_prev_word(struct vc_data *vc) break; spk_y--; spk_x = vc->vc_cols - 1; - } else + } else { spk_x--; + } spk_pos -= 2; ch = (char)get_char(vc, (u_short *)spk_pos, &temp); if (ch == SPACE || ch == 0) @@ -694,8 +695,9 @@ static void say_next_word(struct vc_data *vc) spk_y++; spk_x = 0; edge_said = edge_right; - } else + } else { spk_x++; + } spk_pos += 2; last_state = state; } @@ -722,8 +724,9 @@ static void spell_word(struct vc_data *vc) spk_pitch_shift++; else/* synth has no pitch */ last_cap = spk_str_caps_stop; - } else + } else { str_cap = spk_str_caps_stop; + } if (str_cap != last_cap) { synth_printf("%s", str_cap); last_cap = str_cap; @@ -1331,8 +1334,9 @@ static int speakup_allocate(struct vc_data *vc) if (!speakup_console[vc_num]) return -ENOMEM; speakup_date(vc); - } else if (!spk_parked) + } else if (!spk_parked) { speakup_date(vc); + } return 0; } @@ -1385,9 +1389,9 @@ static void read_all_doc(struct vc_data *vc) prev_cursor_track = cursor_track; cursor_track = read_all_mode; spk_reset_index_count(0); - if (get_sentence_buf(vc, 0) == -1) + if (get_sentence_buf(vc, 0) == -1) { kbd_fakekey2(vc, RA_DOWN_ARROW); - else { + } else { say_sentence_num(0, 0); synth_insert_next_index(0); start_read_all_timer(vc, RA_TIMER); @@ -1434,8 +1438,9 @@ static void handle_cursor_read_all(struct vc_data *vc, int command) if (!say_sentence_num(sentcount + 1, 1)) { sn = 1; spk_reset_index_count(sn); - } else + } else { synth_insert_next_index(0); + } if (!say_sentence_num(sn, 0)) { kbd_fakekey2(vc, RA_FIND_NEXT_SENT); return; @@ -1464,9 +1469,9 @@ static void handle_cursor_read_all(struct vc_data *vc, int command) rv = get_sentence_buf(vc, 0); if (rv == -1) read_all_doc(vc); - if (rv == 0) + if (rv == 0) { kbd_fakekey2(vc, RA_FIND_NEXT_SENT); - else { + } else { say_sentence_num(1, 0); synth_insert_next_index(0); start_read_all_timer(vc, RA_TIMER); @@ -2162,10 +2167,11 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym, if (type == KT_SPEC && value == 1) { value = '\n'; type = KT_LATIN; - } else if (type == KT_LETTER) + } else if (type == KT_LETTER) { type = KT_LATIN; - else if (value == 0x7f) + } else if (value == 0x7f) { value = 8; /* make del = backspace */ + } ret = (*spk_special_handler) (vc, type, value, keycode); spk_close_press = 0; if (ret < 0) @@ -2259,9 +2265,9 @@ static int vt_notifier_call(struct notifier_block *nb, speakup_deallocate(vc); break; case VT_WRITE: - if (param->c == '\b') + if (param->c == '\b') { speakup_bs(vc); - else if (param->c < 0x100) { + } else if (param->c < 0x100) { char d = param->c; speakup_con_write(vc, &d, 1); -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/6] staging: speakup: Blank lines removed after an open brace '{'
Blank lines aren't necessary after an open brace '{' as reported by Checkpatch.pl. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/kobjects.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c index edde9e68779e..441f14f07382 100644 --- a/drivers/staging/speakup/kobjects.c +++ b/drivers/staging/speakup/kobjects.c @@ -761,7 +761,6 @@ static ssize_t message_store_helper(const char *buf, size_t count, enum msg_index_t curmessage; while (cp < end) { - while ((cp < end) && (*cp == ' ' || *cp == '\t')) cp++; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/6] staging: speakup: Logical continuations should be on the previous line
This patch fixes the checkpatch issue: CHECK: Logical continuations should be on the previous line. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/main.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 17df20ec94be..c1c3ee7dc95a 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -564,18 +564,18 @@ static u_long get_word(struct vc_data *vc) *buf = '\0'; synth_printf("%s\n", spk_msg_get(MSG_SPACE)); return 0; - } else if ((tmpx < vc->vc_cols - 2) - && (ch == SPACE || ch == 0 || IS_WDLM(ch)) - && ((char)get_char(vc, (u_short *)&tmp_pos + 1, &temp) > - SPACE)) { + } else if ((tmpx < vc->vc_cols - 2) && + (ch == SPACE || ch == 0 || IS_WDLM(ch)) && + ((char)get_char(vc, (u_short *)&tmp_pos + 1, &temp) > + SPACE)) { tmp_pos += 2; tmpx++; } else while (tmpx > 0) { ch = (char)get_char(vc, (u_short *)tmp_pos - 1, &temp); - if ((ch == SPACE || ch == 0 || IS_WDLM(ch)) - && ((char)get_char(vc, (u_short *)tmp_pos, &temp) > - SPACE)) + if ((ch == SPACE || ch == 0 || IS_WDLM(ch)) && + ((char)get_char(vc, (u_short *)tmp_pos, &temp) > +SPACE)) break; tmp_pos -= 2; tmpx--; @@ -586,8 +586,8 @@ static u_long get_word(struct vc_data *vc) tmp_pos += 2; tmpx++; ch = (char)get_char(vc, (u_short *)tmp_pos, &temp); - if ((ch == SPACE) || ch == 0 - || (IS_WDLM(buf[cnt - 1]) && (ch > SPACE))) + if ((ch == SPACE) || ch == 0 || + (IS_WDLM(buf[cnt - 1]) && (ch > SPACE))) break; buf[cnt++] = ch; } @@ -725,8 +725,8 @@ static void spell_word(struct vc_data *vc) synth_printf("%s", str_cap); last_cap = str_cap; } - if (this_speakup_key == SPELL_PHONETIC - && (isascii(ch) && isalpha(ch))) { + if (this_speakup_key == SPELL_PHONETIC && + (isascii(ch) && isalpha(ch))) { ch &= 31; cp1 = phonetic[--ch]; } else { @@ -895,8 +895,8 @@ static int get_sentence_buf(struct vc_data *vc, int read_punc) while (start < end) { sentbuf[bn][i] = (char)get_char(vc, (u_short *)start, &tmp); if (i > 0) { - if (sentbuf[bn][i] == SPACE && sentbuf[bn][i - 1] == '.' - && numsentences[bn] < 9) { + if (sentbuf[bn][i] == SPACE && sentbuf[bn][i - 1] == '.' && + numsentences[bn] < 9) { /* Sentence Marker */ numsentences[bn]++; sentmarks[bn][numsentences[bn]] = @@ -1280,8 +1280,8 @@ void spk_reset_default_chars(void) /* First, free any non-default */ for (i = 0; i < 256; i++) { - if (spk_characters[i] - && (spk_characters[i] != spk_default_chars[i])) + if (spk_characters[i] && + (spk_characters[i] != spk_default_chars[i])) kfree(spk_characters[i]); } @@ -2073,8 +2073,8 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym, tty = vc->port.tty; if (type >= 0xf0) type -= 0xf0; - if (type == KT_PAD - && (vt_get_leds(fg_console, VC_NUMLOCK))) { + if (type == KT_PAD && + (vt_get_leds(fg_console, VC_NUMLOCK))) { if (up_flag) { spk_keydown = 0; goto out; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/6] multiple checkpatch issues
Improve readability by fixing multiple checkpatch.pl issues. Arushi Singhal (6): staging: speakup: fixes braces {} should be used on all arms of this statement staging: speakup: Avoid multiple assignments on same line staging: speakup: identation should use tabs staging: wilc1000: Alignment should match open parenthesis staging: wilc1000: function prototype argument should have identifier name staging: wilc1000: Logical continuations should be on the previous line drivers/staging/speakup/main.c| 6 +++-- drivers/staging/speakup/speakup_decext.c | 6 ++--- drivers/staging/speakup/speakup_decpc.c | 10 drivers/staging/speakup/speakup_dectlk.c | 6 ++--- drivers/staging/speakup/varhandlers.c | 12 ++ drivers/staging/wilc1000/host_interface.c | 2 +- drivers/staging/wilc1000/wilc_spi.c | 6 ++--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 28 +++ drivers/staging/wilc1000/wilc_wlan.c | 10 drivers/staging/wilc1000/wilc_wlan.h | 6 ++--- 10 files changed, 48 insertions(+), 44 deletions(-) -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/6] staging: speakup: fixes braces {} should be used on all arms of this statement
This patch fixes the checks reported by checkpatch.pl for braces {} should be used on all arms of this statement. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/main.c | 3 ++- drivers/staging/speakup/speakup_decext.c | 6 +++--- drivers/staging/speakup/speakup_decpc.c | 6 +++--- drivers/staging/speakup/speakup_dectlk.c | 6 +++--- drivers/staging/speakup/varhandlers.c| 12 +++- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index a3daf4ae5c0a..47cea629ba0b 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -408,8 +408,9 @@ static void say_attributes(struct vc_data *vc) if (bg > 7) { synth_printf(" %s ", spk_msg_get(MSG_ON_BLINKING)); bg -= 8; - } else + } else { synth_printf(" %s ", spk_msg_get(MSG_ON)); + } synth_printf("%s\n", spk_msg_get(MSG_COLORS_START + bg)); } diff --git a/drivers/staging/speakup/speakup_decext.c b/drivers/staging/speakup/speakup_decext.c index 5f9f3a7543db..6ebd56e07e71 100644 --- a/drivers/staging/speakup/speakup_decext.c +++ b/drivers/staging/speakup/speakup_decext.c @@ -193,11 +193,11 @@ static void do_catch_up(struct spk_synth *synth) spin_lock_irqsave(&speakup_info.spinlock, flags); synth_buffer_getc(); spin_unlock_irqrestore(&speakup_info.spinlock, flags); - if (ch == '[') + if (ch == '[') { in_escape = 1; - else if (ch == ']') + } else if (ch == ']') { in_escape = 0; - else if (ch <= SPACE) { + } else if (ch <= SPACE) { if (!in_escape && strchr(",.!?;:", last)) spk_serial_out(PROCSPEECH); if (time_after_eq(jiffies, jiff_max)) { diff --git a/drivers/staging/speakup/speakup_decpc.c b/drivers/staging/speakup/speakup_decpc.c index 600eb057f830..dc860c4b8279 100644 --- a/drivers/staging/speakup/speakup_decpc.c +++ b/drivers/staging/speakup/speakup_decpc.c @@ -410,11 +410,11 @@ static void do_catch_up(struct spk_synth *synth) spin_lock_irqsave(&speakup_info.spinlock, flags); synth_buffer_getc(); spin_unlock_irqrestore(&speakup_info.spinlock, flags); - if (ch == '[') + if (ch == '[') { in_escape = 1; - else if (ch == ']') + } else if (ch == ']') { in_escape = 0; - else if (ch <= SPACE) { + } else if (ch <= SPACE) { if (!in_escape && strchr(",.!?;:", last)) dt_sendchar(PROCSPEECH); if (time_after_eq(jiffies, jiff_max)) { diff --git a/drivers/staging/speakup/speakup_dectlk.c b/drivers/staging/speakup/speakup_dectlk.c index 26036050cdb2..2429232ee649 100644 --- a/drivers/staging/speakup/speakup_dectlk.c +++ b/drivers/staging/speakup/speakup_dectlk.c @@ -258,11 +258,11 @@ static void do_catch_up(struct spk_synth *synth) spin_lock_irqsave(&speakup_info.spinlock, flags); synth_buffer_getc(); spin_unlock_irqrestore(&speakup_info.spinlock, flags); - if (ch == '[') + if (ch == '[') { in_escape = 1; - else if (ch == ']') + } else if (ch == ']') { in_escape = 0; - else if (ch <= SPACE) { + } else if (ch <= SPACE) { if (!in_escape && strchr(",.!?;:", last)) spk_serial_out(PROCSPEECH); if (time_after_eq(jiffies, jiff_max)) { diff --git a/drivers/staging/speakup/varhandlers.c b/drivers/staging/speakup/varhandlers.c index 5910fe0b1365..d37d24e26641 100644 --- a/drivers/staging/speakup/varhandlers.c +++ b/drivers/staging/speakup/varhandlers.c @@ -258,10 +258,11 @@ int spk_set_string_var(const char *page, struct st_var_header *var, int len) if (var->p_val != var_data->u.s.default_val) strcpy((char *)var->p_val, var_data->u.s.default_val); return -ERESTART; - } else if (var->p_val) + } else if (var->p_val) { strcpy((char *)var->p_val, page); - else + } else { return -E2BIG; + } return 0; } @@ -281,17 +282,18 @@ int spk_set_mask_bits(const char *input, const int which, const int how)
[PATCH 2/6] staging: speakup: Avoid multiple assignments on same line
This patch fixes the checkpatch.pl warning "multiple assignments should be avoided." Signed-off-by: Arushi Singhal --- drivers/staging/speakup/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 47cea629ba0b..604335390b87 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -2091,7 +2091,8 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym, spk_keydown = 0; goto out; } - value = spk_lastkey = pad_chars[value]; + value = pad_chars[value]; + spk_lastkey = value; spk_keydown++; spk_parked &= 0xfe; goto no_map; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/6] staging: wilc1000: Alignment should match open parenthesis
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal --- drivers/staging/wilc1000/host_interface.c | 2 +- drivers/staging/wilc1000/wilc_spi.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 16 drivers/staging/wilc1000/wilc_wlan.c | 10 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index f848bb85ff1f..2429c85052bf 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -1350,7 +1350,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif, if (u32RcvdAssocRespInfoLen != 0) { s32Err = wilc_parse_assoc_resp_info(rcv_assoc_resp, u32RcvdAssocRespInfoLen, - &pstrConnectRespInfo); + &pstrConnectRespInfo); if (s32Err) { netdev_err(vif->ndev, "wilc_parse_assoc_resp_info() returned error %d\n", s32Err); } else { diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index 55d53c3a95df..fb7ccfc29a19 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -410,7 +410,7 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz, if (len2 > ARRAY_SIZE(wb)) { dev_err(&spi->dev, "spi buffer size too small (%d) (%zu)\n", -len2, ARRAY_SIZE(wb)); + len2, ARRAY_SIZE(wb)); return N_FAIL; } /* zero spi write buffers. */ diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 4a6fe90a41de..8cb7506bd0e5 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -1301,16 +1301,16 @@ static int set_pmksa(struct wiphy *wiphy, struct net_device *netdev, for (i = 0; i < priv->pmkid_list.numpmkid; i++) { if (!memcmp(pmksa->bssid, priv->pmkid_list.pmkidlist[i].bssid, -ETH_ALEN)) { + ETH_ALEN)) { flag = PMKID_FOUND; break; } } if (i < WILC_MAX_NUM_PMKIDS) { memcpy(priv->pmkid_list.pmkidlist[i].bssid, pmksa->bssid, - ETH_ALEN); + ETH_ALEN); memcpy(priv->pmkid_list.pmkidlist[i].pmkid, pmksa->pmkid, - PMKID_LEN); + PMKID_LEN); if (!(flag == PMKID_FOUND)) priv->pmkid_list.numpmkid++; } else { @@ -1334,7 +1334,7 @@ static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev, for (i = 0; i < priv->pmkid_list.numpmkid; i++) { if (!memcmp(pmksa->bssid, priv->pmkid_list.pmkidlist[i].bssid, -ETH_ALEN)) { + ETH_ALEN)) { memset(&priv->pmkid_list.pmkidlist[i], 0, sizeof(struct host_if_pmkid)); break; } @@ -1343,11 +1343,11 @@ static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev, if (i < priv->pmkid_list.numpmkid && priv->pmkid_list.numpmkid > 0) { for (; i < (priv->pmkid_list.numpmkid - 1); i++) { memcpy(priv->pmkid_list.pmkidlist[i].bssid, - priv->pmkid_list.pmkidlist[i + 1].bssid, - ETH_ALEN); + priv->pmkid_list.pmkidlist[i + 1].bssid, + ETH_ALEN); memcpy(priv->pmkid_list.pmkidlist[i].pmkid, - priv->pmkid_list.pmkidlist[i].pmkid, - PMKID_LEN); + priv->pmkid_list.pmkidlist[i].pmkid, + PMKID_LEN); } priv->pmkid_list.numpmkid--; } else { diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index bc5ad20af0a3..9addef1f1e12 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -287,7 +287,7 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev) whi
[PATCH 5/6] staging: wilc1000: function prototype argument should have identifier name
function prototype argument should have an identifier name as reported by checkpatch.pl. Signed-off-by: Arushi Singhal --- drivers/staging/wilc1000/wilc_wlan.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h index 11365efcc5d0..7a5eba9b5f47 100644 --- a/drivers/staging/wilc1000/wilc_wlan.h +++ b/drivers/staging/wilc1000/wilc_wlan.h @@ -274,8 +274,8 @@ struct wilc_vif; int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer, u32 buffer_size); -int wilc_wlan_start(struct wilc *); -int wilc_wlan_stop(struct wilc *); +int wilc_wlan_start(struct wilc *wilc); +int wilc_wlan_stop(struct wilc *wilc); int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer, u32 buffer_size, wilc_tx_complete_func_t func); int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count); @@ -291,7 +291,7 @@ int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer, void wilc_chip_sleep_manually(struct wilc *wilc); void wilc_enable_tcp_ack_filter(bool value); -int wilc_wlan_get_num_conn_ifcs(struct wilc *); +int wilc_wlan_get_num_conn_ifcs(struct wilc *wilc); int wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev); void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size); -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/6] staging: wilc1000: Logical continuations should be on the previous line
This patch fixes the checkpatch issue: CHECK: Logical continuations should be on the previous line. Signed-off-by: Arushi Singhal --- drivers/staging/wilc1000/wilc_spi.c | 4 ++-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 12 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index fb7ccfc29a19..5e28adc95371 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -454,8 +454,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz, return N_FAIL; } - if ((cmd == CMD_INTERNAL_READ) || (cmd == CMD_SINGLE_READ) - || (cmd == CMD_DMA_READ) || (cmd == CMD_DMA_EXT_READ)) { + if ((cmd == CMD_INTERNAL_READ) || (cmd == CMD_SINGLE_READ) || + (cmd == CMD_DMA_READ) || (cmd == CMD_DMA_EXT_READ)) { int retry; /* u16 crc1, crc2; */ u8 crc[2]; diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 8cb7506bd0e5..54412e97d45b 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -765,8 +765,8 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, } } - if ((sme->crypto.wpa_versions & NL80211_WPA_VERSION_1) - || (sme->crypto.wpa_versions & NL80211_WPA_VERSION_2)) { + if ((sme->crypto.wpa_versions & NL80211_WPA_VERSION_1) || + (sme->crypto.wpa_versions & NL80211_WPA_VERSION_2)) { for (i = 0; i < sme->crypto.n_ciphers_pairwise; i++) { if (sme->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_TKIP) u8security = u8security | TKIP; @@ -1497,8 +1497,8 @@ void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size) } } if (p2p_local_random > p2p_recv_random) { - if ((buff[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_REQ || buff[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_RSP - || buff[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_REQ || buff[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_RSP)) { + if ((buff[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_REQ || buff[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_RSP || + buff[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_REQ || buff[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_RSP)) { for (i = P2P_PUB_ACTION_SUBTYPE + 2; i < size; i++) { if (buff[i] == P2PELEM_ATTR_ID && !(memcmp(p2p_oui, &buff[i + 2], 4))) { WILC_WFI_CfgParseRxAction(&buff[i + 6], size - (i + 6)); @@ -1682,8 +1682,8 @@ static int mgmt_tx(struct wiphy *wiphy, } } - if ((buf[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_REQ || buf[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_RSP - || buf[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_REQ || buf[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_RSP)) { + if ((buf[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_REQ || buf[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_RSP || + buf[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_REQ || buf[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_RSP)) { if (p2p_local_random > p2p_recv_random) { for (i = P2P_PUB_ACTION_SUBTYPE + 2; i < len; i++) { if (buf[i] == P2PELEM_ATTR_ID && !(memcmp(p2p_oui, &buf[i + 2], 4))) { -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/6] staging: speakup: identation should use tabs
Indentation should always use tabs and never spaces. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/speakup_decpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/speakup/speakup_decpc.c b/drivers/staging/speakup/speakup_decpc.c index dc860c4b8279..c5d1660da5be 100644 --- a/drivers/staging/speakup/speakup_decpc.c +++ b/drivers/staging/speakup/speakup_decpc.c @@ -85,8 +85,8 @@ #defineCTRL_io_priority0x0c00 /* change i/o priority */ #defineCTRL_free_mem 0x0d00 /* get free paragraphs on module */ #defineCTRL_get_lang 0x0e00 /* return bit mask of loaded -* languages -*/ +* languages +*/ #defineCMD_test0x2000 /* self-test request */ #defineTEST_mask 0x0F00 /* isolate test field */ #defineTEST_null 0x /* no test requested */ -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/3] multiple checkpatch issues
Improve readability by fixing multiple checkpatch.pl issues in sm750fb driver. Arushi Singhal (3): staging: sm750fb: fixes add blank line after function/struct/union/enum declarations staging: sm750fb: function prototype argument should have an identifier name staging: sm750fb: Alignment should match open parenthesis drivers/staging/sm750fb/ddk750_display.h | 3 +- drivers/staging/sm750fb/ddk750_mode.c| 69 drivers/staging/sm750fb/ddk750_mode.h| 4 +- drivers/staging/sm750fb/ddk750_power.h | 3 +- drivers/staging/sm750fb/sm750.h | 2 +- drivers/staging/sm750fb/sm750_cursor.c | 3 ++ 6 files changed, 45 insertions(+), 39 deletions(-) -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/3] staging: sm750fb: function prototype argument should have an identifier name
function prototype arguments like 'struct vb_device_info *','unsigned long' etc. should have an identifier name. Signed-off-by: Arushi Singhal --- drivers/staging/sm750fb/ddk750_display.h | 2 +- drivers/staging/sm750fb/ddk750_mode.h| 2 +- drivers/staging/sm750fb/ddk750_power.h | 2 +- drivers/staging/sm750fb/sm750.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_display.h b/drivers/staging/sm750fb/ddk750_display.h index 8bf22e4f0d8b..369f1740a42b 100644 --- a/drivers/staging/sm750fb/ddk750_display.h +++ b/drivers/staging/sm750fb/ddk750_display.h @@ -103,6 +103,6 @@ typedef enum _disp_output_t { disp_output_t; -void ddk750_setLogicalDispOut(disp_output_t); +void ddk750_setLogicalDispOut(disp_output_t output); #endif diff --git a/drivers/staging/sm750fb/ddk750_mode.h b/drivers/staging/sm750fb/ddk750_mode.h index b4cd90a5d2bc..0292d87aa98b 100644 --- a/drivers/staging/sm750fb/ddk750_mode.h +++ b/drivers/staging/sm750fb/ddk750_mode.h @@ -36,6 +36,6 @@ typedef struct _mode_parameter_t { mode_parameter_t; -int ddk750_setModeTiming(mode_parameter_t *, clock_type_t); +int ddk750_setModeTiming(mode_parameter_t *parm, clock_type_t clock); #endif diff --git a/drivers/staging/sm750fb/ddk750_power.h b/drivers/staging/sm750fb/ddk750_power.h index 1f22a67493af..d2948a7f0cdc 100644 --- a/drivers/staging/sm750fb/ddk750_power.h +++ b/drivers/staging/sm750fb/ddk750_power.h @@ -15,7 +15,7 @@ DPMS_t; (peek32(MISC_CTRL) & ~MISC_CTRL_DAC_POWER_OFF) | (off)); \ } -void ddk750_set_dpms(DPMS_t); +void ddk750_set_dpms(DPMS_t state); void sm750_set_power_mode(unsigned int powerMode); void sm750_set_current_gate(unsigned int gate); diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index 306711ed55f9..5ea455dee949 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -184,7 +184,7 @@ static inline unsigned long ps_to_hz(unsigned int psvalue) } int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev); -int hw_sm750_inithw(struct sm750_dev*, struct pci_dev *); +int hw_sm750_inithw(struct sm750_dev *sm750_dev, struct pci_dev *pdev); void hw_sm750_initAccel(struct sm750_dev *); int hw_sm750_deWait(void); int hw_sm750le_deWait(void); -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/3] staging: sm750fb: fixes add blank line after function/struct/union/enum declarations
This patch fixes the warnings reported by checkpatch.pl for please use a blank line after function/struct/union/enum declarations. Signed-off-by: Arushi Singhal --- drivers/staging/sm750fb/ddk750_display.h | 1 + drivers/staging/sm750fb/ddk750_mode.h| 2 ++ drivers/staging/sm750fb/ddk750_power.h | 1 + drivers/staging/sm750fb/sm750_cursor.c | 3 +++ 4 files changed, 7 insertions(+) diff --git a/drivers/staging/sm750fb/ddk750_display.h b/drivers/staging/sm750fb/ddk750_display.h index e2a3f84ca4c5..8bf22e4f0d8b 100644 --- a/drivers/staging/sm750fb/ddk750_display.h +++ b/drivers/staging/sm750fb/ddk750_display.h @@ -100,6 +100,7 @@ typedef enum _disp_output_t { do_CRT_PRI = CRT_2_PRI | PRI_TP_ON | DPMS_ON | DAC_ON, do_CRT_SEC = CRT_2_SEC | SEC_TP_ON | DPMS_ON | DAC_ON, } + disp_output_t; void ddk750_setLogicalDispOut(disp_output_t); diff --git a/drivers/staging/sm750fb/ddk750_mode.h b/drivers/staging/sm750fb/ddk750_mode.h index 2183e664cf4b..b4cd90a5d2bc 100644 --- a/drivers/staging/sm750fb/ddk750_mode.h +++ b/drivers/staging/sm750fb/ddk750_mode.h @@ -7,6 +7,7 @@ typedef enum _spolarity_t { POS = 0, /* positive */ NEG, /* negative */ } + spolarity_t; typedef struct _mode_parameter_t { @@ -32,6 +33,7 @@ typedef struct _mode_parameter_t { /* Clock Phase. This clock phase only applies to Panel. */ spolarity_t clock_phase_polarity; } + mode_parameter_t; int ddk750_setModeTiming(mode_parameter_t *, clock_type_t); diff --git a/drivers/staging/sm750fb/ddk750_power.h b/drivers/staging/sm750fb/ddk750_power.h index ec0b99d6a7ad..1f22a67493af 100644 --- a/drivers/staging/sm750fb/ddk750_power.h +++ b/drivers/staging/sm750fb/ddk750_power.h @@ -7,6 +7,7 @@ typedef enum _DPMS_t { crtDPMS_SUSPEND = 0x2, crtDPMS_OFF = 0x3, } + DPMS_t; #define setDAC(off) { \ diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c index aa232c31b312..1e29a0f0a53d 100644 --- a/drivers/staging/sm750fb/sm750_cursor.c +++ b/drivers/staging/sm750fb/sm750_cursor.c @@ -54,6 +54,7 @@ void sm750_hw_cursor_enable(struct lynx_cursor *cursor) reg = (cursor->offset & HWC_ADDRESS_ADDRESS_MASK) | HWC_ADDRESS_ENABLE; poke32(HWC_ADDRESS, reg); } + void sm750_hw_cursor_disable(struct lynx_cursor *cursor) { poke32(HWC_ADDRESS, 0); @@ -65,6 +66,7 @@ void sm750_hw_cursor_setSize(struct lynx_cursor *cursor, cursor->w = w; cursor->h = h; } + void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, int x, int y) { @@ -74,6 +76,7 @@ void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, (x & HWC_LOCATION_X_MASK)); poke32(HWC_LOCATION, reg); } + void sm750_hw_cursor_setColor(struct lynx_cursor *cursor, u32 fg, u32 bg) { -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/3] staging: sm750fb: Alignment should match open parenthesis
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal --- drivers/staging/sm750fb/ddk750_mode.c | 69 +-- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c index 45af806c8d55..77dfac3ba041 100644 --- a/drivers/staging/sm750fb/ddk750_mode.c +++ b/drivers/staging/sm750fb/ddk750_mode.c @@ -28,9 +28,9 @@ static unsigned long displayControlAdjust_SM750LE(mode_parameter_t *pModeParam, poke32(CRT_AUTO_CENTERING_TL, 0); poke32(CRT_AUTO_CENTERING_BR, - (((y - 1) << CRT_AUTO_CENTERING_BR_BOTTOM_SHIFT) & - CRT_AUTO_CENTERING_BR_BOTTOM_MASK) | - ((x - 1) & CRT_AUTO_CENTERING_BR_RIGHT_MASK)); + (((y - 1) << CRT_AUTO_CENTERING_BR_BOTTOM_SHIFT) & + CRT_AUTO_CENTERING_BR_BOTTOM_MASK) | + ((x - 1) & CRT_AUTO_CENTERING_BR_RIGHT_MASK)); /* * Assume common fields in dispControl have been properly set before @@ -72,8 +72,7 @@ static unsigned long displayControlAdjust_SM750LE(mode_parameter_t *pModeParam, } /* only timing related registers will be programed */ -static int programModeRegisters(mode_parameter_t *pModeParam, - struct pll_value *pll) +static int programModeRegisters(mode_parameter_t *pModeParam, struct pll_value *pll) { int ret = 0; int cnt = 0; @@ -83,32 +82,32 @@ static int programModeRegisters(mode_parameter_t *pModeParam, /* programe secondary pixel clock */ poke32(CRT_PLL_CTRL, sm750_format_pll_reg(pll)); poke32(CRT_HORIZONTAL_TOTAL, - (((pModeParam->horizontal_total - 1) << - CRT_HORIZONTAL_TOTAL_TOTAL_SHIFT) & - CRT_HORIZONTAL_TOTAL_TOTAL_MASK) | - ((pModeParam->horizontal_display_end - 1) & - CRT_HORIZONTAL_TOTAL_DISPLAY_END_MASK)); + (((pModeParam->horizontal_total - 1) << +CRT_HORIZONTAL_TOTAL_TOTAL_SHIFT) & + CRT_HORIZONTAL_TOTAL_TOTAL_MASK) | + ((pModeParam->horizontal_display_end - 1) & + CRT_HORIZONTAL_TOTAL_DISPLAY_END_MASK)); poke32(CRT_HORIZONTAL_SYNC, - ((pModeParam->horizontal_sync_width << - CRT_HORIZONTAL_SYNC_WIDTH_SHIFT) & - CRT_HORIZONTAL_SYNC_WIDTH_MASK) | - ((pModeParam->horizontal_sync_start - 1) & - CRT_HORIZONTAL_SYNC_START_MASK)); + ((pModeParam->horizontal_sync_width << +CRT_HORIZONTAL_SYNC_WIDTH_SHIFT) & + CRT_HORIZONTAL_SYNC_WIDTH_MASK) | + ((pModeParam->horizontal_sync_start - 1) & + CRT_HORIZONTAL_SYNC_START_MASK)); poke32(CRT_VERTICAL_TOTAL, - (((pModeParam->vertical_total - 1) << - CRT_VERTICAL_TOTAL_TOTAL_SHIFT) & - CRT_VERTICAL_TOTAL_TOTAL_MASK) | - ((pModeParam->vertical_display_end - 1) & - CRT_VERTICAL_TOTAL_DISPLAY_END_MASK)); + (((pModeParam->vertical_total - 1) << +CRT_VERTICAL_TOTAL_TOTAL_SHIFT) & + CRT_VERTICAL_TOTAL_TOTAL_MASK) | + ((pModeParam->vertical_display_end - 1) & + CRT_VERTICAL_TOTAL_DISPLAY_END_MASK)); poke32(CRT_VERTICAL_SYNC, - ((pModeParam->vertical_sync_height << - CRT_VERTICAL_SYNC_HEIGHT_SHIFT) & - CRT_VERTICAL_SYNC_HEIGHT_MASK) | - ((pModeParam->vertical_sync_start - 1) & - CRT_VERTICAL_SYNC_START_MASK)); + ((pModeParam->vertical_sync_height << +CRT_VERTICAL_SYNC_HEIGHT_SHIFT) & + CRT_VERTICAL_SYNC_HEIGHT_MASK) | + ((pModeParam->vertical_sync_start - 1) & + CRT_VERTICAL_SYNC_START_MASK)); tmp = DISPLAY_CTRL_TIMING | DISPLAY_CTRL_PLANE; if (pModeParam->vertical_sync_polarity) @@ -147,18 +146,18 @@ static int programModeRegisters(mode_parameter_t *pModeParam, PANEL_HORIZONTAL_SYNC_START_MASK)); poke32(PANEL_VERTICAL
[PATCH] staging: ks7010: removed code in comments.
Commenting Code Is a Bad Idea. Comments are their to explain the code and how the code achieves its goal and as codes in the comments does not explain what the code is doing so there is no use of commenting them. So in this patch codes in the comments are removed. Signed-off-by: Arushi Singhal --- drivers/staging/ks7010/ks7010_sdio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index 14580cb4c755..df90c20fcb69 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -478,8 +478,6 @@ static void ks7010_rw_function(struct work_struct *work) /* wiat after WAKEUP */ while (time_after(priv->last_wakeup + ((30 * HZ) / 1000), jiffies)) { DPRINTK(4, "wait after WAKEUP\n"); -/* queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,&priv->ks_wlan_hw.rw_wq, - (priv->last_wakeup + ((30*HZ)/1000) - jiffies));*/ dev_info(&priv->ks_wlan_hw.sdio_card->func->dev, "wake: %lu %lu\n", priv->last_wakeup + (30 * HZ) / 1000, -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/4] staging: speakup: checkpatch guided cleanups
Improve readability by fixing multiple checkpatch.pl issues in speakup driver. Arushi Singhal (4): staging: speakup: Comparison to NULL could be written staging: speakup:indentation should use tabs staging: speakup: Alignment match open parenthesis staging: speakup: Placed Logical on the previous line drivers/staging/speakup/fakekey.c | 2 +- drivers/staging/speakup/i18n.c | 4 ++-- drivers/staging/speakup/kobjects.c | 42 +- drivers/staging/speakup/main.c | 46 +++--- 4 files changed, 47 insertions(+), 47 deletions(-) -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/4] staging: speakup: Comparison to NULL could be written
Fixed coding style for null comparisons in speakup driver to be more consistant with the rest of the kernel coding style. Signed-off-by: Arushi Singhal --- changes in v2 - fixed coding style error and upto the coding style. --- drivers/staging/speakup/fakekey.c | 2 +- drivers/staging/speakup/kobjects.c | 2 +- drivers/staging/speakup/main.c | 38 +++--- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/staging/speakup/fakekey.c b/drivers/staging/speakup/fakekey.c index d76da0a1382c..294c74b47224 100644 --- a/drivers/staging/speakup/fakekey.c +++ b/drivers/staging/speakup/fakekey.c @@ -56,7 +56,7 @@ int speakup_add_virtual_keyboard(void) void speakup_remove_virtual_keyboard(void) { - if (virt_keyboard != NULL) { + if (virt_keyboard) { input_unregister_device(virt_keyboard); virt_keyboard = NULL; } diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c index 5d871ec3693c..2fef55569bfd 100644 --- a/drivers/staging/speakup/kobjects.c +++ b/drivers/staging/speakup/kobjects.c @@ -391,7 +391,7 @@ static ssize_t synth_store(struct kobject *kobj, struct kobj_attribute *attr, len--; new_synth_name[len] = '\0'; spk_strlwr(new_synth_name); - if ((synth != NULL) && (!strcmp(new_synth_name, synth->name))) { + if (synth && !strcmp(new_synth_name, synth->name)) { pr_warn("%s already in use\n", new_synth_name); } else if (synth_init(new_synth_name) != 0) { pr_warn("failed to init synth %s\n", new_synth_name); diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index c2f70ef5b9b3..a12ec2b061fe 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -299,7 +299,7 @@ static void speakup_shut_up(struct vc_data *vc) spk_shut_up |= 0x01; spk_parked &= 0xfe; speakup_date(vc); - if (synth != NULL) + if (synth) spk_do_flush(); } @@ -441,7 +441,7 @@ static void speak_char(u_char ch) synth_printf("%s", spk_str_caps_stop); return; } - if (cp == NULL) { + if (!cp) { pr_info("speak_char: cp == NULL!\n"); return; } @@ -1157,7 +1157,7 @@ static void do_handle_shift(struct vc_data *vc, u_char value, char up_flag) { unsigned long flags; - if (synth == NULL || up_flag || spk_killed) + if (!synth || up_flag || spk_killed) return; spin_lock_irqsave(&speakup_info.spinlock, flags); if (cursor_track == read_all_mode) { @@ -1195,7 +1195,7 @@ static void do_handle_latin(struct vc_data *vc, u_char value, char up_flag) spin_unlock_irqrestore(&speakup_info.spinlock, flags); return; } - if (synth == NULL || spk_killed) { + if (!synth || spk_killed) { spin_unlock_irqrestore(&speakup_info.spinlock, flags); return; } @@ -1279,7 +1279,7 @@ void spk_reset_default_chars(void) /* First, free any non-default */ for (i = 0; i < 256; i++) { - if ((spk_characters[i] != NULL) + if (spk_characters[i] && (spk_characters[i] != spk_default_chars[i])) kfree(spk_characters[i]); } @@ -1321,10 +1321,10 @@ static int speakup_allocate(struct vc_data *vc) int vc_num; vc_num = vc->vc_num; - if (speakup_console[vc_num] == NULL) { + if (!speakup_console[vc_num]) { speakup_console[vc_num] = kzalloc(sizeof(*speakup_console[0]), GFP_ATOMIC); - if (speakup_console[vc_num] == NULL) + if (!speakup_console[vc_num]) return -ENOMEM; speakup_date(vc); } else if (!spk_parked) @@ -1373,7 +1373,7 @@ static void kbd_fakekey2(struct vc_data *vc, int command) static void read_all_doc(struct vc_data *vc) { - if ((vc->vc_num != fg_console) || synth == NULL || spk_shut_up) + if ((vc->vc_num != fg_console) || !synth || spk_shut_up) return; if (!synth_supports_indexing()) return; @@ -1487,7 +1487,7 @@ static int pre_handle_cursor(struct vc_data *vc, u_char value, char up_flag) spin_lock_irqsave(&speakup_info.spinlock, flags); if (cursor_track == read_all_mode) { spk_parked &= 0xfe; - if (synth == NULL || up_flag || spk_shut_up) { + if (!synth || up_flag || spk_shut_up) { spin_unlock_irqrestore(&speakup_info.spinlock, flags); return NOTIFY_ST
[PATCH 2/4] staging: speakup:indentation should use tabs
Indentation should always use tabs and never spaces. Signed-off-by: Arushi Singhal --- drivers/staging/speakup/i18n.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index 1a3e34880ac1..11f1418b4006 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -552,7 +552,7 @@ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) if (index >= MSG_FORMATTED_START && index <= MSG_FORMATTED_END && !fmt_validate(speakup_default_msgs[index], - newstr)) { + newstr)) { kfree(newstr); return -EINVAL; } -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel