drm: misc: few simple cleanups
Subsystems (9)
cover drm: misc: few simple cleanups
No dependencies, trivial patches.
Best regards,
Krzysztof
---
Krzysztof Kozlowski (5):
drm/meson: drop unused staitc dw_hdmi_dwc_write_bits drm/meson: constify regmap_config drm/fsl-dcu: constify regmap_config drm/mediatek: dp: constify regmap_config drm/bridge: ti-dlpc3433: constify regmap_config
drivers/gpu/drm/bridge/ti-dlpc3433.c | 2 +- drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 2 +- drivers/gpu/drm/mediatek/mtk_dp.c | 2 +- drivers/gpu/drm/meson/meson_drv.c | 2 +- drivers/gpu/drm/meson/meson_dw_hdmi.c | 14 -------------- 5 files changed, 4 insertions(+), 18 deletions(-)
---
base-commit: ad40aff1edffeccc412cde93894196dca7bc739e
change-id: 20240908-regmap-config-const-2b6e126feb8b
Best regards,
Signature · 1 line
Krzysztof Kozlowski <[email protected]>
PATCH 1/5 drm/meson: drop unused staitc dw_hdmi_dwc_write_bits
static inline dw_hdmi_dwc_write_bits() function is not used at all:
drivers/gpu/drm/meson/meson_dw_hdmi.c:276:20: error: unused function 'dw_hdmi_dwc_write_bits' [-Werror,-Wunused-function]
--- drivers/gpu/drm/meson/meson_dw_hdmi.c | 14 -------------- 1 file changed, 14 deletions(-)
drivers/gpu/drm/meson/meson_dw_hdmi.c +0 -14
@@ -272,20 +272,6 @@ static inline void dw_hdmi_g12a_dwc_write(struct meson_dw_hdmi *dw_hdmi,writeb (data, dw_hdmi->hdmitx + addr); } -/* Helper to change specific bits in controller registers */ -static inline void dw_hdmi_dwc_write_bits (struct meson_dw_hdmi *dw_hdmi, -unsigned int addr, -unsigned int mask, -unsigned int val) -{ -unsigned int data = dw_hdmi->data->dwc_read (dw_hdmi, addr); - - data &= ~mask; - data |= val; - - dw_hdmi->data->dwc_write (dw_hdmi, addr, data); -} -/* Bridge */ /* Setup PHY bandwidth modes */
Signature · 1 line
2.43.0
Re: [PATCH 1/5] drm/meson: drop unused staitc dw_hdmi_dwc_write_bits
Quoted 25 lines · Krzysztof Kozlowski
static inline
dw_hdmi_dwc_write_bits()function is not used at all:
drivers/gpu/drm/meson/meson_dw_hdmi.c:276:20: error: unused function 'dw_hdmi_dwc_write_bits' [-Werror,-Wunused-function]Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/gpu/drm/meson/meson_dw_hdmi.c | 14 -------------- 1 file changed, 14 deletions(-)drivers/gpu/drm/meson/meson_dw_hdmi.c +0
-7@@ -272,20 +272,6 @@ static inline void dw_hdmi_g12a_dwc_write(struct meson_dw_hdmi *dw_hdmi,writeb (data, dw_hdmi->hdmitx + addr); } -/* Helper to change specific bits in controller registers */ -static inline void dw_hdmi_dwc_write_bits (struct meson_dw_hdmi *dw_hdmi, -unsigned int addr, -unsigned int mask, -unsigned int val) -{ -unsigned int data = dw_hdmi->data->dwc_read (dw_hdmi, addr);
drivers/gpu/drm/meson/meson_dw_hdmi.c static inline void dw_hdmi_g12a_dwc_write(struct meson_dw_hdmi *dw_hdmi, · line 277
Quoted 10 lines
drivers/gpu/drm/meson/meson_dw_hdmi.c +0
-7- - data &= ~mask; - data |= val; - - dw_hdmi->data->dwc_write (dw_hdmi, addr, data); -} -/* Bridge */ /* Setup PHY bandwidth modes */
Re: [PATCH 1/5] drm/meson: drop unused staitc dw_hdmi_dwc_write_bits
In reply to Krzysztof KozlowskiQuoted 6 lines · Krzysztof Kozlowski
static inline
dw_hdmi_dwc_write_bits()function is not used at all:
drivers/gpu/drm/meson/meson_dw_hdmi.c:276:20: error: unused function 'dw_hdmi_dwc_write_bits' [-Werror,-Wunused-function]Signed-off-by Krzysztof Kozlowski <[email protected]>
maybe s/staitc/static/ can be applied to $SUBJECT when applying this patch
Best regards,
Martin
PATCH 2/5 drm/meson: constify regmap_config
In reply to Krzysztof KozlowskiMark local static 'struct regmap_config' as const for safer and more obvious code.
--- drivers/gpu/drm/meson/meson_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/meson/meson_drv.c +1 -1
@@ -126,7 +126,7 @@ static bool meson_vpu_has_available_connectors(struct device *dev)return false; } -static struct regmap_config meson_regmap_config = { +static const struct regmap_config meson_regmap_config = { .reg_bits =32 , .val_bits =32 , .reg_stride =4 ,
Signature · 1 line
2.43.0
Re: [PATCH 2/5] drm/meson: constify regmap_config
Quoted 14 lines · Krzysztof Kozlowski
Mark local static 'struct
regmap_config' as const for safer and more obvious code.Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/gpu/drm/meson/meson_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/meson/meson_drv.c +0
-0
drivers/gpu/drm/meson/meson_drv.c static bool meson_vpu_has_available_connectors(struct device *dev) · line 132
Quoted 8 lines
drivers/gpu/drm/meson/meson_drv.c +1
-1@@ -126,7 +126,7 @@ static bool meson_vpu_has_available_connectors(struct device *dev)return false; } -static struct regmap_config meson_regmap_config = { +static const struct regmap_config meson_regmap_config = { .reg_bits =32 , .val_bits =32 , .reg_stride =4 ,
PATCH 3/5 drm/fsl-dcu: constify regmap_config
In reply to Krzysztof KozlowskiMark local static 'struct regmap_config' as const for safer and more obvious code.
--- drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/fsl-dcu/fsl_tcon.c +1 -1
@@ -29,7 +29,7 @@ void fsl_tcon_bypass_enable(struct fsl_tcon *tcon) FSL_TCON_CTRL1_TCON_BYPASS); } -static struct regmap_config fsl_tcon_regmap_config = { +static const struct regmap_config fsl_tcon_regmap_config = { .reg_bits =32 , .reg_stride =4 , .val_bits =32 ,
Signature · 1 line
2.43.0
Re: [PATCH 3/5] drm/fsl-dcu: constify regmap_config
Quoted 14 lines · Krzysztof Kozlowski
Mark local static 'struct
regmap_config' as const for safer and more obvious code.Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/fsl-dcu/fsl_tcon.c +0
-0
drivers/gpu/drm/fsl-dcu/fsl_tcon.c void fsl_tcon_bypass_enable(struct fsl_tcon *tcon) · line 35
Quoted 8 lines
drivers/gpu/drm/fsl-dcu/fsl_tcon.c +1
-1@@ -29,7 +29,7 @@ void fsl_tcon_bypass_enable(struct fsl_tcon *tcon) FSL_TCON_CTRL1_TCON_BYPASS); } -static struct regmap_config fsl_tcon_regmap_config = { +static const struct regmap_config fsl_tcon_regmap_config = { .reg_bits =32 , .reg_stride =4 , .val_bits =32 ,
PATCH 4/5 drm/mediatek: dp: constify regmap_config
In reply to Krzysztof KozlowskiMark local static 'struct regmap_config' as const for safer and more obvious code.
--- drivers/gpu/drm/mediatek/mtk_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/mediatek/mtk_dp.c +1 -1
@@ -311,7 +311,7 @@ static const struct mtk_dp_efuse_fmt mt8195_dp_efuse_fmt[MTK_DP_CAL_MAX] = { }, }; -static struct regmap_config mtk_dp_regmap_config = { +static const struct regmap_config mtk_dp_regmap_config = { .reg_bits =32 , .val_bits =32 , .reg_stride =4 ,
Signature · 1 line
2.43.0
Re: [PATCH 4/5] drm/mediatek: dp: constify regmap_config
Quoted 4 lines · Krzysztof Kozlowski
Mark local static 'struct
regmap_config' as const for safer and more obvious code.Signed-off-by Krzysztof Kozlowski <[email protected]>
Quoted 18 lines
--- drivers/gpu/drm/mediatek/mtk_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/mediatek/mtk_dp.c +1
-1@@ -311,7 +311,7 @@ static const struct mtk_dp_efuse_fmt mt8195_dp_efuse_fmt[MTK_DP_CAL_MAX] = { }, }; -static struct regmap_config mtk_dp_regmap_config = { +static const struct regmap_config mtk_dp_regmap_config = { .reg_bits =32 , .val_bits =32 , .reg_stride =4 ,
Re: [PATCH 4/5] drm/mediatek: dp: constify regmap_config
In reply to Krzysztof KozlowskiIl 08/09/24 16:21, Krzysztof Kozlowski ha scritto:
Quoted 4 lines
Mark local static 'struct
regmap_config' as const for safer and more obvious code.Signed-off-by Krzysztof Kozlowski <[email protected]>
PATCH 5/5 drm/bridge: ti-dlpc3433: constify regmap_config
In reply to Krzysztof KozlowskiMark local static 'struct regmap_config' as const for safer and more obvious code.
--- drivers/gpu/drm/bridge/ti-dlpc3433.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/ti-dlpc3433.c +1 -1
@@ -94,7 +94,7 @@ static const struct regmap_access_table dlpc_volatile_table = { .n_yes_ranges = ARRAY_SIZE(dlpc_volatile_ranges), }; -static struct regmap_config dlpc_regmap_config = { +static const struct regmap_config dlpc_regmap_config = { .reg_bits =8 , .val_bits =8 , .max_register =WR_DSI_PORT_EN ,
Signature · 1 line
2.43.0
Re: [PATCH 5/5] drm/bridge: ti-dlpc3433: constify regmap_config
Quoted 14 lines · Krzysztof Kozlowski
Mark local static 'struct
regmap_config' as const for safer and more obvious code.Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/gpu/drm/bridge/ti-dlpc3433.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/bridge/ti-dlpc3433.c +0
-0
drivers/gpu/drm/bridge/ti-dlpc3433.c static const struct regmap_access_table dlpc_volatile_table = { · line 100
Quoted 8 lines
drivers/gpu/drm/bridge/ti-dlpc3433.c +1
-1@@ -94,7 +94,7 @@ static const struct regmap_access_table dlpc_volatile_table = { .n_yes_ranges = ARRAY_SIZE(dlpc_volatile_ranges), }; -static struct regmap_config dlpc_regmap_config = { +static const struct regmap_config dlpc_regmap_config = { .reg_bits =8 , .val_bits =8 , .max_register =WR_DSI_PORT_EN ,
Re: (subset) [PATCH 0/5] drm: misc: few simple cleanups
In reply to Krzysztof KozlowskiHi,
Quoted 5 lines · Krzysztof Kozlowski
No dependencies, trivial patches.
Best regards,
Krzysztof
Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)
[1/5] drm/meson: drop unused staitc dw_hdmi_dwc_write_bits
https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/d9c12481f980bdad9cf6fdb742e49c5b50622795
[2/5] drm/meson: constify regmap_config
(no commit info)
[5/5] drm/bridge: ti-dlpc3433: constify regmap_config
(no commit info)
Signature · 1 line
Neil