Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753429AbcJMJ6x (ORCPT ); Thu, 13 Oct 2016 05:58:53 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:30692 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752883AbcJMJ6t (ORCPT ); Thu, 13 Oct 2016 05:58:49 -0400 Date: Thu, 13 Oct 2016 12:58:06 +0300 From: Dan Carpenter To: Chris Wilson , 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: <20161013095806.GL5630@mwanda> References: <20161013085508.GJ16198@mwanda> <20161013090103.GC32528@nuc-i3427.alporthouse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161013090103.GC32528@nuc-i3427.alporthouse.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 562 Lines: 18 On Thu, Oct 13, 2016 at 10:01:03AM +0100, Chris Wilson wrote: > 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? Yeah. It does. regards, dan carpenter