staging: speakup: Fix warning of line over 80 characters.
PATCH 1/1 staging: speakup: Fix warning of line over 80 characters.
This patch fixes the checkpatch.pl warning:
WARNING: line over 80 characters
All line over 80 characters in driver/staging/speakup/* are fixed.
--- drivers/staging/speakup/main.c | 9 ++++++--- drivers/staging/speakup/serialio.h | 3 ++- drivers/staging/speakup/speakup.h | 6 ++++-- drivers/staging/speakup/speakup_decext.c | 6 ++++-- drivers/staging/speakup/speakup_decpc.c | 6 ++++-- drivers/staging/speakup/spk_types.h | 3 ++- 6 files changed, 22 insertions(+), 11 deletions(-)
drivers/staging/speakup/main.c +6 -3
@@ -423,7 +423,8 @@ static void announce_edge(struct vc_data *vc, int msg_id)if (spk_bleeps &1 )bleep (spk_y);if ((spk_bleeps &2 ) && (msg_id < edge_quiet)) -synth_printf ("%s\n" ,spk_msg_get (MSG_EDGE_MSGS_START + msg_id -1 )); +synth_printf ("%s\n" , +spk_msg_get (MSG_EDGE_MSGS_START + msg_id -1 )); }static void speak_char (u_char ch)
@@ -1131,7 +1132,8 @@ static void spkup_write(const char *in_buf, int count)if (in_count >2 && rep_count >2 ) {if (last_type &CH_RPT ) {synth_printf (" " ); -synth_printf (spk_msg_get (MSG_REPEAT_DESC2 ), ++rep_count); +synth_printf (spk_msg_get (MSG_REPEAT_DESC2 ), + ++rep_count);synth_printf (" " ); } rep_count =0 ;
@@ -1847,7 +1849,8 @@ static void speakup_win_set(struct vc_data *vc) win_right = spk_x; }snprintf (info,sizeof (info),spk_msg_get (MSG_WINDOW_BOUNDARY ), - (win_start) ?spk_msg_get (MSG_END ) :spk_msg_get (MSG_START ), + (win_start) ? +spk_msg_get (MSG_END ) :spk_msg_get (MSG_START ), (int )spk_y +1 , (int )spk_x +1 ); }synth_printf ("%s\n" , info);
drivers/staging/speakup/serialio.h +2 -1
@@ -34,6 +34,7 @@ struct old_serial_port {#define SPK_TIMEOUT 100#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) -#define spk_serial_tx_busy () ((inb(speakup_info.port_tts + UART_LSR) & BOTH_EMPTY) != BOTH_EMPTY) +#define spk_serial_tx_busy () \ + ((inb(speakup_info.port_tts + UART_LSR) & BOTH_EMPTY) != BOTH_EMPTY)#endif
drivers/staging/speakup/speakup.h +4 -2
@@ -61,10 +61,12 @@ extern struct st_var_header *spk_get_var_header(enum var_id_t var_id);extern struct st_var_header *spk_var_header_by_name (const char *name);extern struct punc_var_t *spk_get_punc_var (enum var_id_t var_id);extern int spk_set_num_var (int val,struct st_var_header *var,int how); -extern int spk_set_string_var (const char *page,struct st_var_header *var,int len); +extern int spk_set_string_var (const char *page,struct st_var_header *var, +int len);extern int spk_set_mask_bits (const char *input,const int which,const int how);extern special_func spk_special_handler; -extern int spk_handle_help (struct vc_data *vc,u_char type,u_char ch,u_short key); +extern int spk_handle_help (struct vc_data *vc,u_char type,u_char ch, +u_short key);extern int synth_init (char *name);extern void synth_release (void );
drivers/staging/speakup/speakup_decext.c +4 -2
@@ -207,10 +207,12 @@ static void do_catch_up(struct spk_synth *synth)if (time_after_eq (jiffies, jiff_max)) {if (!in_escape)spk_serial_out (PROCSPEECH ); -spin_lock_irqsave (&speakup_info.spinlock, flags); +spin_lock_irqsave (&speakup_info.spinlock, + flags); jiffy_delta_val = jiffy_delta->u.n.value; delay_time_val = delay_time->u.n.value; -spin_unlock_irqrestore (&speakup_info.spinlock, flags); +spin_unlock_irqrestore (&speakup_info.spinlock, + flags);schedule_timeout (msecs_to_jiffies (delay_time_val)); jiff_max = jiffies + jiffy_delta_val;
drivers/staging/speakup/speakup_decpc.c +4 -2
@@ -423,10 +423,12 @@ static void do_catch_up(struct spk_synth *synth)if (time_after_eq (jiffies, jiff_max)) {if (!in_escape)dt_sendchar (PROCSPEECH ); -spin_lock_irqsave (&speakup_info.spinlock, flags); +spin_lock_irqsave (&speakup_info.spinlock, + flags); jiffy_delta_val = jiffy_delta->u.n.value; delay_time_val = delay_time->u.n.value; -spin_unlock_irqrestore (&speakup_info.spinlock, flags); +spin_unlock_irqrestore (&speakup_info.spinlock, + flags);schedule_timeout (msecs_to_jiffies (delay_time_val)); jiff_max = jiffies + jiffy_delta_val;
drivers/staging/speakup/spk_types.h +2 -1
@@ -168,7 +168,8 @@ struct spk_synth {int *default_vol;int (*probe)(struct spk_synth *synth);void (*release)(void ); -const char *(*synth_immediate)(struct spk_synth *synth,const char *buff); +const char *(*synth_immediate)(struct spk_synth *synth, +const char *buff);void (*catch_up)(struct spk_synth *synth);void (*flush)(struct spk_synth *synth);int (*is_alive)(struct spk_synth *synth);
Signature · 1 line
1.9.1
Quoted 20 lines · Shirish Gajera
This patch fixes the checkpatch.pl warning:
WARNING: line over 80 charactersAll line over 80 characters in driver/staging/speakup/* are fixed.
Signed-off-by Shirish Gajera <[email protected]>--- drivers/staging/speakup/main.c | 9 ++++++--- drivers/staging/speakup/serialio.h | 3 ++- drivers/staging/speakup/speakup.h | 6 ++++-- drivers/staging/speakup/speakup_decext.c | 6 ++++-- drivers/staging/speakup/speakup_decpc.c | 6 ++++-- drivers/staging/speakup/spk_types.h | 3 ++- 6 files changed, 22 insertions(+), 11 deletions(-)drivers/staging/speakup/main.c +0
-0
drivers/staging/speakup/main.c static void announce_edge(struct vc_data *vc, int msg_id) · line 427
Quoted 6 lines
drivers/staging/speakup/main.c +2
-1@@ -423,7 +423,8 @@ static void announce_edge(struct vc_data *vc, int msg_id)if (spk_bleeps &1 )bleep (spk_y);if ((spk_bleeps &2 ) && (msg_id < edge_quiet)) -synth_printf ("%s\n" ,spk_msg_get (MSG_EDGE_MSGS_START + msg_id -1 )); +synth_printf ("%s\n" , +spk_msg_get (MSG_EDGE_MSGS_START + msg_id -1 ));
Instead of blindly adding newlines to silence checkpatch.pl, what about reworking the code?printf("%s\n", ..) cries for a puts().
drivers/staging/speakup/main.c static void spkup_write(const char *in_buf, int count) · line 1137
Quoted 11 lines
drivers/staging/speakup/main.c +2
-1}static void speak_char (u_char ch)@@ -1131,7 +1132,8 @@ static void spkup_write(const char *in_buf, int count)if (in_count >2 && rep_count >2 ) {if (last_type &CH_RPT ) {synth_printf (" " ); -synth_printf (spk_msg_get (MSG_REPEAT_DESC2 ), ++rep_count); +synth_printf (spk_msg_get (MSG_REPEAT_DESC2 ), + ++rep_count);synth_printf (" " );
This printf stuff looks odd. synth_printf() seems to take a format string, in this case the format string
is returned by spk_msg_get(), smells like a format string bug.
drivers/staging/speakup/main.c static void speakup_win_set(struct vc_data *vc) · line 1854
Quoted 10 lines
drivers/staging/speakup/main.c +2
-1} rep_count =0 ;@@ -1847,7 +1849,8 @@ static void speakup_win_set(struct vc_data *vc) win_right = spk_x; }snprintf (info,sizeof (info),spk_msg_get (MSG_WINDOW_BOUNDARY ), - (win_start) ?spk_msg_get (MSG_END ) :spk_msg_get (MSG_START ), + (win_start) ? +spk_msg_get (MSG_END ) :spk_msg_get (MSG_START ), (int )spk_y +1 , (int )spk_x +1 );
Same here. Also please resolve the ?: mess.
drivers/staging/speakup/serialio.h struct old_serial_port { · line 38
Quoted 13 lines
drivers/staging/speakup/main.c +0
-0}synth_printf ("%s\n" , info);drivers/staging/speakup/serialio.h +2
-1@@ -34,6 +34,7 @@ struct old_serial_port {#define SPK_TIMEOUT 100#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) -#define spk_serial_tx_busy () ((inb(speakup_info.port_tts + UART_LSR) & BOTH_EMPTY) != BOTH_EMPTY) +#define spk_serial_tx_busy () \ + ((inb(speakup_info.port_tts + UART_LSR) & BOTH_EMPTY) != BOTH_EMPTY)
This makro is ugly in many ways.
Why can't this be an static inline function without a dependency on global state?
Quoted 81 lines
drivers/staging/speakup/serialio.h +0
-0#endif drivers/staging/speakup/speakup.h +4
-2@@ -61,10 +61,12 @@ extern struct st_var_header *spk_get_var_header(enum var_id_t var_id);extern struct st_var_header *spk_var_header_by_name (const char *name);extern struct punc_var_t *spk_get_punc_var (enum var_id_t var_id);extern int spk_set_num_var (int val,struct st_var_header *var,int how); -extern int spk_set_string_var (const char *page,struct st_var_header *var,int len); +extern int spk_set_string_var (const char *page,struct st_var_header *var, +int len);extern int spk_set_mask_bits (const char *input,const int which,const int how);extern special_func spk_special_handler; -extern int spk_handle_help (struct vc_data *vc,u_char type,u_char ch,u_short key); +extern int spk_handle_help (struct vc_data *vc,u_char type,u_char ch, +u_short key);extern int synth_init (char *name);extern void synth_release (void );drivers/staging/speakup/speakup_decext.c +4
-2@@ -207,10 +207,12 @@ static void do_catch_up(struct spk_synth *synth)if (time_after_eq (jiffies, jiff_max)) {if (!in_escape)spk_serial_out (PROCSPEECH ); -spin_lock_irqsave (&speakup_info.spinlock, flags); +spin_lock_irqsave (&speakup_info.spinlock, + flags); jiffy_delta_val = jiffy_delta->u.n.value; delay_time_val = delay_time->u.n.value; -spin_unlock_irqrestore (&speakup_info.spinlock, flags); +spin_unlock_irqrestore (&speakup_info.spinlock, + flags);schedule_timeout (msecs_to_jiffies (delay_time_val)); jiff_max = jiffies + jiffy_delta_val;drivers/staging/speakup/speakup_decpc.c +4
-2@@ -423,10 +423,12 @@ static void do_catch_up(struct spk_synth *synth)if (time_after_eq (jiffies, jiff_max)) {if (!in_escape)dt_sendchar (PROCSPEECH ); -spin_lock_irqsave (&speakup_info.spinlock, flags); +spin_lock_irqsave (&speakup_info.spinlock, + flags); jiffy_delta_val = jiffy_delta->u.n.value; delay_time_val = delay_time->u.n.value; -spin_unlock_irqrestore (&speakup_info.spinlock, flags); +spin_unlock_irqrestore (&speakup_info.spinlock, + flags);schedule_timeout (msecs_to_jiffies (delay_time_val)); jiff_max = jiffies + jiffy_delta_val;drivers/staging/speakup/spk_types.h +2
-2@@ -168,7 +168,8 @@ struct spk_synth {int *default_vol;int (*probe)(struct spk_synth *synth);void (*release)(void ); -const char *(*synth_immediate)(struct spk_synth *synth,const char *buff); +const char *(*synth_immediate)(struct spk_synth *synth, +const char *buff);void (*catch_up)(struct spk_synth *synth);void (*flush)(struct spk_synth *synth);int (*is_alive)(struct spk_synth *synth); --1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 2 lines
Thanks, //richard
Quoted 2 lines · Richard Weinberger
Quoted 1 line · Shirish Gajera
This patch fixes the checkpatch.pl warning:
[]
Quoted 1 line
drivers/staging/speakup/main.c
Quoted 1 line
drivers/staging/speakup/main.c +0
-0
[]
Quoted 11 lines
drivers/staging/speakup/main.c static void announce_edge(struct vc_data *vc, int msg_id) · line 427
Quoted 7 lines
drivers/staging/speakup/main.c +2
-1@@ -423,7 +423,8 @@ static void announce_edge(struct vc_data *vc, int msg_id)if (spk_bleeps &1 )bleep (spk_y);if ((spk_bleeps &2 ) && (msg_id < edge_quiet)) -synth_printf ("%s\n" ,spk_msg_get (MSG_EDGE_MSGS_START + msg_id -1 )); +synth_printf ("%s\n" , +spk_msg_get (MSG_EDGE_MSGS_START + msg_id -1 ));Instead of blindly adding newlines to silence checkpatch.pl, what about reworking the code?
printf("%s\n", ..)cries for aputs().
There is no synth_puts
Quoted 4 lines
Quoted 4 lines
drivers/staging/speakup/main.c +0
-0@@ -1131,7 +1132,8 @@ static void spkup_write(const char *in_buf, int count)if (in_count >2 && rep_count >2 ) {if (last_type &CH_RPT ) {synth_printf (" " );
Quoted 8 lines
drivers/staging/speakup/main.c static void spkup_write(const char *in_buf, int count) · line 1137
Quoted 4 lines
drivers/staging/speakup/main.c +2
-1-synth_printf (spk_msg_get (MSG_REPEAT_DESC2 ), ++rep_count); +synth_printf (spk_msg_get (MSG_REPEAT_DESC2 ), + ++rep_count);synth_printf (" " );This printf stuff looks odd.
synth_printf()seems to take a format string, in this case the format string
is returned byspk_msg_get(), smells like a format string bug.
Nope, but it would be nicer to avoid these spk_msg_get functions for the indices that are used with printf style formatting.
Quoted 4 lines
Quoted 4 lines
drivers/staging/speakup/main.c +0
-0} rep_count =0 ;@@ -1847,7 +1849,8 @@ static void speakup_win_set(struct vc_data *vc) win_right = spk_x;
Quoted 8 lines
drivers/staging/speakup/main.c static void speakup_win_set(struct vc_data *vc) · line 1854
Quoted 6 lines
drivers/staging/speakup/main.c +2
-1}snprintf (info,sizeof (info),spk_msg_get (MSG_WINDOW_BOUNDARY ), - (win_start) ?spk_msg_get (MSG_END ) :spk_msg_get (MSG_START ), + (win_start) ? +spk_msg_get (MSG_END ) :spk_msg_get (MSG_START ), (int )spk_y +1 , (int )spk_x +1 );Same here. Also please resolve the ?: mess.
I don't think there's a ?: mess, but the code looks wrong.
win_start ? MSG_END : MSG_START
sure looks backwards.
Am 28.03.2015 um 22:18 schrieb Joe Perches:
Quoted 20 lines · Richard Weinberger
Quoted 2 lines · Shirish Gajera
Quoted 1 line
This patch fixes the checkpatch.pl warning:
[]
Quoted 1 line
drivers/staging/speakup/main.c
Quoted 1 line
drivers/staging/speakup/main.c +0
-0[]
Quoted 11 lines
drivers/staging/speakup/main.c static void announce_edge(struct vc_data *vc, int msg_id) · line 427
Quoted 7 lines
drivers/staging/speakup/main.c +2
-1@@ -423,7 +423,8 @@ static void announce_edge(struct vc_data *vc, int msg_id)if (spk_bleeps &1 )bleep (spk_y);if ((spk_bleeps &2 ) && (msg_id < edge_quiet)) -synth_printf ("%s\n" ,spk_msg_get (MSG_EDGE_MSGS_START + msg_id -1 )); +synth_printf ("%s\n" , +spk_msg_get (MSG_EDGE_MSGS_START + msg_id -1 ));Instead of blindly adding newlines to silence checkpatch.pl, what about reworking the code?
printf("%s\n", ..)cries for aputs().
Quoted 1 line
There is no
synth_puts
So what?
Fix it! :-)
Quoted 30 lines
Quoted 4 lines
Quoted 4 lines
drivers/staging/speakup/main.c +0
-0@@ -1131,7 +1132,8 @@ static void spkup_write(const char *in_buf, int count)if (in_count >2 && rep_count >2 ) {if (last_type &CH_RPT ) {synth_printf (" " );Quoted 8 lines
drivers/staging/speakup/main.c static void spkup_write(const char *in_buf, int count) · line 1137
Quoted 4 lines
drivers/staging/speakup/main.c +2
-1-synth_printf (spk_msg_get (MSG_REPEAT_DESC2 ), ++rep_count); +synth_printf (spk_msg_get (MSG_REPEAT_DESC2 ), + ++rep_count);synth_printf (" " );This printf stuff looks odd.
synth_printf()seems to take a format string, in this case the format string
is returned byspk_msg_get(), smells like a format string bug.Nope, but it would be nicer to avoid these
spk_msg_getfunctions for the indices that are used with printf style formatting.Quoted 4 lines
Quoted 4 lines
drivers/staging/speakup/main.c +0
-0} rep_count =0 ;@@ -1847,7 +1849,8 @@ static void speakup_win_set(struct vc_data *vc) win_right = spk_x;Quoted 8 lines
drivers/staging/speakup/main.c static void speakup_win_set(struct vc_data *vc) · line 1854
Quoted 6 lines
drivers/staging/speakup/main.c +2
-1}snprintf (info,sizeof (info),spk_msg_get (MSG_WINDOW_BOUNDARY ), - (win_start) ?spk_msg_get (MSG_END ) :spk_msg_get (MSG_START ), + (win_start) ? +spk_msg_get (MSG_END ) :spk_msg_get (MSG_START ), (int )spk_y +1 , (int )spk_x +1 );Same here. Also please resolve the ?: mess.
Quoted 3 lines
I don't think there's a ?: mess, but the code looks wrong.
win_start?MSG_END:MSG_START
Face it, the whole code is horrible and lines other 80 chars are the *least* problem.
Submitting a patch just for the sake of silencing checkpatch.pl is a waste of time. After applying this patch the driver 0 better than before.
Thanks,
//richard
Quoted 4 lines · Richard Weinberger
Am 28.03.2015 um 22:18 schrieb Joe Perches:
Quoted 3 lines · Richard Weinberger
Quoted 2 lines · Shirish Gajera
Quoted 1 line
This patch fixes the checkpatch.pl warning:
[]
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Instead of blindly adding newlines to silence checkpatch.pl, what about reworking the code?
printf("%s\n", ..)cries for aputs().There is no
synth_putsSo what?
Fix it! :-)
Not sure that'd make the code better... ;-p
Quoted 2 lines
the whole code is horrible and lines other 80 chars are the *least* problem.
Dunno about how horrible it is, my guess is it works.
Quoted 2 lines
Submitting a patch just for the sake of silencing checkpatch.pl is a waste of time. After applying this patch the driver 0 better than before.
Agree with that.
And truly, checkpatch is only a guide.
Making the code better instead of merely style conforming should be the primary goal of patches.
Quoted 25 lines · Joe Perches
Quoted 4 lines · Richard Weinberger
Am 28.03.2015 um 22:18 schrieb Joe Perches:
Quoted 3 lines · Richard Weinberger
Quoted 2 lines · Shirish Gajera
Quoted 1 line
This patch fixes the checkpatch.pl warning:
[]
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Instead of blindly adding newlines to silence checkpatch.pl, what about reworking the code?
printf("%s\n", ..)cries for aputs().There is no
synth_putsSo what?
Fix it! :-)Not sure that'd make the code better... ;-p
Quoted 2 lines
the whole code is horrible and lines other 80 chars are the *least* problem.
Dunno about how horrible it is, my guess is it works.
Quoted 2 lines
Submitting a patch just for the sake of silencing checkpatch.pl is a waste of time. After applying this patch the driver 0 better than before.
Quoted 6 lines
Agree with that.
And truly, checkpatch is only a guide.
Making the code better instead of merely style conforming should be the primary goal of patches.
This is my first patch.
Actually on the website it's return that
"Pick a warning, and try to fix it. For your first patch, only pick one warning. In the future you can group multiple changes into one patch, but only if you follow the PatchPhilosophy of breaking each patch into logical changes."
My main aim is to get the patch in and get familier with the full system (code checking,flow etc.). So, I am fixing simple warning.
If this code require changes then I can do as part of future changes.
Thanks,
Shirish
Am 29.03.2015 um 00:44 schrieb Shirish Gajera:
Quoted 26 lines · Joe Perches
Quoted 25 lines · Richard Weinberger
Quoted 4 lines
Am 28.03.2015 um 22:18 schrieb Joe Perches:
Quoted 3 lines · Richard Weinberger
Quoted 2 lines · Shirish Gajera
Quoted 1 line
This patch fixes the checkpatch.pl warning:
[]
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Instead of blindly adding newlines to silence checkpatch.pl, what about reworking the code?
printf("%s\n", ..)cries for aputs().There is no
synth_putsSo what?
Fix it! :-)Not sure that'd make the code better... ;-p
Quoted 2 lines
the whole code is horrible and lines other 80 chars are the *least* problem.
Dunno about how horrible it is, my guess is it works.
Quoted 2 lines
Submitting a patch just for the sake of silencing checkpatch.pl is a waste of time. After applying this patch the driver 0 better than before.
Quoted 8 lines
Quoted 6 lines
Agree with that.
And truly, checkpatch is only a guide.
Making the code better instead of merely style conforming should be the primary goal of patches.
This is my first patch.
Are you sure?
http://lists.kernelnewbies.org/pipermail/kernelnewbies/2015-January/013187.html
Quoted 10 lines
Actually on the website it's return that
"Pick a warning, and try to fix it. For your first patch, only pick one warning. In the future you can group multiple changes into one patch, but only if you follow the PatchPhilosophy of breaking each patch into logical changes."My main aim is to get the patch in and get familier with the full system (code checking,flow etc.). So, I am fixing simple warning.
If this code require changes then I can do as part of future changes.
The future is now, please address these issues now. :-) Again, blindly fixing checkpatch.pl warnings is worthless.
Thanks,
//richard
Quoted 31 lines · Richard Weinberger
Am 29.03.2015 um 00:44 schrieb Shirish Gajera:
Quoted 30 lines · Joe Perches
Quoted 29 lines · Richard Weinberger
Quoted 4 lines
Am 28.03.2015 um 22:18 schrieb Joe Perches:
Quoted 3 lines · Richard Weinberger
Quoted 2 lines · Shirish Gajera
Quoted 1 line
This patch fixes the checkpatch.pl warning:
[]
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Instead of blindly adding newlines to silence checkpatch.pl, what about reworking the code?
printf("%s\n", ..)cries for aputs().There is no
synth_putsSo what?
Fix it! :-)Not sure that'd make the code better... ;-p
Quoted 2 lines
the whole code is horrible and lines other 80 chars are the *least* problem.
Dunno about how horrible it is, my guess is it works.
Quoted 2 lines
Submitting a patch just for the sake of silencing checkpatch.pl is a waste of time. After applying this patch the driver 0 better than before.
Agree with that.
And truly, checkpatch is only a guide.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Making the code better instead of merely style conforming should be the primary goal of patches.
This is my first patch.
Are you sure?
http://lists.kernelnewbies.org/pipermail/kernelnewbies/2015-January/013187.html
Yup, this patch never got merge because I was doing changes against wrong repo.
Quoted 10 lines
Quoted 10 lines
Actually on the website it's return that
"Pick a warning, and try to fix it. For your first patch, only pick one warning. In the future you can group multiple changes into one patch, but only if you follow the PatchPhilosophy of breaking each patch into logical changes."My main aim is to get the patch in and get familier with the full system (code checking,flow etc.). So, I am fixing simple warning.
Quoted 7 lines
Quoted 1 line
If this code require changes then I can do as part of future changes.
The future is now, please address these issues now. :-) Again, blindly fixing checkpatch.pl warnings is worthless.
Thanks,
//richard
Are you sure you want me to do this changes. Because it will conflict the things written on http://kernelnewbies.org/
Thanks,
Shirish
Am 29.03.2015 um 01:26 schrieb Shirish Gajera:
Quoted 2 lines
Are you sure you want me to do this changes. Because it will conflict the things written on http://kernelnewbies.org/
Conflict with what?
Thanks,
//richard
Quoted 5 lines · Shirish Gajera
Quoted 1 line · Richard Weinberger
//richard
Are you sure you want me to do this changes. Because it will conflict the things written on http://kernelnewbies.org/
where is the conflict? you already know how to create patches, how to send them. so make changes where you feel you can make the code better, and send it. if your suggested improvement is ok, then it will be accepted, else you will be told what is wrong in that. make it a point to learn from those mistakes and you will be fine.
regards
sudip
Quoted 8 lines
Thanks,
Shirish
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 7 lines · Richard Weinberger
Quoted 7 lines
drivers/staging/speakup/main.c +0
-0@@ -423,7 +423,8 @@ static void announce_edge(struct vc_data *vc, int msg_id)if (spk_bleeps &1 )bleep (spk_y);
Quoted 8 lines
drivers/staging/speakup/main.c static void announce_edge(struct vc_data *vc, int msg_id) · line 427
Quoted 4 lines
drivers/staging/speakup/main.c +2
-1if ((spk_bleeps &2 ) && (msg_id < edge_quiet)) -synth_printf ("%s\n" ,spk_msg_get (MSG_EDGE_MSGS_START + msg_id -1 )); +synth_printf ("%s\n" , +spk_msg_get (MSG_EDGE_MSGS_START + msg_id -1 ));Instead of blindly adding newlines to silence checkpatch.pl, what about reworking the code?
printf("%s\n", ..)cries for aputs().
printf is fine. Not everything has to be a massive engineering project which supports every method in the world.
Quoted 16 lines
drivers/staging/speakup/main.c static void spkup_write(const char *in_buf, int count) · line 1137
Quoted 12 lines
drivers/staging/speakup/main.c +2
-1}static void speak_char (u_char ch)@@ -1131,7 +1132,8 @@ static void spkup_write(const char *in_buf, int count)if (in_count >2 && rep_count >2 ) {if (last_type &CH_RPT ) {synth_printf (" " ); -synth_printf (spk_msg_get (MSG_REPEAT_DESC2 ), ++rep_count); +synth_printf (spk_msg_get (MSG_REPEAT_DESC2 ), + ++rep_count);synth_printf (" " );This printf stuff looks odd.
synth_printf()seems to take a format string, in this case the format string
is returned byspk_msg_get(), smells like a format string bug.
It's not a bug, but it's definitely odd. I think the reason they did it that way is so they can translate the output to other languages.
Anyway, this patch is basically fine.
regards,
dan carpenter