Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3053002imu; Thu, 29 Nov 2018 14:45:17 -0800 (PST) X-Google-Smtp-Source: AFSGD/VliY94PBdtnkAubgrxip7mDRTU9TRF5fbfQkXPyNHgW1K+R0Nq19onu+N1iV9Os9c/5Z7U X-Received: by 2002:a17:902:b595:: with SMTP id a21mr3186703pls.120.1543531517011; Thu, 29 Nov 2018 14:45:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543531516; cv=none; d=google.com; s=arc-20160816; b=k2ut/nKnEVFInqV8wMwMxMUDO7Z3kZfQCM8UOPPnMkfHKxPJJjli+Cad5zLlB9ejpc 5rWcs5zInDHOV5Wta6kKPzXAjQgkKe8Ij8E4l1n5oXjJMUmoICXGU8+G1g7+4wHu9DSD dlPXn1KZAc5lVpE5zYU1N7EzH8vq9+1Y/08w6CULLAb8Dgc5kMiD5ahFN44i+vzTKn2X Ca3EO7Pp5KQeUa9wq7OHwUQQvVo8+9cKs3PkCWHTyzt+27pRtmVVscCIioV+OgRJYKZY zQShwS4RNjtVRG/wQ0iOz4huWguxv1Mfjf9rbi0WxxDwUAE8VCNN3/xS7mJV4KSnkLy3 RszA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AjC9mgriRN0LP5/i352ByFedKXXyljq0Tw1jexu8YxI=; b=v2sdzzjk7ztPk4F+7Vd+vLLEvBbQmJdtS2m8NVPniLeaI20Kg7V27WgaxrzxIN2SoG 5N+jvbXm2Yo0NLcw0PfYKyrjLMl9Jok8lu7vo70RscXI1HlKmb6KynjXpdEVaEQbqmid NvurfontETsXYY5oBGoxkxOlqZPqVmYDob2328b/nEPTc+Z4X46UtQvuJqWoVTwcXvW4 WBPVpF8TTT8xib7FDM3RKGRzBWU8SWV9nXfPUHBlxWH1OoVvsKtCiqvbUjNdYncF/Ell 8+KBCjc8HyfW5FxxqWY6/CTDsXA1AxJccyhWJuYW7+TmeYrnU9cry+6IsKfS6zAtoTxt iPyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PtfqTHsx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5si2847429pgl.485.2018.11.29.14.45.02; Thu, 29 Nov 2018 14:45:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PtfqTHsx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726980AbeK3Jtl (ORCPT + 99 others); Fri, 30 Nov 2018 04:49:41 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:35833 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726451AbeK3Jtl (ORCPT ); Fri, 30 Nov 2018 04:49:41 -0500 Received: by mail-oi1-f196.google.com with SMTP id v6so3131718oif.2 for ; Thu, 29 Nov 2018 14:42:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=AjC9mgriRN0LP5/i352ByFedKXXyljq0Tw1jexu8YxI=; b=PtfqTHsxl6T1aNf0xojBdLJL2v9MbOIxqkmi4EBvOIsB6/VNvqeZXyexp3+NuL/5VZ UphWUEJCTG5j+lozKPie/tnYgMcaqEL39/ZVqJ8TSBMcpOYnFnwOtn560U04O15uWFwP 0oolYz+G70vSSLEB9DHVm6eGFlnmvBGrXN/cQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=AjC9mgriRN0LP5/i352ByFedKXXyljq0Tw1jexu8YxI=; b=nO25M09ZIFiXUcYOHDGcigYWjaeraPXMupDE3u/OHUeM8YskbyKHgO6zEflbWTPbig G6elUIvNoZH5ITpMxtMgAJ5TEk3f/NiS+VXpb4JGEusNE7sVKZnWmHFeUzsNpwuJkTac LLKUeeSXFG3fMoahVEHLQ1n9cSkhzLg9yEw07VpkQj3e3xs5k+du31Msraygyoq6fzOr r7f0tPibLXzA3K/KIPsYvf8hhpWEZ/fgyLNVQ/KotUKM3a4UVMIc5+IEz0oM46AErVD6 qWQke5S90AWAiLRgJdIwMvrdy3EtDEW9Wr5iSM8tsdE2VJjBIGQElF/kP//wPbVIMU6S 1e8A== X-Gm-Message-State: AA+aEWaGehw9fwmWnZYmFg1uIENythX7v2KiH2VLiB/sSpE8DE+YCjOQ 4tlZr9HjttzueFohmR1s08a1IBDOMnAvJw== X-Received: by 2002:aca:e495:: with SMTP id b143mr1864251oih.286.1543531356404; Thu, 29 Nov 2018 14:42:36 -0800 (PST) Received: from localhost ([2600:1700:141:4960:d408:b2c2:72bf:467a]) by smtp.gmail.com with ESMTPSA id y17sm2507709oie.41.2018.11.29.14.42.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 14:42:35 -0800 (PST) Date: Thu, 29 Nov 2018 16:42:34 -0600 From: Andy Gross To: Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stephen Rothwell , kbuild test robot , Jordan Crouse , Bjorn Andersson , Evan Green , Rob Clark Subject: Re: [PATCH] drm: msm: Check cmd_db_read_aux_data() for failure Message-ID: <20181129224234.GD32306@hector.attlocal.net> References: <20181129163826.178670-1-swboyd@chromium.org> <20181129223600.GC32306@hector.attlocal.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181129223600.GC32306@hector.attlocal.net> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 29, 2018 at 04:36:00PM -0600, Andy Gross wrote: > On Thu, Nov 29, 2018 at 08:38:26AM -0800, Stephen Boyd wrote: > > We need to check the call to cmd_db_read_aux_data() for the error case, > > so that we don't continue and use potentially uninitialized values for > > 'pri_count' and 'sec_count'. Otherwise, we get the following compiler > > warnings: > > > > drivers/gpu/drm/msm/adreno/a6xx_gmu.c: In function 'a6xx_gmu_rpmh_arc_votes_init.isra.12': > > drivers/gpu/drm/msm/adreno/a6xx_gmu.c:943:12: warning: 'pri_count' is used uninitialized in this function [-Wuninitialized] > > pri_count >>= 1; > > ^~~ > > drivers/gpu/drm/msm/adreno/a6xx_gmu.c:948:12: warning: 'sec_count' may be used uninitialized in this function > > [-Wmaybe-uninitialized] > > sec_count >>= 1; > > ^~~ > > > > Reported-by: Stephen Rothwell > > Reported-by: kbuild test robot > > Cc: Jordan Crouse > > Cc: Bjorn Andersson > > Cc: Evan Green > > Cc: Jordan Crouse > > Cc: Rob Clark > > Fixes: ed3cafa79ea7 ("soc: qcom: cmd-db: Stop memcpy()ing in cmd_db_read_aux_data()") > > Signed-off-by: Stephen Boyd On second thought, this needs to go through drm tree. Reviewed-by: Andy Gross