* [PATCH -next] drm/drm_dp_mst:remove set but not used variable 'origlen'
@ 2020-01-18 8:06 Bo YU
2020-01-22 8:19 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Bo YU @ 2020-01-18 8:06 UTC (permalink / raw)
To: maarten.lankhorst, mripard, irlied, daniel, airlied, tprevite
Cc: dri-devel, linux-kernel
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/drm_dp_mst_topology.c:3693:16: warning: variable
‘origlen’ set but not used [-Wunused-but-set-variable]
int replylen, origlen, curreply;
It looks like never use variable origlen after assign value to it.
Fixes: ad7f8a1f9ced7 (drm/helper: add Displayport multi-stream helper (v0.6))
Signed-off-by: Bo YU <tsu.yubo@gmail.com>
---
drivers/gpu/drm/drm_dp_mst_topology.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index 4b74193b89ce..4c76e673206b 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -3690,7 +3690,7 @@ static bool drm_dp_get_one_sb_msg(struct drm_dp_mst_topology_mgr *mgr, bool up)
{
int len;
u8 replyblock[32];
- int replylen, origlen, curreply;
+ int replylen, curreply;
int ret;
struct drm_dp_sideband_msg_rx *msg;
int basereg = up ? DP_SIDEBAND_MSG_UP_REQ_BASE : DP_SIDEBAND_MSG_DOWN_REP_BASE;
@@ -3710,7 +3710,6 @@ static bool drm_dp_get_one_sb_msg(struct drm_dp_mst_topology_mgr *mgr, bool up)
}
replylen = msg->curchunk_len + msg->curchunk_hdrlen;
- origlen = replylen;
replylen -= len;
curreply = len;
while (replylen > 0) {
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] drm/drm_dp_mst:remove set but not used variable 'origlen'
2020-01-18 8:06 [PATCH -next] drm/drm_dp_mst:remove set but not used variable 'origlen' Bo YU
@ 2020-01-22 8:19 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2020-01-22 8:19 UTC (permalink / raw)
To: Bo YU
Cc: maarten.lankhorst, mripard, irlied, daniel, airlied, tprevite,
dri-devel, linux-kernel
On Sat, Jan 18, 2020 at 04:06:28PM +0800, Bo YU wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/drm_dp_mst_topology.c:3693:16: warning: variable
> ‘origlen’ set but not used [-Wunused-but-set-variable]
> int replylen, origlen, curreply;
>
> It looks like never use variable origlen after assign value to it.
>
> Fixes: ad7f8a1f9ced7 (drm/helper: add Displayport multi-stream helper (v0.6))
> Signed-off-by: Bo YU <tsu.yubo@gmail.com>
Queued in drm-misc-next, thanks for your patch.
-Daniel
> ---
> drivers/gpu/drm/drm_dp_mst_topology.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
> index 4b74193b89ce..4c76e673206b 100644
> --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> @@ -3690,7 +3690,7 @@ static bool drm_dp_get_one_sb_msg(struct drm_dp_mst_topology_mgr *mgr, bool up)
> {
> int len;
> u8 replyblock[32];
> - int replylen, origlen, curreply;
> + int replylen, curreply;
> int ret;
> struct drm_dp_sideband_msg_rx *msg;
> int basereg = up ? DP_SIDEBAND_MSG_UP_REQ_BASE : DP_SIDEBAND_MSG_DOWN_REP_BASE;
> @@ -3710,7 +3710,6 @@ static bool drm_dp_get_one_sb_msg(struct drm_dp_mst_topology_mgr *mgr, bool up)
> }
> replylen = msg->curchunk_len + msg->curchunk_hdrlen;
>
> - origlen = replylen;
> replylen -= len;
> curreply = len;
> while (replylen > 0) {
> --
> 2.11.0
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-22 8:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-18 8:06 [PATCH -next] drm/drm_dp_mst:remove set but not used variable 'origlen' Bo YU
2020-01-22 8:19 ` Daniel Vetter
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).