From: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> To: YueHaibing <yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> Cc: Chunming Zhou <David1.Zhou-5C7GfCeVMHo@public.gmane.org>, "Leo (Sunpeng) Li" <sunpeng.li-5C7GfCeVMHo@public.gmane.org>, Bhawanpreet Lakha <Bhawanpreet.Lakha-5C7GfCeVMHo@public.gmane.org>, Zhan Liu <Zhan.Liu-5C7GfCeVMHo@public.gmane.org>, LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, Maling list - DRI developers <dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>, Dave Airlie <airlied-cv59FeDIM0c@public.gmane.org>, amd-gfx list <amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>, Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>, "Deucher, Alexander" <alexander.deucher-5C7GfCeVMHo@public.gmane.org>, Jun Lei <Jun.Lei-5C7GfCeVMHo@public.gmane.org>, "Wentland, Harry" <harry.wentland-5C7GfCeVMHo@public.gmane.org>, Christian Koenig <christian.koenig-5C7GfCeVMHo@public.gmane.org>, Anthony Koo <Anthony.Koo-5C7GfCeVMHo@public.gmane.org> Subject: Re: [PATCH -next] drm/amd/display: remove set but not used variable 'bpc' Date: Mon, 11 Nov 2019 15:27:45 -0500 [thread overview] Message-ID: <CADnq5_NoPmDe-aVZbk5H-212C=hPDytZ35DrOi5k_rU671_LaA@mail.gmail.com> (raw) In-Reply-To: <CADnq5_O7JwQd4+ncEe+KusqNqPBGXgkcUBX6VHP5OjhNwUseWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> On Mon, Nov 11, 2019 at 1:01 PM Alex Deucher <alexdeucher@gmail.com> wrote: > > Applied. Thanks! I've dropped this as it leads to a warning in the code since get_color_depth is no longer used. Care to fix that up as well? Thanks! Alex > > Alex > > On Sun, Nov 10, 2019 at 9:30 PM YueHaibing <yuehaibing@huawei.com> wrote: > > > > Fixes gcc '-Wunused-but-set-variable' warning: > > > > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c: In function get_pbn_from_timing: > > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:2364:11: warning: > > variable bpc set but not used [-Wunused-but-set-variable] > > > > It is not used since commit e49f69363adf ("drm/amd/display: use > > proper formula to calculate bandwidth from timing") > > > > Signed-off-by: YueHaibing <yuehaibing@huawei.com> > > --- > > drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c > > index bdc8be3..53394e2 100644 > > --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c > > +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c > > @@ -2653,13 +2653,11 @@ static int get_color_depth(enum dc_color_depth color_depth) > > > > static struct fixed31_32 get_pbn_from_timing(struct pipe_ctx *pipe_ctx) > > { > > - uint32_t bpc; > > uint64_t kbps; > > struct fixed31_32 peak_kbps; > > uint32_t numerator; > > uint32_t denominator; > > > > - bpc = get_color_depth(pipe_ctx->stream_res.pix_clk_params.color_depth); > > kbps = dc_bandwidth_in_kbps_from_timing(&pipe_ctx->stream->timing); > > > > /* > > -- > > 2.7.4 > > > > > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Alex Deucher <alexdeucher@gmail.com> To: YueHaibing <yuehaibing@huawei.com> Cc: Chunming Zhou <David1.Zhou@amd.com>, "Leo \(Sunpeng\) Li" <sunpeng.li@amd.com>, Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>, Zhan Liu <Zhan.Liu@amd.com>, LKML <linux-kernel@vger.kernel.org>, Maling list - DRI developers <dri-devel@lists.freedesktop.org>, Dave Airlie <airlied@linux.ie>, amd-gfx list <amd-gfx@lists.freedesktop.org>, Daniel Vetter <daniel@ffwll.ch>, "Deucher, Alexander" <alexander.deucher@amd.com>, Jun Lei <Jun.Lei@amd.com>, "Wentland, Harry" <harry.wentland@amd.com>, Christian Koenig <christian.koenig@amd.com>, Anthony Koo <Anthony.Koo@amd.com> Subject: Re: [PATCH -next] drm/amd/display: remove set but not used variable 'bpc' Date: Mon, 11 Nov 2019 15:27:45 -0500 [thread overview] Message-ID: <CADnq5_NoPmDe-aVZbk5H-212C=hPDytZ35DrOi5k_rU671_LaA@mail.gmail.com> (raw) Message-ID: <20191111202745.XgyhkInNFKcxPG7IooQUxQxGGwrjetqCA2OSg96Qe_M@z> (raw) In-Reply-To: <CADnq5_O7JwQd4+ncEe+KusqNqPBGXgkcUBX6VHP5OjhNwUseWg@mail.gmail.com> On Mon, Nov 11, 2019 at 1:01 PM Alex Deucher <alexdeucher@gmail.com> wrote: > > Applied. Thanks! I've dropped this as it leads to a warning in the code since get_color_depth is no longer used. Care to fix that up as well? Thanks! Alex > > Alex > > On Sun, Nov 10, 2019 at 9:30 PM YueHaibing <yuehaibing@huawei.com> wrote: > > > > Fixes gcc '-Wunused-but-set-variable' warning: > > > > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c: In function get_pbn_from_timing: > > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:2364:11: warning: > > variable bpc set but not used [-Wunused-but-set-variable] > > > > It is not used since commit e49f69363adf ("drm/amd/display: use > > proper formula to calculate bandwidth from timing") > > > > Signed-off-by: YueHaibing <yuehaibing@huawei.com> > > --- > > drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c > > index bdc8be3..53394e2 100644 > > --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c > > +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c > > @@ -2653,13 +2653,11 @@ static int get_color_depth(enum dc_color_depth color_depth) > > > > static struct fixed31_32 get_pbn_from_timing(struct pipe_ctx *pipe_ctx) > > { > > - uint32_t bpc; > > uint64_t kbps; > > struct fixed31_32 peak_kbps; > > uint32_t numerator; > > uint32_t denominator; > > > > - bpc = get_color_depth(pipe_ctx->stream_res.pix_clk_params.color_depth); > > kbps = dc_bandwidth_in_kbps_from_timing(&pipe_ctx->stream->timing); > > > > /* > > -- > > 2.7.4 > > > > > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2019-11-11 20:27 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-11-09 9:35 [PATCH -next] drm/amd/display: remove set but not used variable 'bpc' YueHaibing 2019-11-09 9:35 ` YueHaibing 2019-11-11 18:01 ` Alex Deucher 2019-11-11 18:01 ` Alex Deucher [not found] ` <CADnq5_O7JwQd4+ncEe+KusqNqPBGXgkcUBX6VHP5OjhNwUseWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2019-11-11 20:27 ` Alex Deucher [this message] 2019-11-11 20:27 ` Alex Deucher 2019-11-12 2:10 ` [PATCH v2 " YueHaibing 2019-11-12 2:10 ` YueHaibing 2019-11-12 15:52 ` Alex Deucher 2019-11-12 15:52 ` Alex Deucher
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CADnq5_NoPmDe-aVZbk5H-212C=hPDytZ35DrOi5k_rU671_LaA@mail.gmail.com' \ --to=alexdeucher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \ --cc=Anthony.Koo-5C7GfCeVMHo@public.gmane.org \ --cc=Bhawanpreet.Lakha-5C7GfCeVMHo@public.gmane.org \ --cc=David1.Zhou-5C7GfCeVMHo@public.gmane.org \ --cc=Jun.Lei-5C7GfCeVMHo@public.gmane.org \ --cc=Zhan.Liu-5C7GfCeVMHo@public.gmane.org \ --cc=airlied-cv59FeDIM0c@public.gmane.org \ --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \ --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \ --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \ --cc=daniel-/w4YWyX8dFk@public.gmane.org \ --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \ --cc=harry.wentland-5C7GfCeVMHo@public.gmane.org \ --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=sunpeng.li-5C7GfCeVMHo@public.gmane.org \ --cc=yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).