Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753029AbcJMJCu (ORCPT ); Thu, 13 Oct 2016 05:02:50 -0400 Received: from mail.fireflyinternet.com ([109.228.58.192]:63506 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752845AbcJMJCl (ORCPT ); Thu, 13 Oct 2016 05:02:41 -0400 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Date: Thu, 13 Oct 2016 10:01:03 +0100 From: Chris Wilson To: Dan Carpenter Cc: Daniel Vetter , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , David Airlie , intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [Intel-gfx] [patch] drm/i915: fix a read size argument Message-ID: <20161013090103.GC32528@nuc-i3427.alporthouse.com> Mail-Followup-To: Chris Wilson , Dan Carpenter , Daniel Vetter , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , David Airlie , intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20161013085508.GJ16198@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161013085508.GJ16198@mwanda> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 603 Lines: 19 On Thu, Oct 13, 2016 at 11:55:08AM +0300, Dan Carpenter wrote: > We want to read 3 bytes here, but because the parenthesis are in the > wrong place we instead read: > > sizeof(intel_dp->edp_dpcd) == sizeof(intel_dp->edp_dpcd) > > which is one byte. > > Fixes: fe5a66f91c88 ("drm/i915: Read PSR caps/intermediate freqs/etc. only once on eDP") > Signed-off-by: Dan Carpenter Oops, does smatch catch this? I don't recall seeing the complaint in recent runs? Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre