* [PATCH 0/4] drm/msm: Remove four set but not used variables
@ 2019-10-10 6:55 zhengbin
2019-10-10 6:55 ` [PATCH 1/4] drm/msm/mdp5: Remove set but not used variable 'fmt' zhengbin
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: zhengbin @ 2019-10-10 6:55 UTC (permalink / raw)
To: robdclark, sean, airlied, bjorn.andersson, linux-arm-msm,
dri-devel, freedreno
Cc: zhengbin13
zhengbin (4):
drm/msm/mdp5: Remove set but not used variable 'fmt'
drm/msm/mdp5: Remove set but not used variable 'hw_cfg' in blend_setup
drm/msm/dsi: Remove set but not used variable 'lpx'
drm/msm/dsi: Remove set but not used variable 'lp'
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 3 ---
drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 --
drivers/gpu/drm/msm/dsi/dsi_host.c | 3 +--
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 6 ++----
4 files changed, 3 insertions(+), 11 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] drm/msm/mdp5: Remove set but not used variable 'fmt'
2019-10-10 6:55 [PATCH 0/4] drm/msm: Remove four set but not used variables zhengbin
@ 2019-10-10 6:55 ` zhengbin
2019-10-10 6:55 ` [PATCH 2/4] drm/msm/mdp5: Remove set but not used variable 'hw_cfg' in blend_setup zhengbin
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: zhengbin @ 2019-10-10 6:55 UTC (permalink / raw)
To: robdclark, sean, airlied, bjorn.andersson, linux-arm-msm,
dri-devel, freedreno
Cc: zhengbin13
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c: In function mdp5_smp_calculate:
drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c:134:6: warning: variable fmt set but not used [-Wunused-but-set-variable]
It is not used since commit 24c478ead0bf ("drm/fourcc:
Pass the format_info pointer to drm_format_plane_cpp")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
index b31cfb5..d7fa2c4 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
@@ -121,7 +121,6 @@ uint32_t mdp5_smp_calculate(struct mdp5_smp *smp,
struct mdp5_kms *mdp5_kms = get_kms(smp);
int rev = mdp5_cfg_get_hw_rev(mdp5_kms->cfg);
int i, hsub, nplanes, nlines;
- u32 fmt = format->base.pixel_format;
uint32_t blkcfg = 0;
nplanes = info->num_planes;
@@ -135,7 +134,6 @@ uint32_t mdp5_smp_calculate(struct mdp5_smp *smp,
* them together, writes to SMP using a single client.
*/
if ((rev > 0) && (format->chroma_sample > CHROMA_FULL)) {
- fmt = DRM_FORMAT_NV24;
nplanes = 2;
/* if decimation is enabled, HW decimates less on the
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] drm/msm/mdp5: Remove set but not used variable 'hw_cfg' in blend_setup
2019-10-10 6:55 [PATCH 0/4] drm/msm: Remove four set but not used variables zhengbin
2019-10-10 6:55 ` [PATCH 1/4] drm/msm/mdp5: Remove set but not used variable 'fmt' zhengbin
@ 2019-10-10 6:55 ` zhengbin
2019-10-10 6:55 ` [PATCH 3/4] drm/msm/dsi: Remove set but not used variable 'lpx' zhengbin
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: zhengbin @ 2019-10-10 6:55 UTC (permalink / raw)
To: robdclark, sean, airlied, bjorn.andersson, linux-arm-msm,
dri-devel, freedreno
Cc: zhengbin13
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c: In function blend_setup:
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:225:28: warning: variable hw_cfg set but not used [-Wunused-but-set-variable]
It is not used since commit 14be3200cd5f ("drm/msm: rename mdp->disp")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
index eb0b4b7..05cc04f 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
@@ -214,7 +214,6 @@ static void blend_setup(struct drm_crtc *crtc)
struct mdp5_pipeline *pipeline = &mdp5_cstate->pipeline;
struct mdp5_kms *mdp5_kms = get_kms(crtc);
struct drm_plane *plane;
- const struct mdp5_cfg_hw *hw_cfg;
struct mdp5_plane_state *pstate, *pstates[STAGE_MAX + 1] = {NULL};
const struct mdp_format *format;
struct mdp5_hw_mixer *mixer = pipeline->mixer;
@@ -232,8 +231,6 @@ static void blend_setup(struct drm_crtc *crtc)
u32 val;
#define blender(stage) ((stage) - STAGE0)
- hw_cfg = mdp5_cfg_get_hw_config(mdp5_kms->cfg);
-
spin_lock_irqsave(&mdp5_crtc->lm_lock, flags);
/* ctl could be released already when we are shutting down: */
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] drm/msm/dsi: Remove set but not used variable 'lpx'
2019-10-10 6:55 [PATCH 0/4] drm/msm: Remove four set but not used variables zhengbin
2019-10-10 6:55 ` [PATCH 1/4] drm/msm/mdp5: Remove set but not used variable 'fmt' zhengbin
2019-10-10 6:55 ` [PATCH 2/4] drm/msm/mdp5: Remove set but not used variable 'hw_cfg' in blend_setup zhengbin
@ 2019-10-10 6:55 ` zhengbin
2019-10-10 6:55 ` [PATCH 4/4] drm/msm/dsi: Remove set but not used variable 'lp' zhengbin
2019-10-11 13:32 ` [PATCH 0/4] drm/msm: Remove four set but not used variables Sean Paul
4 siblings, 0 replies; 6+ messages in thread
From: zhengbin @ 2019-10-10 6:55 UTC (permalink / raw)
To: robdclark, sean, airlied, bjorn.andersson, linux-arm-msm,
dri-devel, freedreno
Cc: zhengbin13
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c: In function msm_dsi_dphy_timing_calc_v2:
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c:156:17: warning: variable lpx set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c: In function msm_dsi_dphy_timing_calc_v3:
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c:273:17: warning: variable lpx set but not used [-Wunused-but-set-variable]
'lpx' in msm_dsi_dphy_timing_calc_v2 is not used since commit a4df68fa232e
("drm/msm/dsi: Add new method to calculate 14nm PHY timings")
'lpx' in msm_dsi_dphy_timing_calc_v3 is not used since commit f1fa7ff44056
("drm/msm/dsi: implement auto PHY timing calculator for 10nm PHY")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
index 3522863..aa22c3a 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
@@ -145,7 +145,7 @@ int msm_dsi_dphy_timing_calc_v2(struct msm_dsi_dphy_timing *timing,
{
const unsigned long bit_rate = clk_req->bitclk_rate;
const unsigned long esc_rate = clk_req->escclk_rate;
- s32 ui, ui_x8, lpx;
+ s32 ui, ui_x8;
s32 tmax, tmin;
s32 pcnt0 = 50;
s32 pcnt1 = 50;
@@ -175,7 +175,6 @@ int msm_dsi_dphy_timing_calc_v2(struct msm_dsi_dphy_timing *timing,
ui = mult_frac(NSEC_PER_MSEC, coeff, bit_rate / 1000);
ui_x8 = ui << 3;
- lpx = mult_frac(NSEC_PER_MSEC, coeff, esc_rate / 1000);
temp = S_DIV_ROUND_UP(38 * coeff - val_ckln * ui, ui_x8);
tmin = max_t(s32, temp, 0);
@@ -262,7 +261,7 @@ int msm_dsi_dphy_timing_calc_v3(struct msm_dsi_dphy_timing *timing,
{
const unsigned long bit_rate = clk_req->bitclk_rate;
const unsigned long esc_rate = clk_req->escclk_rate;
- s32 ui, ui_x8, lpx;
+ s32 ui, ui_x8;
s32 tmax, tmin;
s32 pcnt0 = 50;
s32 pcnt1 = 50;
@@ -284,7 +283,6 @@ int msm_dsi_dphy_timing_calc_v3(struct msm_dsi_dphy_timing *timing,
ui = mult_frac(NSEC_PER_MSEC, coeff, bit_rate / 1000);
ui_x8 = ui << 3;
- lpx = mult_frac(NSEC_PER_MSEC, coeff, esc_rate / 1000);
temp = S_DIV_ROUND_UP(38 * coeff, ui_x8);
tmin = max_t(s32, temp, 0);
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] drm/msm/dsi: Remove set but not used variable 'lp'
2019-10-10 6:55 [PATCH 0/4] drm/msm: Remove four set but not used variables zhengbin
` (2 preceding siblings ...)
2019-10-10 6:55 ` [PATCH 3/4] drm/msm/dsi: Remove set but not used variable 'lpx' zhengbin
@ 2019-10-10 6:55 ` zhengbin
2019-10-11 13:32 ` [PATCH 0/4] drm/msm: Remove four set but not used variables Sean Paul
4 siblings, 0 replies; 6+ messages in thread
From: zhengbin @ 2019-10-10 6:55 UTC (permalink / raw)
To: robdclark, sean, airlied, bjorn.andersson, linux-arm-msm,
dri-devel, freedreno
Cc: zhengbin13
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/msm/dsi/dsi_host.c: In function dsi_cmd_dma_rx:
drivers/gpu/drm/msm/dsi/dsi_host.c:1302:7: warning: variable lp set but not used [-Wunused-but-set-variable]
It is not used since commit a689554ba6ed ("drm/msm:
Initial add DSI connector support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 663ff9f..4851188 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1291,14 +1291,13 @@ static int dsi_cmd_dma_tx(struct msm_dsi_host *msm_host, int len)
static int dsi_cmd_dma_rx(struct msm_dsi_host *msm_host,
u8 *buf, int rx_byte, int pkt_size)
{
- u32 *lp, *temp, data;
+ u32 *temp, data;
int i, j = 0, cnt;
u32 read_cnt;
u8 reg[16];
int repeated_bytes = 0;
int buf_offset = buf - msm_host->rx_buf;
- lp = (u32 *)buf;
temp = (u32 *)reg;
cnt = (rx_byte + 3) >> 2;
if (cnt > 4)
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/4] drm/msm: Remove four set but not used variables
2019-10-10 6:55 [PATCH 0/4] drm/msm: Remove four set but not used variables zhengbin
` (3 preceding siblings ...)
2019-10-10 6:55 ` [PATCH 4/4] drm/msm/dsi: Remove set but not used variable 'lp' zhengbin
@ 2019-10-11 13:32 ` Sean Paul
4 siblings, 0 replies; 6+ messages in thread
From: Sean Paul @ 2019-10-11 13:32 UTC (permalink / raw)
To: zhengbin
Cc: robdclark, sean, airlied, bjorn.andersson, linux-arm-msm,
dri-devel, freedreno
On Thu, Oct 10, 2019 at 02:55:02PM +0800, zhengbin wrote:
> zhengbin (4):
> drm/msm/mdp5: Remove set but not used variable 'fmt'
> drm/msm/mdp5: Remove set but not used variable 'hw_cfg' in blend_setup
> drm/msm/dsi: Remove set but not used variable 'lpx'
> drm/msm/dsi: Remove set but not used variable 'lp'
Applied the set to msm-next, thanks for the patches!
Sean
>
> drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 3 ---
> drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 --
> drivers/gpu/drm/msm/dsi/dsi_host.c | 3 +--
> drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 6 ++----
> 4 files changed, 3 insertions(+), 11 deletions(-)
>
> --
> 2.7.4
>
--
Sean Paul, Software Engineer, Google / Chromium OS
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-10-11 13:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10 6:55 [PATCH 0/4] drm/msm: Remove four set but not used variables zhengbin
2019-10-10 6:55 ` [PATCH 1/4] drm/msm/mdp5: Remove set but not used variable 'fmt' zhengbin
2019-10-10 6:55 ` [PATCH 2/4] drm/msm/mdp5: Remove set but not used variable 'hw_cfg' in blend_setup zhengbin
2019-10-10 6:55 ` [PATCH 3/4] drm/msm/dsi: Remove set but not used variable 'lpx' zhengbin
2019-10-10 6:55 ` [PATCH 4/4] drm/msm/dsi: Remove set but not used variable 'lp' zhengbin
2019-10-11 13:32 ` [PATCH 0/4] drm/msm: Remove four set but not used variables Sean Paul
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).