* [PATCH][next] drm/amd/display: remove duplicated assignment to grph_obj_type
@ 2019-11-08 14:45 Colin King
2019-11-08 16:30 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-11-08 14:45 UTC (permalink / raw)
To: Alex Deucher, Christian König, David Zhou, David Airlie,
Daniel Vetter, amd-gfx, dri-devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable grph_obj_type is being assigned twice, one of these is
redundant so remove it.
Addresses-Coverity: ("Evaluation order violation")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
index be6d0cfe41ae..9ba80d828876 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
@@ -365,8 +365,7 @@ bool amdgpu_atombios_get_connector_info_from_object_table(struct amdgpu_device *
router.ddc_valid = false;
router.cd_valid = false;
for (j = 0; j < ((le16_to_cpu(path->usSize) - 8) / 2); j++) {
- uint8_t grph_obj_type=
- grph_obj_type =
+ uint8_t grph_obj_type =
(le16_to_cpu(path->usGraphicObjIds[j]) &
OBJECT_TYPE_MASK) >> OBJECT_TYPE_SHIFT;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] drm/amd/display: remove duplicated assignment to grph_obj_type
2019-11-08 14:45 [PATCH][next] drm/amd/display: remove duplicated assignment to grph_obj_type Colin King
@ 2019-11-08 16:30 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2019-11-08 16:30 UTC (permalink / raw)
To: Colin King
Cc: Alex Deucher, Christian König, David Zhou, David Airlie,
Daniel Vetter, amd-gfx list, Maling list - DRI developers,
kernel-janitors, LKML
On Fri, Nov 8, 2019 at 9:45 AM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable grph_obj_type is being assigned twice, one of these is
> redundant so remove it.
>
> Addresses-Coverity: ("Evaluation order violation")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied. Thanks!
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
> index be6d0cfe41ae..9ba80d828876 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
> @@ -365,8 +365,7 @@ bool amdgpu_atombios_get_connector_info_from_object_table(struct amdgpu_device *
> router.ddc_valid = false;
> router.cd_valid = false;
> for (j = 0; j < ((le16_to_cpu(path->usSize) - 8) / 2); j++) {
> - uint8_t grph_obj_type=
> - grph_obj_type =
> + uint8_t grph_obj_type =
> (le16_to_cpu(path->usGraphicObjIds[j]) &
> OBJECT_TYPE_MASK) >> OBJECT_TYPE_SHIFT;
>
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-08 16:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 14:45 [PATCH][next] drm/amd/display: remove duplicated assignment to grph_obj_type Colin King
2019-11-08 16:30 ` Alex Deucher
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).