All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/msm/dp: Add a missing semi-colon
@ 2021-02-07  4:18 ` Stephen Boyd
  0 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2021-02-07  4:18 UTC (permalink / raw)
  To: Rob Clark
  Cc: linux-kernel, Sean Paul, Kuogee Hsieh, linux-arm-msm, dri-devel,
	freedreno, Lee Jones

A missing semicolon here causes my external display to stop working.
Indeed, missing the semicolon on the return statement leads to
dp_panel_update_tu_timings() not existing because the compiler thinks
it's part of the return statement of a void function, so it must not be
important.

  $ ./scripts/bloat-o-meter before.o after.o
  add/remove: 1/1 grow/shrink: 0/1 up/down: 7400/-7540 (-140)
  Function                                     old     new   delta
  dp_panel_update_tu_timings                     -    7400   +7400
  _dp_ctrl_calc_tu.constprop                 18024   17900    -124
  dp_panel_update_tu_timings.constprop        7416       -   -7416
  Total: Before=54440, After=54300, chg -0.26%

Add a semicolon so this function works like it used to.

Cc: Sean Paul <sean@poorly.run>
Cc: Kuogee Hsieh <khsieh@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org
Cc: Lee Jones <lee.jones@linaro.org>
Fixes: cc9014bf63a4 ("drm/msm/dp/dp_ctrl: Move 'tu' from the stack to the heap")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
 drivers/gpu/drm/msm/dp/dp_ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
index 55b7d0edffbf..95913db97616 100644
--- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
+++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
@@ -631,7 +631,7 @@ static void _dp_ctrl_calc_tu(struct dp_tu_calc_input *in,
 
 	tu = kzalloc(sizeof(*tu), GFP_KERNEL);
 	if (!tu)
-		return
+		return;
 
 	dp_panel_update_tu_timings(in, tu);
 

base-commit: ce5226625a694fa5a46db241ac4c77a1430e37fe
-- 
https://chromeos.dev


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

* [PATCH] drm/msm/dp: Add a missing semi-colon
@ 2021-02-07  4:18 ` Stephen Boyd
  0 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2021-02-07  4:18 UTC (permalink / raw)
  To: Rob Clark
  Cc: Sean Paul, linux-arm-msm, linux-kernel, dri-devel, Kuogee Hsieh,
	Lee Jones, freedreno

A missing semicolon here causes my external display to stop working.
Indeed, missing the semicolon on the return statement leads to
dp_panel_update_tu_timings() not existing because the compiler thinks
it's part of the return statement of a void function, so it must not be
important.

  $ ./scripts/bloat-o-meter before.o after.o
  add/remove: 1/1 grow/shrink: 0/1 up/down: 7400/-7540 (-140)
  Function                                     old     new   delta
  dp_panel_update_tu_timings                     -    7400   +7400
  _dp_ctrl_calc_tu.constprop                 18024   17900    -124
  dp_panel_update_tu_timings.constprop        7416       -   -7416
  Total: Before=54440, After=54300, chg -0.26%

Add a semicolon so this function works like it used to.

Cc: Sean Paul <sean@poorly.run>
Cc: Kuogee Hsieh <khsieh@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org
Cc: Lee Jones <lee.jones@linaro.org>
Fixes: cc9014bf63a4 ("drm/msm/dp/dp_ctrl: Move 'tu' from the stack to the heap")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
 drivers/gpu/drm/msm/dp/dp_ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
index 55b7d0edffbf..95913db97616 100644
--- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
+++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
@@ -631,7 +631,7 @@ static void _dp_ctrl_calc_tu(struct dp_tu_calc_input *in,
 
 	tu = kzalloc(sizeof(*tu), GFP_KERNEL);
 	if (!tu)
-		return
+		return;
 
 	dp_panel_update_tu_timings(in, tu);
 

base-commit: ce5226625a694fa5a46db241ac4c77a1430e37fe
-- 
https://chromeos.dev

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/msm/dp: Add a missing semi-colon
  2021-02-07  4:18 ` Stephen Boyd
@ 2021-02-07  5:06   ` Joe Perches
  -1 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2021-02-07  5:06 UTC (permalink / raw)
  To: Stephen Boyd, Rob Clark, Andrew Morton
  Cc: linux-kernel, Sean Paul, Kuogee Hsieh, linux-arm-msm, dri-devel,
	freedreno, Lee Jones

On Sat, 2021-02-06 at 20:18 -0800, Stephen Boyd wrote:
> A missing semicolon here causes my external display to stop working.
> Indeed, missing the semicolon on the return statement leads to
> dp_panel_update_tu_timings() not existing because the compiler thinks
> it's part of the return statement of a void function, so it must not be
> important.
> 
>   $ ./scripts/bloat-o-meter before.o after.o
>   add/remove: 1/1 grow/shrink: 0/1 up/down: 7400/-7540 (-140)
>   Function                                     old     new   delta
>   dp_panel_update_tu_timings                     -    7400   +7400
>   _dp_ctrl_calc_tu.constprop                 18024   17900    -124
>   dp_panel_update_tu_timings.constprop        7416       -   -7416
>   Total: Before=54440, After=54300, chg -0.26%
> 
> Add a semicolon so this function works like it used to.
[]
> diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
[]
> @@ -631,7 +631,7 @@ static void _dp_ctrl_calc_tu(struct dp_tu_calc_input *in,
>  
> 
>  	tu = kzalloc(sizeof(*tu), GFP_KERNEL);
>  	if (!tu)
> -		return
> +		return;
>  
> 
>  	dp_panel_update_tu_timings(in, tu);

Wow, that's really unfortunate that dp_panel_update_tu_timings
is also void.

Perhaps this as YA checkpatch warning:

---
 scripts/checkpatch.pl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9a549b009d2f..6df13e5a1557 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3674,6 +3674,12 @@ sub process {
 			}
 		}
 
+# check only a c90 keyword on the line (except else)
+		if ($sline =~ /^\+\s*($c90_Keywords)\s*$/ && $1 ne 'else') {
+			WARN("BARE_KEYWORD",
+				 "'$1' as the only word on a line is not good style\n" . $herecurr);
+		}
+
 # check multi-line statement indentation matches previous line
 		if ($perl_version_ok &&
 		    $prevline =~ /^\+([ \t]*)((?:$c90_Keywords(?:\s+if)\s*)|(?:$Declare\s*)?(?:$Ident|\(\s*\*\s*$Ident\s*\))\s*|(?:\*\s*)*$Lval\s*=\s*$Ident\s*)\(.*(\&\&|\|\||,)\s*$/) {



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

* Re: [PATCH] drm/msm/dp: Add a missing semi-colon
@ 2021-02-07  5:06   ` Joe Perches
  0 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2021-02-07  5:06 UTC (permalink / raw)
  To: Stephen Boyd, Rob Clark, Andrew Morton
  Cc: Sean Paul, linux-arm-msm, linux-kernel, dri-devel, Kuogee Hsieh,
	Lee Jones, freedreno

On Sat, 2021-02-06 at 20:18 -0800, Stephen Boyd wrote:
> A missing semicolon here causes my external display to stop working.
> Indeed, missing the semicolon on the return statement leads to
> dp_panel_update_tu_timings() not existing because the compiler thinks
> it's part of the return statement of a void function, so it must not be
> important.
> 
>   $ ./scripts/bloat-o-meter before.o after.o
>   add/remove: 1/1 grow/shrink: 0/1 up/down: 7400/-7540 (-140)
>   Function                                     old     new   delta
>   dp_panel_update_tu_timings                     -    7400   +7400
>   _dp_ctrl_calc_tu.constprop                 18024   17900    -124
>   dp_panel_update_tu_timings.constprop        7416       -   -7416
>   Total: Before=54440, After=54300, chg -0.26%
> 
> Add a semicolon so this function works like it used to.
[]
> diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
[]
> @@ -631,7 +631,7 @@ static void _dp_ctrl_calc_tu(struct dp_tu_calc_input *in,
>  
> 
>  	tu = kzalloc(sizeof(*tu), GFP_KERNEL);
>  	if (!tu)
> -		return
> +		return;
>  
> 
>  	dp_panel_update_tu_timings(in, tu);

Wow, that's really unfortunate that dp_panel_update_tu_timings
is also void.

Perhaps this as YA checkpatch warning:

---
 scripts/checkpatch.pl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9a549b009d2f..6df13e5a1557 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3674,6 +3674,12 @@ sub process {
 			}
 		}
 
+# check only a c90 keyword on the line (except else)
+		if ($sline =~ /^\+\s*($c90_Keywords)\s*$/ && $1 ne 'else') {
+			WARN("BARE_KEYWORD",
+				 "'$1' as the only word on a line is not good style\n" . $herecurr);
+		}
+
 # check multi-line statement indentation matches previous line
 		if ($perl_version_ok &&
 		    $prevline =~ /^\+([ \t]*)((?:$c90_Keywords(?:\s+if)\s*)|(?:$Declare\s*)?(?:$Ident|\(\s*\*\s*$Ident\s*\))\s*|(?:\*\s*)*$Lval\s*=\s*$Ident\s*)\(.*(\&\&|\|\||,)\s*$/) {


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/msm/dp: Add a missing semi-colon
  2021-02-07  5:06   ` Joe Perches
@ 2021-02-08 18:57     ` Stephen Boyd
  -1 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2021-02-08 18:57 UTC (permalink / raw)
  To: Andrew Morton, Joe Perches, Rob Clark
  Cc: linux-kernel, Sean Paul, Kuogee Hsieh, linux-arm-msm, dri-devel,
	freedreno, Lee Jones

Quoting Joe Perches (2021-02-06 21:06:54)
> On Sat, 2021-02-06 at 20:18 -0800, Stephen Boyd wrote:
> > A missing semicolon here causes my external display to stop working.
> > Indeed, missing the semicolon on the return statement leads to
> > dp_panel_update_tu_timings() not existing because the compiler thinks
> > it's part of the return statement of a void function, so it must not be
> > important.
> > 
> >   $ ./scripts/bloat-o-meter before.o after.o
> >   add/remove: 1/1 grow/shrink: 0/1 up/down: 7400/-7540 (-140)
> >   Function                                     old     new   delta
> >   dp_panel_update_tu_timings                     -    7400   +7400
> >   _dp_ctrl_calc_tu.constprop                 18024   17900    -124
> >   dp_panel_update_tu_timings.constprop        7416       -   -7416
> >   Total: Before=54440, After=54300, chg -0.26%
> > 
> > Add a semicolon so this function works like it used to.
> []
> > diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
> []
> > @@ -631,7 +631,7 @@ static void _dp_ctrl_calc_tu(struct dp_tu_calc_input *in,
> >  
> > 
> >       tu = kzalloc(sizeof(*tu), GFP_KERNEL);
> >       if (!tu)
> > -             return
> > +             return;
> >  
> > 
> >       dp_panel_update_tu_timings(in, tu);
> 
> Wow, that's really unfortunate that dp_panel_update_tu_timings
> is also void.
> 
> Perhaps this as YA checkpatch warning:
> 
> ---

Acked-by: Stephen Boyd <swboyd@chromium.org>

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

* Re: [PATCH] drm/msm/dp: Add a missing semi-colon
@ 2021-02-08 18:57     ` Stephen Boyd
  0 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2021-02-08 18:57 UTC (permalink / raw)
  To: Andrew Morton, Joe Perches, Rob Clark
  Cc: Sean Paul, linux-arm-msm, linux-kernel, dri-devel, Kuogee Hsieh,
	Lee Jones, freedreno

Quoting Joe Perches (2021-02-06 21:06:54)
> On Sat, 2021-02-06 at 20:18 -0800, Stephen Boyd wrote:
> > A missing semicolon here causes my external display to stop working.
> > Indeed, missing the semicolon on the return statement leads to
> > dp_panel_update_tu_timings() not existing because the compiler thinks
> > it's part of the return statement of a void function, so it must not be
> > important.
> > 
> >   $ ./scripts/bloat-o-meter before.o after.o
> >   add/remove: 1/1 grow/shrink: 0/1 up/down: 7400/-7540 (-140)
> >   Function                                     old     new   delta
> >   dp_panel_update_tu_timings                     -    7400   +7400
> >   _dp_ctrl_calc_tu.constprop                 18024   17900    -124
> >   dp_panel_update_tu_timings.constprop        7416       -   -7416
> >   Total: Before=54440, After=54300, chg -0.26%
> > 
> > Add a semicolon so this function works like it used to.
> []
> > diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
> []
> > @@ -631,7 +631,7 @@ static void _dp_ctrl_calc_tu(struct dp_tu_calc_input *in,
> >  
> > 
> >       tu = kzalloc(sizeof(*tu), GFP_KERNEL);
> >       if (!tu)
> > -             return
> > +             return;
> >  
> > 
> >       dp_panel_update_tu_timings(in, tu);
> 
> Wow, that's really unfortunate that dp_panel_update_tu_timings
> is also void.
> 
> Perhaps this as YA checkpatch warning:
> 
> ---

Acked-by: Stephen Boyd <swboyd@chromium.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/msm/dp: Add a missing semi-colon
  2021-02-08 18:57     ` Stephen Boyd
@ 2021-02-12  9:43       ` Joe Perches
  -1 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2021-02-12  9:43 UTC (permalink / raw)
  To: Stephen Boyd, Andrew Morton, Rob Clark
  Cc: linux-kernel, Sean Paul, Kuogee Hsieh, linux-arm-msm, dri-devel,
	freedreno, Lee Jones

On Mon, 2021-02-08 at 10:57 -0800, Stephen Boyd wrote:
> Quoting Joe Perches (2021-02-06 21:06:54)
> > Wow, that's really unfortunate that dp_panel_update_tu_timings
> > is also void.
> > 
> > Perhaps this as YA checkpatch warning:
> > 
> > ---
> 
> Acked-by: Stephen Boyd <swboyd@chromium.org>

Are you acking the proposed checkpatch patch?


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

* Re: [PATCH] drm/msm/dp: Add a missing semi-colon
@ 2021-02-12  9:43       ` Joe Perches
  0 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2021-02-12  9:43 UTC (permalink / raw)
  To: Stephen Boyd, Andrew Morton, Rob Clark
  Cc: Sean Paul, linux-arm-msm, linux-kernel, dri-devel, Kuogee Hsieh,
	Lee Jones, freedreno

On Mon, 2021-02-08 at 10:57 -0800, Stephen Boyd wrote:
> Quoting Joe Perches (2021-02-06 21:06:54)
> > Wow, that's really unfortunate that dp_panel_update_tu_timings
> > is also void.
> > 
> > Perhaps this as YA checkpatch warning:
> > 
> > ---
> 
> Acked-by: Stephen Boyd <swboyd@chromium.org>

Are you acking the proposed checkpatch patch?

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/msm/dp: Add a missing semi-colon
  2021-02-07  4:18 ` Stephen Boyd
  (?)
  (?)
@ 2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
  -1 siblings, 0 replies; 9+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-03-01 19:59 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: linux-arm-msm

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

On Sat,  6 Feb 2021 20:18:58 -0800 you wrote:
> A missing semicolon here causes my external display to stop working.
> Indeed, missing the semicolon on the return statement leads to
> dp_panel_update_tu_timings() not existing because the compiler thinks
> it's part of the return statement of a void function, so it must not be
> important.
> 
>   $ ./scripts/bloat-o-meter before.o after.o
>   add/remove: 1/1 grow/shrink: 0/1 up/down: 7400/-7540 (-140)
>   Function                                     old     new   delta
>   dp_panel_update_tu_timings                     -    7400   +7400
>   _dp_ctrl_calc_tu.constprop                 18024   17900    -124
>   dp_panel_update_tu_timings.constprop        7416       -   -7416
>   Total: Before=54440, After=54300, chg -0.26%
> 
> [...]

Here is the summary with links:
  - drm/msm/dp: Add a missing semi-colon
    https://git.kernel.org/qcom/c/182b4a2d2513

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-03-01 20:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-07  4:18 [PATCH] drm/msm/dp: Add a missing semi-colon Stephen Boyd
2021-02-07  4:18 ` Stephen Boyd
2021-02-07  5:06 ` Joe Perches
2021-02-07  5:06   ` Joe Perches
2021-02-08 18:57   ` Stephen Boyd
2021-02-08 18:57     ` Stephen Boyd
2021-02-12  9:43     ` Joe Perches
2021-02-12  9:43       ` Joe Perches
2021-03-01 19:59 ` patchwork-bot+linux-arm-msm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.