mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Furquan Shaikh <furquan@google.com>,
	Harry Wentland <harry.wentland@amd.com>,
	Leo Li <sunpeng.li@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>,
	Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>,
	Stylon Wang <stylon.wang@amd.com>, Roman Li <roman.li@amd.com>,
	Mikita Lipski <mikita.lipski@amd.com>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, adurbin@google.com,
	deepak.sharma@amd.com
Subject: Re: [PATCH v2] drivers: gpu: amd: Initialize amdgpu_dm_backlight_caps object to 0 in amdgpu_dm_update_backlight_caps
Date: Thu, 20 Aug 2020 11:01:29 +0200	[thread overview]
Message-ID: <5c7dbcd6-b4c5-f7e5-40d5-b65d8ff58030@amd.com> (raw)
In-Reply-To: <20200820075241.3160534-1-furquan@google.com>

Am 20.08.20 um 09:52 schrieb Furquan Shaikh:
> In `amdgpu_dm_update_backlight_caps()`, there is a local
> `amdgpu_dm_backlight_caps` object that is filled in by
> `amdgpu_acpi_get_backlight_caps()`. However, this object is
> uninitialized before the call and hence the subsequent check for
> aux_support can fail since it is not initialized by
> `amdgpu_acpi_get_backlight_caps()` as well. This change initializes
> this local `amdgpu_dm_backlight_caps` object to 0.
>
> Signed-off-by: Furquan Shaikh <furquan@google.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
> v2: Switched to using memset for initialization of object.
>
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index e4b33c67b634..da072998ce48 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -2855,6 +2855,8 @@ static void amdgpu_dm_update_backlight_caps(struct amdgpu_display_manager *dm)
>   #if defined(CONFIG_ACPI)
>   	struct amdgpu_dm_backlight_caps caps;
>   
> +	memset(&caps, 0, sizeof(caps));
> +
>   	if (dm->backlight_caps.caps_valid)
>   		return;
>   


  reply	other threads:[~2020-08-20  9:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20  5:26 [PATCH] " Furquan Shaikh
2020-08-20  7:16 ` Christian König
2020-08-20  7:52 ` [PATCH v2] " Furquan Shaikh
2020-08-20  9:01   ` Christian König [this message]
2020-08-20 18:20     ` 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=5c7dbcd6-b4c5-f7e5-40d5-b65d8ff58030@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=adurbin@google.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel@ffwll.ch \
    --cc=deepak.sharma@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=furquan@google.com \
    --cc=harry.wentland@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikita.lipski@amd.com \
    --cc=nicholas.kazlauskas@amd.com \
    --cc=roman.li@amd.com \
    --cc=stylon.wang@amd.com \
    --cc=sunpeng.li@amd.com \
    /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: link
Be 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

all inboxes | Powered by JetHome®