staging: speakup: fixed checkpatch and sparse warnings in selection.c
PATCH RESEND 1/1 staging: speakup: fixed checkpatch and sparse warnings in selection.c
Left in_atomic() call as more work is needed (see TODO note at top of function).
Signed-off-by Chris Yungmann <[email protected]>
--- drivers/staging/speakup/selection.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/speakup/selection.c +3 -3
@@ -68,7 +68,7 @@ int speakup_set_selection(struct tty_struct *tty)if (spk_sel_cons != vc_cons[fg_console].d) {speakup_clear_selection (); spk_sel_cons = vc_cons[fg_console].d; -printk (KERN_WARNING +pr_warn (KERN_WARNING "Selection: mark console not the same as cut\n" );return -EINVAL ; }
@@ -95,7 +95,7 @@ int speakup_set_selection(struct tty_struct *tty)/* Allocate a new buffer before freeing the old one ... */ bp =kmalloc ((sel_end-sel_start)/2 +1 ,GFP_ATOMIC );if (!bp) { -printk (KERN_WARNING "selection: kmalloc() failed\n" ); +pr_warn (KERN_WARNING "selection: kmalloc() failed\n" );speakup_clear_selection ();return -ENOMEM ; }
@@ -141,7 +141,7 @@ int speakup_paste_selection(struct tty_struct *tty) count = sel_buffer_lth - pasted; count =min_t (int, count, tty->receive_room); tty->ldisc->ops->receive_buf (tty, sel_buffer + pasted, -0 , count); +NULL , count); pasted += count; }remove_wait_queue (&vc->paste_wait, &wait);
Signature · 1 line
1.7.10
Greg KH
maintainerQuoted 12 lines · Chris Yungmann
Left
in_atomic()call as more work is needed (see TODO note at top of function).Signed-off-by Chris Yungmann <[email protected]>--- drivers/staging/speakup/selection.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/speakup/selection.c +0
-0
drivers/staging/speakup/selection.c int speakup_set_selection(struct tty_struct *tty) · line 71
Quoted 5 lines
drivers/staging/speakup/selection.c +1
-1@@ -68,7 +68,7 @@ int speakup_set_selection(struct tty_struct *tty)if (spk_sel_cons != vc_cons[fg_console].d) {speakup_clear_selection (); spk_sel_cons = vc_cons[fg_console].d; - printk(KERN_WARNING + pr_warn(KERN_WARNING
Nope, that will not work, sorry.
Actually, please use dev_warn() and friends instead of "raw" printk() calls is the better thing to do.
thanks,
greg k-h