From: Zhenzhong Duan <zhenzhong.duan@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: robdclark@gmail.com, sean@poorly.run, airlied@linux.ie,
daniel@ffwll.ch, smasetty@codeaurora.org, jcrouse@codeaurora.org,
jonathan@marek.ca, linux-arm-msm@vger.kernel.org,
dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
Markus.Elfring@web.de, Zhenzhong Duan <zhenzhong.duan@gmail.com>
Subject: [PATCH v2] drm/msm/a6xx: Fix a size determination in a6xx_get_indexed_registers()
Date: Mon, 14 Sep 2020 10:29:49 +0800 [thread overview]
Message-ID: <20200914022949.129-1-zhenzhong.duan@gmail.com> (raw)
It's allocating an array of a6xx_gpu_state_obj structure rather than
its pointers.
Fixes: d6852b4b2d01 ("drm/msm/a6xx: Track and manage a6xx state memory")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
---
v2: Update commit message per Markus, thanks
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
index b12f5b4..e9ede19 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
@@ -875,7 +875,7 @@ static void a6xx_get_indexed_registers(struct msm_gpu *gpu,
int i;
a6xx_state->indexed_regs = state_kcalloc(a6xx_state, count,
- sizeof(a6xx_state->indexed_regs));
+ sizeof(*a6xx_state->indexed_regs));
if (!a6xx_state->indexed_regs)
return;
--
1.8.3.1
next reply other threads:[~2020-09-14 2:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 2:29 Zhenzhong Duan [this message]
2020-09-23 15:06 ` [PATCH v2] drm/msm/a6xx: Fix a size determination in a6xx_get_indexed_registers() Jordan Crouse
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=20200914022949.129-1-zhenzhong.duan@gmail.com \
--to=zhenzhong.duan@gmail.com \
--cc=Markus.Elfring@web.de \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jcrouse@codeaurora.org \
--cc=jonathan@marek.ca \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=smasetty@codeaurora.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: 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