public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: Panel: panel: Fixed checkpatch line length warnings
@ 2013-05-04 15:21 Jake Champlin
  2013-05-04 16:52 ` Willy Tarreau
  2013-05-05 13:06 ` Dan Carpenter
  0 siblings, 2 replies; 3+ messages in thread
From: Jake Champlin @ 2013-05-04 15:21 UTC (permalink / raw)
  To: willy, gregkh, yamanetoshi, adam.buchbinder, peterhuewe,
	fengguang.wu
  Cc: devel, linux-kernel

Fixed 4 cases of line length issues with checkpatch. Checkpatch is now clean
for panel.c.

Signed-off-by: 'Jake Champlin <jake.champlin.27@gmail.com>'
---
 drivers/staging/panel/panel.c | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index c54df39..cbc15c1 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -1756,17 +1756,18 @@ static inline int input_state_high(struct logical_input *input)
 
 			if (input->high_timer == 0) {
 				char *press_str = input->u.kbd.press_str;
-				if (press_str[0])
-					keypad_send_key(press_str,
-							sizeof(input->u.kbd.press_str));
+				if (press_str[0]) {
+					int s = sizeof(input->u.kbd.press_str);
+					keypad_send_key(press_str, s);
+				}
 			}
 
 			if (input->u.kbd.repeat_str[0]) {
 				char *repeat_str = input->u.kbd.repeat_str;
 				if (input->high_timer >= KEYPAD_REP_START) {
+					int s = sizeof(input->u.kbd.repeat_str);
 					input->high_timer -= KEYPAD_REP_DELAY;
-					keypad_send_key(repeat_str,
-							sizeof(input->u.kbd.repeat_str));
+					keypad_send_key(repeat_str, s);
 				}
 				/* we will need to come back here soon */
 				inputs_stable = 0;
@@ -1802,10 +1803,11 @@ static inline void input_state_falling(struct logical_input *input)
 
 			if (input->u.kbd.repeat_str[0]) {
 				char *repeat_str = input->u.kbd.repeat_str;
-				if (input->high_timer >= KEYPAD_REP_START)
+				if (input->high_timer >= KEYPAD_REP_START) {
+					int s = sizeof(input->u.kbd.repeat_str);
 					input->high_timer -= KEYPAD_REP_DELAY;
-					keypad_send_key(repeat_str,
-							sizeof(input->u.kbd.repeat_str));
+					keypad_send_key(repeat_str, s);
+				}
 				/* we will need to come back here soon */
 				inputs_stable = 0;
 			}
@@ -1822,9 +1824,10 @@ static inline void input_state_falling(struct logical_input *input)
 				release_fct(input->u.std.release_data);
 		} else if (input->type == INPUT_TYPE_KBD) {
 			char *release_str = input->u.kbd.release_str;
-			if (release_str[0])
-				keypad_send_key(release_str,
-						sizeof(input->u.kbd.release_str));
+			if (release_str[0]) {
+				int s = sizeof(input->u.kbd.release_str);
+				keypad_send_key(release_str, s);
+			}
 		}
 
 		input->state = INPUT_ST_LOW;
-- 
1.8.2.1


-- 
Jake Champlin
jake.champlin.27@gmail.com
<MuttClient>

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Staging: Panel: panel: Fixed checkpatch line length warnings
  2013-05-04 15:21 [PATCH] Staging: Panel: panel: Fixed checkpatch line length warnings Jake Champlin
@ 2013-05-04 16:52 ` Willy Tarreau
  2013-05-05 13:06 ` Dan Carpenter
  1 sibling, 0 replies; 3+ messages in thread
From: Willy Tarreau @ 2013-05-04 16:52 UTC (permalink / raw)
  To: Jake Champlin
  Cc: willy, gregkh, yamanetoshi, adam.buchbinder, peterhuewe,
	fengguang.wu, devel, linux-kernel

On Sat, May 04, 2013 at 11:21:17AM -0400, Jake Champlin wrote:
> Fixed 4 cases of line length issues with checkpatch. Checkpatch is now clean
> for panel.c.

OK that's clean, thanks!

> Signed-off-by: 'Jake Champlin <jake.champlin.27@gmail.com>'

Acked-by: Willy Tarreau <w@1wt.eu>

Willy


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Staging: Panel: panel: Fixed checkpatch line length warnings
  2013-05-04 15:21 [PATCH] Staging: Panel: panel: Fixed checkpatch line length warnings Jake Champlin
  2013-05-04 16:52 ` Willy Tarreau
@ 2013-05-05 13:06 ` Dan Carpenter
  1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2013-05-05 13:06 UTC (permalink / raw)
  To: Jake Champlin
  Cc: willy, gregkh, yamanetoshi, adam.buchbinder, peterhuewe,
	fengguang.wu, devel, linux-kernel

On Sat, May 04, 2013 at 11:21:17AM -0400, Jake Champlin wrote:
> @@ -1802,10 +1803,11 @@ static inline void input_state_falling(struct logical_input *input)
>  
>  			if (input->u.kbd.repeat_str[0]) {
>  				char *repeat_str = input->u.kbd.repeat_str;
> -				if (input->high_timer >= KEYPAD_REP_START)
> +				if (input->high_timer >= KEYPAD_REP_START) {
> +					int s = sizeof(input->u.kbd.repeat_str);
>  					input->high_timer -= KEYPAD_REP_DELAY;
> -					keypad_send_key(repeat_str,
> -							sizeof(input->u.kbd.repeat_str));
> +					keypad_send_key(repeat_str, s);
> +				}


This looks like a bugfix.  Good job.  Please mention bug fixes in
the changelog next time.

regards,
dan carpenter



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-05 13:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-04 15:21 [PATCH] Staging: Panel: panel: Fixed checkpatch line length warnings Jake Champlin
2013-05-04 16:52 ` Willy Tarreau
2013-05-05 13:06 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox