Skip to contentSkip to conversation

drm/msm/dsi: Move static keyword to the front of declarations

PATCH In review Krzysztof Wilczynski 2 participants 2 messages Sep 4, 2019 – Sep 5, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/msm/dsi: Move static keyword to the front of declarations

Move the static keyword to the front of declarations of msm_dsi_v2_host_ops, msm_dsi_6g_host_ops and msm_dsi_6g_v2_host_ops, and resolve the following compiler warnings that can be seen when building with warnings enabled (W=1):

drivers/gpu/drm/msm/dsi/dsi_cfg.c:150:1: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

drivers/gpu/drm/msm/dsi/dsi_cfg.c:161:1: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

drivers/gpu/drm/msm/dsi/dsi_cfg.c:172:1: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

---
Related: https://lore.kernel.org/r/[email protected]

 drivers/gpu/drm/msm/dsi/dsi_cfg.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/msm/dsi/dsi_cfg.c +3 -3
index b7b7c1a9164a..e74dc8cc904b 100644
@@ -147,7 +147,7 @@ static const struct msm_dsi_config sdm845_dsi_cfg = {
 	.num_dsi = 2,
 };
 
-const static struct msm_dsi_host_cfg_ops msm_dsi_v2_host_ops = {
+static const struct msm_dsi_host_cfg_ops msm_dsi_v2_host_ops = {
 	.link_clk_enable = dsi_link_clk_enable_v2,
 	.link_clk_disable = dsi_link_clk_disable_v2,
 	.clk_init_ver = dsi_clk_init_v2,
@@ -158,7 +158,7 @@ const static struct msm_dsi_host_cfg_ops msm_dsi_v2_host_ops = {
 	.calc_clk_rate = dsi_calc_clk_rate_v2,
 };
 
-const static struct msm_dsi_host_cfg_ops msm_dsi_6g_host_ops = {
+static const struct msm_dsi_host_cfg_ops msm_dsi_6g_host_ops = {
 	.link_clk_enable = dsi_link_clk_enable_6g,
 	.link_clk_disable = dsi_link_clk_disable_6g,
 	.clk_init_ver = NULL,
@@ -169,7 +169,7 @@ const static struct msm_dsi_host_cfg_ops msm_dsi_6g_host_ops = {
 	.calc_clk_rate = dsi_calc_clk_rate_6g,
 };
 
-const static struct msm_dsi_host_cfg_ops msm_dsi_6g_v2_host_ops = {
+static const struct msm_dsi_host_cfg_ops msm_dsi_6g_v2_host_ops = {
 	.link_clk_enable = dsi_link_clk_enable_6g,
 	.link_clk_disable = dsi_link_clk_disable_6g,
 	.clk_init_ver = dsi_clk_init_6g_v2,
Signature · 1 line
2.22.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Krzysztof Wilczynski

Move the static keyword to the front of declarations of msm_dsi_v2_host_ops, msm_dsi_6g_host_ops and msm_dsi_6g_v2_host_ops, and resolve the following compiler warnings that can be seen when building with warnings enabled (W=1):

drivers/gpu/drm/msm/dsi/dsi_cfg.c:150:1: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

Quoted 7 lines

drivers/gpu/drm/msm/dsi/dsi_cfg.c:161:1: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

drivers/gpu/drm/msm/dsi/dsi_cfg.c:172:1: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

Seems fine to me.