From patchwork Mon Jun 27 20:44:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 922372 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5RKnq0p019681 for ; Mon, 27 Jun 2011 20:50:17 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E318F9E91F for ; Mon, 27 Jun 2011 13:49:51 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from services.gcu-squad.org (zone0.gcu-squad.org [212.85.147.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 6FF929E747 for ; Mon, 27 Jun 2011 13:49:43 -0700 (PDT) Received: from jdelvare.pck.nerim.net ([62.212.121.182] helo=endymion.delvare) by services.gcu-squad.org (GCU Mailer Daemon) with esmtpsa id 1QbJtZ-0008SB-Te (TLSv1:AES128-SHA:128) (envelope-from ) ; Tue, 28 Jun 2011 00:03:06 +0200 Date: Mon, 27 Jun 2011 22:44:42 +0200 From: Jean Delvare To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/radeon/kms: Shorten buffers in radeon_ddc_probe Message-ID: <20110627224442.4390f35d@endymion.delvare> X-Mailer: Claws Mail 3.7.5 (GTK+ 2.20.1; x86_64-unknown-linux-gnu) Mime-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 27 Jun 2011 20:50:17 +0000 (UTC) No need for 2-byte buffers, we only send one byte and receive one byte. Signed-off-by: Jean Delvare Cc: David Airlie Cc: Alex Deucher --- drivers/gpu/drm/radeon/radeon_i2c.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --- linux-3.0-rc4.orig/drivers/gpu/drm/radeon/radeon_i2c.c 2011-06-27 15:39:33.000000000 +0200 +++ linux-3.0-rc4/drivers/gpu/drm/radeon/radeon_i2c.c 2011-06-27 15:40:35.000000000 +0200 @@ -34,21 +34,20 @@ */ bool radeon_ddc_probe(struct radeon_connector *radeon_connector) { - u8 out_buf[] = { 0x0, 0x0}; - u8 buf[2]; + u8 out = 0x0, in; int ret; struct i2c_msg msgs[] = { { .addr = 0x50, .flags = 0, .len = 1, - .buf = out_buf, + .buf = &out, }, { .addr = 0x50, .flags = I2C_M_RD, .len = 1, - .buf = buf, + .buf = &in, } };