* [PATCH] drm/amd/display: remove gcc warning Wunused-but-set-variable
@ 2019-10-19 3:23 ` Chen Wandun
0 siblings, 0 replies; 6+ messages in thread
From: Chen Wandun @ 2019-10-19 3:23 UTC (permalink / raw)
To: harry.wentland, sunpeng.li, alexander.deucher, christian.koenig,
David1.Zhou, Bhawanpreet.Lakha, David.Francis, Tony.Cheng,
abdoulaye.berthe, Thomas.Lim, amd-gfx, dri-devel, linux-kernel
Cc: chenwandun
From: Chenwandun <chenwandun@huawei.com>
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: In function dce_aux_configure_timeout:
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: warning: variable timeout set but not used [-Wunused-but-set-variable]
Signed-off-by: Chenwandun <chenwandun@huawei.com>
---
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
index 976bd49..739f8e2 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
@@ -432,7 +432,6 @@ static bool dce_aux_configure_timeout(struct ddc_service *ddc,
{
uint32_t multiplier = 0;
uint32_t length = 0;
- uint32_t timeout = 0;
struct ddc *ddc_pin = ddc->ddc_pin;
struct dce_aux *aux_engine = ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en];
struct aux_engine_dce110 *aux110 = FROM_AUX_ENGINE(aux_engine);
@@ -446,25 +445,21 @@ static bool dce_aux_configure_timeout(struct ddc_service *ddc,
length = timeout_in_us/TIME_OUT_MULTIPLIER_8;
if (timeout_in_us % TIME_OUT_MULTIPLIER_8 != 0)
length++;
- timeout = length * TIME_OUT_MULTIPLIER_8;
} else if (timeout_in_us <= 2 * TIME_OUT_INCREMENT) {
multiplier = 1;
length = timeout_in_us/TIME_OUT_MULTIPLIER_16;
if (timeout_in_us % TIME_OUT_MULTIPLIER_16 != 0)
length++;
- timeout = length * TIME_OUT_MULTIPLIER_16;
} else if (timeout_in_us <= 4 * TIME_OUT_INCREMENT) {
multiplier = 2;
length = timeout_in_us/TIME_OUT_MULTIPLIER_32;
if (timeout_in_us % TIME_OUT_MULTIPLIER_32 != 0)
length++;
- timeout = length * TIME_OUT_MULTIPLIER_32;
} else if (timeout_in_us > 4 * TIME_OUT_INCREMENT) {
multiplier = 3;
length = timeout_in_us/TIME_OUT_MULTIPLIER_64;
if (timeout_in_us % TIME_OUT_MULTIPLIER_64 != 0)
length++;
- timeout = length * TIME_OUT_MULTIPLIER_64;
}
length = (length < MAX_TIMEOUT_LENGTH) ? length : MAX_TIMEOUT_LENGTH;
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drm/amd/display: remove gcc warning Wunused-but-set-variable
@ 2019-10-19 3:23 ` Chen Wandun
0 siblings, 0 replies; 6+ messages in thread
From: Chen Wandun @ 2019-10-19 3:23 UTC (permalink / raw)
To: harry.wentland, sunpeng.li, alexander.deucher, christian.koenig,
David1.Zhou, Bhawanpreet.Lakha, David.Francis, Tony.Cheng,
abdoulaye.berthe, Thomas.Lim, amd-gfx, dri-devel, linux-kernel
Cc: chenwandun
From: Chenwandun <chenwandun@huawei.com>
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: In function dce_aux_configure_timeout:
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: warning: variable timeout set but not used [-Wunused-but-set-variable]
Signed-off-by: Chenwandun <chenwandun@huawei.com>
---
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
index 976bd49..739f8e2 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
@@ -432,7 +432,6 @@ static bool dce_aux_configure_timeout(struct ddc_service *ddc,
{
uint32_t multiplier = 0;
uint32_t length = 0;
- uint32_t timeout = 0;
struct ddc *ddc_pin = ddc->ddc_pin;
struct dce_aux *aux_engine = ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en];
struct aux_engine_dce110 *aux110 = FROM_AUX_ENGINE(aux_engine);
@@ -446,25 +445,21 @@ static bool dce_aux_configure_timeout(struct ddc_service *ddc,
length = timeout_in_us/TIME_OUT_MULTIPLIER_8;
if (timeout_in_us % TIME_OUT_MULTIPLIER_8 != 0)
length++;
- timeout = length * TIME_OUT_MULTIPLIER_8;
} else if (timeout_in_us <= 2 * TIME_OUT_INCREMENT) {
multiplier = 1;
length = timeout_in_us/TIME_OUT_MULTIPLIER_16;
if (timeout_in_us % TIME_OUT_MULTIPLIER_16 != 0)
length++;
- timeout = length * TIME_OUT_MULTIPLIER_16;
} else if (timeout_in_us <= 4 * TIME_OUT_INCREMENT) {
multiplier = 2;
length = timeout_in_us/TIME_OUT_MULTIPLIER_32;
if (timeout_in_us % TIME_OUT_MULTIPLIER_32 != 0)
length++;
- timeout = length * TIME_OUT_MULTIPLIER_32;
} else if (timeout_in_us > 4 * TIME_OUT_INCREMENT) {
multiplier = 3;
length = timeout_in_us/TIME_OUT_MULTIPLIER_64;
if (timeout_in_us % TIME_OUT_MULTIPLIER_64 != 0)
length++;
- timeout = length * TIME_OUT_MULTIPLIER_64;
}
length = (length < MAX_TIMEOUT_LENGTH) ? length : MAX_TIMEOUT_LENGTH;
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/display: remove gcc warning Wunused-but-set-variable
2019-10-19 3:23 ` Chen Wandun
(?)
(?)
@ 2019-10-25 19:22 ` Alex Deucher
-1 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2019-10-25 19:22 UTC (permalink / raw)
To: Chen Wandun
Cc: Wentland, Harry, Leo (Sunpeng) Li, Deucher, Alexander,
Christian Koenig, Chunming Zhou, Bhawanpreet Lakha,
David Francis, Cheng, Tony, abdoulaye.berthe, Thomas Lim,
amd-gfx list, Maling list - DRI developers, LKML
On Sat, Oct 19, 2019 at 8:07 PM Chen Wandun <chenwandun@huawei.com> wrote:
>
> From: Chenwandun <chenwandun@huawei.com>
>
> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: In function dce_aux_configure_timeout:
> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: warning: variable timeout set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Chenwandun <chenwandun@huawei.com>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> index 976bd49..739f8e2 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> @@ -432,7 +432,6 @@ static bool dce_aux_configure_timeout(struct ddc_service *ddc,
> {
> uint32_t multiplier = 0;
> uint32_t length = 0;
> - uint32_t timeout = 0;
> struct ddc *ddc_pin = ddc->ddc_pin;
> struct dce_aux *aux_engine = ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en];
> struct aux_engine_dce110 *aux110 = FROM_AUX_ENGINE(aux_engine);
> @@ -446,25 +445,21 @@ static bool dce_aux_configure_timeout(struct ddc_service *ddc,
> length = timeout_in_us/TIME_OUT_MULTIPLIER_8;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_8 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_8;
> } else if (timeout_in_us <= 2 * TIME_OUT_INCREMENT) {
> multiplier = 1;
> length = timeout_in_us/TIME_OUT_MULTIPLIER_16;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_16 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_16;
> } else if (timeout_in_us <= 4 * TIME_OUT_INCREMENT) {
> multiplier = 2;
> length = timeout_in_us/TIME_OUT_MULTIPLIER_32;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_32 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_32;
> } else if (timeout_in_us > 4 * TIME_OUT_INCREMENT) {
> multiplier = 3;
> length = timeout_in_us/TIME_OUT_MULTIPLIER_64;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_64 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_64;
> }
>
> length = (length < MAX_TIMEOUT_LENGTH) ? length : MAX_TIMEOUT_LENGTH;
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/display: remove gcc warning Wunused-but-set-variable
@ 2019-10-25 19:22 ` Alex Deucher
0 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2019-10-25 19:22 UTC (permalink / raw)
To: Chen Wandun
Cc: Thomas Lim, Leo (Sunpeng) Li, David Francis, LKML, amd-gfx list,
Cheng, Tony, Maling list - DRI developers, abdoulaye.berthe,
Deucher, Alexander, Bhawanpreet Lakha, Christian Koenig
On Sat, Oct 19, 2019 at 8:07 PM Chen Wandun <chenwandun@huawei.com> wrote:
>
> From: Chenwandun <chenwandun@huawei.com>
>
> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: In function dce_aux_configure_timeout:
> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: warning: variable timeout set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Chenwandun <chenwandun@huawei.com>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> index 976bd49..739f8e2 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> @@ -432,7 +432,6 @@ static bool dce_aux_configure_timeout(struct ddc_service *ddc,
> {
> uint32_t multiplier = 0;
> uint32_t length = 0;
> - uint32_t timeout = 0;
> struct ddc *ddc_pin = ddc->ddc_pin;
> struct dce_aux *aux_engine = ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en];
> struct aux_engine_dce110 *aux110 = FROM_AUX_ENGINE(aux_engine);
> @@ -446,25 +445,21 @@ static bool dce_aux_configure_timeout(struct ddc_service *ddc,
> length = timeout_in_us/TIME_OUT_MULTIPLIER_8;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_8 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_8;
> } else if (timeout_in_us <= 2 * TIME_OUT_INCREMENT) {
> multiplier = 1;
> length = timeout_in_us/TIME_OUT_MULTIPLIER_16;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_16 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_16;
> } else if (timeout_in_us <= 4 * TIME_OUT_INCREMENT) {
> multiplier = 2;
> length = timeout_in_us/TIME_OUT_MULTIPLIER_32;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_32 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_32;
> } else if (timeout_in_us > 4 * TIME_OUT_INCREMENT) {
> multiplier = 3;
> length = timeout_in_us/TIME_OUT_MULTIPLIER_64;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_64 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_64;
> }
>
> length = (length < MAX_TIMEOUT_LENGTH) ? length : MAX_TIMEOUT_LENGTH;
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/display: remove gcc warning Wunused-but-set-variable
@ 2019-10-25 19:22 ` Alex Deucher
0 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2019-10-25 19:22 UTC (permalink / raw)
To: Chen Wandun
Cc: Thomas Lim, Leo (Sunpeng) Li, David Francis, LKML, amd-gfx list,
Cheng, Tony, Maling list - DRI developers, abdoulaye.berthe,
Deucher, Alexander, Bhawanpreet Lakha, Christian Koenig
On Sat, Oct 19, 2019 at 8:07 PM Chen Wandun <chenwandun@huawei.com> wrote:
>
> From: Chenwandun <chenwandun@huawei.com>
>
> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: In function dce_aux_configure_timeout:
> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: warning: variable timeout set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Chenwandun <chenwandun@huawei.com>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> index 976bd49..739f8e2 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> @@ -432,7 +432,6 @@ static bool dce_aux_configure_timeout(struct ddc_service *ddc,
> {
> uint32_t multiplier = 0;
> uint32_t length = 0;
> - uint32_t timeout = 0;
> struct ddc *ddc_pin = ddc->ddc_pin;
> struct dce_aux *aux_engine = ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en];
> struct aux_engine_dce110 *aux110 = FROM_AUX_ENGINE(aux_engine);
> @@ -446,25 +445,21 @@ static bool dce_aux_configure_timeout(struct ddc_service *ddc,
> length = timeout_in_us/TIME_OUT_MULTIPLIER_8;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_8 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_8;
> } else if (timeout_in_us <= 2 * TIME_OUT_INCREMENT) {
> multiplier = 1;
> length = timeout_in_us/TIME_OUT_MULTIPLIER_16;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_16 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_16;
> } else if (timeout_in_us <= 4 * TIME_OUT_INCREMENT) {
> multiplier = 2;
> length = timeout_in_us/TIME_OUT_MULTIPLIER_32;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_32 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_32;
> } else if (timeout_in_us > 4 * TIME_OUT_INCREMENT) {
> multiplier = 3;
> length = timeout_in_us/TIME_OUT_MULTIPLIER_64;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_64 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_64;
> }
>
> length = (length < MAX_TIMEOUT_LENGTH) ? length : MAX_TIMEOUT_LENGTH;
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/display: remove gcc warning Wunused-but-set-variable
@ 2019-10-25 19:22 ` Alex Deucher
0 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2019-10-25 19:22 UTC (permalink / raw)
To: Chen Wandun
Cc: Chunming Zhou, Thomas Lim, Leo (Sunpeng) Li, Wentland, Harry,
David Francis, LKML, amd-gfx list, Cheng, Tony,
Maling list - DRI developers, abdoulaye.berthe, Deucher,
Alexander, Bhawanpreet Lakha, Christian Koenig
On Sat, Oct 19, 2019 at 8:07 PM Chen Wandun <chenwandun@huawei.com> wrote:
>
> From: Chenwandun <chenwandun@huawei.com>
>
> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: In function dce_aux_configure_timeout:
> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: warning: variable timeout set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Chenwandun <chenwandun@huawei.com>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> index 976bd49..739f8e2 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> @@ -432,7 +432,6 @@ static bool dce_aux_configure_timeout(struct ddc_service *ddc,
> {
> uint32_t multiplier = 0;
> uint32_t length = 0;
> - uint32_t timeout = 0;
> struct ddc *ddc_pin = ddc->ddc_pin;
> struct dce_aux *aux_engine = ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en];
> struct aux_engine_dce110 *aux110 = FROM_AUX_ENGINE(aux_engine);
> @@ -446,25 +445,21 @@ static bool dce_aux_configure_timeout(struct ddc_service *ddc,
> length = timeout_in_us/TIME_OUT_MULTIPLIER_8;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_8 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_8;
> } else if (timeout_in_us <= 2 * TIME_OUT_INCREMENT) {
> multiplier = 1;
> length = timeout_in_us/TIME_OUT_MULTIPLIER_16;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_16 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_16;
> } else if (timeout_in_us <= 4 * TIME_OUT_INCREMENT) {
> multiplier = 2;
> length = timeout_in_us/TIME_OUT_MULTIPLIER_32;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_32 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_32;
> } else if (timeout_in_us > 4 * TIME_OUT_INCREMENT) {
> multiplier = 3;
> length = timeout_in_us/TIME_OUT_MULTIPLIER_64;
> if (timeout_in_us % TIME_OUT_MULTIPLIER_64 != 0)
> length++;
> - timeout = length * TIME_OUT_MULTIPLIER_64;
> }
>
> length = (length < MAX_TIMEOUT_LENGTH) ? length : MAX_TIMEOUT_LENGTH;
> --
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-10-25 19:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-19 3:23 [PATCH] drm/amd/display: remove gcc warning Wunused-but-set-variable Chen Wandun
2019-10-19 3:23 ` Chen Wandun
2019-10-25 19:22 ` Alex Deucher
2019-10-25 19:22 ` Alex Deucher
2019-10-25 19:22 ` Alex Deucher
2019-10-25 19:22 ` Alex Deucher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.