Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1854459pxk; Sun, 13 Sep 2020 19:31:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeEPw+168Z6avmMOniEiYaNMxtOoh7T+XKW0oZC/5qaHjlUzhH5Rdk33WdQlnnQORnIz+8 X-Received: by 2002:a17:906:af6a:: with SMTP id os10mr12261462ejb.34.1600050689727; Sun, 13 Sep 2020 19:31:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600050689; cv=none; d=google.com; s=arc-20160816; b=qi8h1ygJ8ckFT95pZ0vnDFxN76zuWdmWG8At/WGlnA0uwULe6pLodSBaI61597OXQW 0BHpiniBYCyE7WOebnQJfUlrUgXTJM719wKci2GUAQd3s/AwoAFEwljdB+jSIKO11mD5 mY8HUFsu+BnNaoQfqQcw3S26qQ+9P066oRYOwkQTJrjc7T752XBl+njdJLEzilSWf9Lc pTZH5Iy8ePVao3fB6zdIaJEa05IMqjWbQwVSiWfZuewK+JNqcRJwGXsSt5MMYkbcwVbg krotVAfdc+nJZ5UTAH3eSCZ5oFvcRLy+9oJUXMB6eEqE/ZUQSmH5XuF24tFIuZ1vTKrq eBYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ZifYdXY/7F2LoiT7gKnIbVwnlCP6qvLug13m2oN5teE=; b=W9DpPCYchBteNOesCLKplRTf+E3TD2CzP4d+846hZy00cK+qPmiPsCB5al0ap80kxx DMktJElRvEKIw/Ar+9vnjOv8kveXzIYqBj9fxFT/C41sasEfvJt4GJZbTbQI7chFwIy9 JpYcBbb2mFHpJbY5GSVtRyjyqo/Vco436cIbjqRMT/KlJpArz4J9Z/xLcQK4V25w/+PI 6i7CBs2KFxgU/xwVevmnRJkFk4x1cgYh6hclp4yWzEU5EHBurSsbowYDy2xjG8GDH2Ez bUDchnD9nmtFTacGj1CzywYejj4bDEJsyokZKfVlxgoX6QfiVCt373uJZaw5raehZgej XhSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gxlzUj0x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u21si6275391eja.78.2020.09.13.19.31.06; Sun, 13 Sep 2020 19:31:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gxlzUj0x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726025AbgINCaJ (ORCPT + 99 others); Sun, 13 Sep 2020 22:30:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725969AbgINCaH (ORCPT ); Sun, 13 Sep 2020 22:30:07 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 902C4C06174A; Sun, 13 Sep 2020 19:30:06 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id x123so11296025pfc.7; Sun, 13 Sep 2020 19:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZifYdXY/7F2LoiT7gKnIbVwnlCP6qvLug13m2oN5teE=; b=gxlzUj0xB0yJzg+U+5am9MlOexD+ex+GBmHcy+ZwRAfevVIs3epB2w8paAeANIXgit jx7rLx9HRr9MOiZd4mftyGKHwfhtDN0/8hGve8qYRsygsqN/ApjbJsV/IQeNPAxnBtnA 9iT3WNn+7BHeNC/w5shwjj1bCDf9ctz3B3lWa8Be3F5lyGLyY2Jem8tob/jESkwV0KDL /5sGttriChwnC3Sz0bZ5gfgHFayZ0h/enNYw0hkHT3NltTjhNETsyknhrkSDr5uXQCeO alus8zTyjbaKW7s3XMgF4mj3i6whdvI+HWC5zmtziKBJ3ywcA2UuEzpDTMp666/9JCZz E1vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZifYdXY/7F2LoiT7gKnIbVwnlCP6qvLug13m2oN5teE=; b=qTx+O/I1xKfKKsXh0r0nwkmGaVoKYSd7H+dgMVsv+kMUECIEmSZ0fzfqQXa6azyHV3 wf+Y8AoBHoBvhnbyn7Ovhikxh0CvuFOB/oDJWeyJU241IzGnDLql4eaUirDAbKDKPf73 3H2cs8G+MUDqSHw2sCMCE8jAxUJ9bjmbBYDVRDxVRffmarVEnKdCt9gZRkURFNUePso2 fUtsvgR6RlZPcDZm5723uXgx2FQwRqnEssRc7JMACHbzFh8ekydZPGAff+0ZvpdFpTHf dtMTLun2qhpPqOrzjaPaiiEpoCUI3zNlRIvWpDFM3s6aqHeSW40QKrKos4q2zYnK2PRp tJHg== X-Gm-Message-State: AOAM5323thxsA1JSfl4nbM+3PoYd3IpPGK6UxJrcZ7BHIT1mKhHtS1O0 9EiuYupq0Qkt3tsBFiN/wl30pW/tEtk= X-Received: by 2002:aa7:9795:: with SMTP id o21mr11830850pfp.26.1600050605774; Sun, 13 Sep 2020 19:30:05 -0700 (PDT) Received: from ZB-PF0YQ8ZU.360buyad.local (f.a4.5177.ip4.static.sl-reverse.com. [119.81.164.15]) by smtp.gmail.com with ESMTPSA id j9sm8426372pfe.170.2020.09.13.19.30.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Sep 2020 19:30:04 -0700 (PDT) From: Zhenzhong Duan 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 Subject: [PATCH v2] drm/msm/a6xx: Fix a size determination in a6xx_get_indexed_registers() Date: Mon, 14 Sep 2020 10:29:49 +0800 Message-Id: <20200914022949.129-1-zhenzhong.duan@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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