Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3089460imu; Thu, 29 Nov 2018 15:25:51 -0800 (PST) X-Google-Smtp-Source: AFSGD/WJ2FuoXt8WAMYmbMFoRKLp0kpcZqO3hGkVXTEd0+bQnHZBJ8FXSmDROyQB9+EJF/sE73dt X-Received: by 2002:a62:75d1:: with SMTP id q200mr3354425pfc.254.1543533950996; Thu, 29 Nov 2018 15:25:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543533950; cv=none; d=google.com; s=arc-20160816; b=YtVQGg/28sHoiG6hih4pvsL1f+x2eevkI2BGEs+vD7GDHjbhnqYFfqXx/REUppdYF5 92Wx+EuKbcaONSD+DIFBM9r1yxx+gyzaw7Q9oogpU18As2A7vPRlkjZjB2y9KEQLkebF YLYrv3h6hmabhAUIPKXP9NAJ5H4tcqtZRsW4reqvsbG/LZK8ve2nH0v5ssLjOMozlFo+ TSc8oNhO7aouXAvBndep+ncv8T6CNsjYTzCtz8EgRE3+k04uIlmOg21bH7sStOWgtFjh NzyFzmlKPi94HDWRWnPDqIq2Df6NJhr159BaB3xo7dy/iCG2WLs0O6q394FRuUIpeg0U EIIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=AQ+WFkdZwE9CtNgM9j7g9M5KPCWqo/rsOlSZBVBeyVQ=; b=SVLxHeP7RhKvomAXb5pNDT6ZZlVGX19HLItCyv3Aw9a6hfMRv4AxI/e5oywpOE8ILM bKRFUniGI+vlBX6WzLhGqBXFtF/RgnTisWYrdBJe7ACfsEogdysmwPxg5D+PsA2Jmb3J OXcwVu2axcfcc6ERPBdUVrtlf9w+oaFVcSTA/Pxn3oyRShrIQlSgSwUFyelaZycswiO6 eDkG0pOS1/4V49yXZ9G7oPdu3Yh9WLuHDZo0hoYm3y+PVyL3caQgLNwzJGwYtynxEvB5 K8Jmc/ntfXiapL9YzGsYymd2K7RVVRnbFhRoWBKFPG4sa0LfqVKbDNFo7uwGH2+8i99x t3YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SskGSv5R; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j11si3601953plb.253.2018.11.29.15.25.36; Thu, 29 Nov 2018 15:25:50 -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=@gmail.com header.s=20161025 header.b=SskGSv5R; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726746AbeK3KcG (ORCPT + 99 others); Fri, 30 Nov 2018 05:32:06 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:35312 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726406AbeK3KcG (ORCPT ); Fri, 30 Nov 2018 05:32:06 -0500 Received: by mail-io1-f68.google.com with SMTP id u19so3065075ioc.2; Thu, 29 Nov 2018 15:24:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AQ+WFkdZwE9CtNgM9j7g9M5KPCWqo/rsOlSZBVBeyVQ=; b=SskGSv5RWeUrL4sHxhqqO32YGFoc6egQqGGrhrlyxf5et3+04XdfpUzzSZPBWnAf58 9s3kEsz/WgFnfq34jYKPfKmUdoJcFBhlqEvGpoxqEU9TXcnkEeZ6dCaKWkyYqYpetHUt u+LfWkTmWb3YWnQoECZ22C/R86Ng/Ks1d4DmTay2VoEInDn1Mftkh2mAezpUfb6X3Nbl prazV/KQEEwl/k0z/shFknNViyilj0mCRwE2ds0e9yc3rrggnjTyu/2mxsKM1wwzqmwd u2oK3Af3koLA1Ljh/OLcov/ujPG9/N/6uZAmeezXpV4q/+KlVTUYcJdScmN5OhMIGio4 nFXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AQ+WFkdZwE9CtNgM9j7g9M5KPCWqo/rsOlSZBVBeyVQ=; b=dW7yGd6LE2vigBmKT0jCK+mPgryKCJ/1/iQQUOxaADYB+pF0KNaqQtqzkDgKKeBgr7 MRK53AfnQnnVbnJ2CFjOf6Kzc8dbpNCF7eDZT51hQOWgqCJhRSHR1p50oWUPRLHgS9XI yKr3CJ0bSZpwt8PXyCcZ9PY+YnFppXBia6kVwwGYkZT0vTl3xv26R46A3MndpkgLI9Nb SSUXgdwgIQEfjiaBTIS2mjAonrJDQuhnLO7j29Rh9SQ7jPSVcFiMlGtWDONu6ZLoaU/g lvPzYk6oGheIqjjOMbzytQv2VvY2OjOXIPV0a57XhBVYVG2qCR3neUiOpUY9z7oXstiD 4gQg== X-Gm-Message-State: AA+aEWYzZ4DoOREuQ68N95KsDJEuvECwC6nWp8nB9/OtevC18Yy4xzhl KETRYmmuzRbXK0xlgnjR5+3y3355ZdhzBvFrB3A= X-Received: by 2002:a6b:9156:: with SMTP id t83mr2863627iod.248.1543533894125; Thu, 29 Nov 2018 15:24:54 -0800 (PST) MIME-Version: 1.0 References: <20181129163826.178670-1-swboyd@chromium.org> <20181129223600.GC32306@hector.attlocal.net> In-Reply-To: <20181129223600.GC32306@hector.attlocal.net> From: Rob Clark Date: Thu, 29 Nov 2018 18:24:41 -0500 Message-ID: Subject: Re: [PATCH] drm: msm: Check cmd_db_read_aux_data() for failure To: Andy Gross Cc: Stephen Boyd , Linux Kernel Mailing List , linux-arm-msm , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Stephen Rothwell , lkp@intel.com, Jordan Crouse , Bjorn Andersson , Evan Green , Sean Paul Content-Type: text/plain; charset="UTF-8" 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 5:36 PM 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 > > Thanks for the patch. Queueing this up. > from talking to agross on IRC, seems like this becomes an issue w/ other patches he has queued up for 4.21, and I don't think this should conflict w/ other stuff I have, so Acked-by: Rob Clark for Andy picking up this one BR, -R > > Andy