linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/msm/dp: Remove redundant initialization of variable bpp
@ 2021-09-29 10:54 Colin King
  2021-10-01 17:43 ` Dmitry Baryshkov
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-09-29 10:54 UTC (permalink / raw)
  To: Rob Clark, Sean Paul, David Airlie, Daniel Vetter, linux-arm-msm,
	dri-devel, freedreno
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable bpp is being initialized with a value that is never
read, it is being updated later on in both paths of an if statement.
The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/msm/dp/dp_panel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_panel.c b/drivers/gpu/drm/msm/dp/dp_panel.c
index 2181b60e1d1d..71db10c0f262 100644
--- a/drivers/gpu/drm/msm/dp/dp_panel.c
+++ b/drivers/gpu/drm/msm/dp/dp_panel.c
@@ -234,7 +234,7 @@ u32 dp_panel_get_mode_bpp(struct dp_panel *dp_panel,
 		u32 mode_edid_bpp, u32 mode_pclk_khz)
 {
 	struct dp_panel_private *panel;
-	u32 bpp = mode_edid_bpp;
+	u32 bpp;
 
 	if (!dp_panel || !mode_edid_bpp || !mode_pclk_khz) {
 		DRM_ERROR("invalid input\n");
-- 
2.32.0


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

* Re: [PATCH] drm/msm/dp: Remove redundant initialization of variable bpp
  2021-09-29 10:54 [PATCH] drm/msm/dp: Remove redundant initialization of variable bpp Colin King
@ 2021-10-01 17:43 ` Dmitry Baryshkov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Baryshkov @ 2021-10-01 17:43 UTC (permalink / raw)
  To: Colin King, Rob Clark, Sean Paul, David Airlie, Daniel Vetter,
	linux-arm-msm, dri-devel, freedreno
  Cc: kernel-janitors, linux-kernel

On 29/09/2021 13:54, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable bpp is being initialized with a value that is never
> read, it is being updated later on in both paths of an if statement.
> The assignment is redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> ---
>   drivers/gpu/drm/msm/dp/dp_panel.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/msm/dp/dp_panel.c b/drivers/gpu/drm/msm/dp/dp_panel.c
> index 2181b60e1d1d..71db10c0f262 100644
> --- a/drivers/gpu/drm/msm/dp/dp_panel.c
> +++ b/drivers/gpu/drm/msm/dp/dp_panel.c
> @@ -234,7 +234,7 @@ u32 dp_panel_get_mode_bpp(struct dp_panel *dp_panel,
>   		u32 mode_edid_bpp, u32 mode_pclk_khz)
>   {
>   	struct dp_panel_private *panel;
> -	u32 bpp = mode_edid_bpp;
> +	u32 bpp;
>   
>   	if (!dp_panel || !mode_edid_bpp || !mode_pclk_khz) {
>   		DRM_ERROR("invalid input\n");
> 


-- 
With best wishes
Dmitry

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

end of thread, other threads:[~2021-10-01 17:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29 10:54 [PATCH] drm/msm/dp: Remove redundant initialization of variable bpp Colin King
2021-10-01 17:43 ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).