Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp284438img; Thu, 21 Mar 2019 20:30:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFeIiH7Uj9/HAN/QwklY5AKXlX4wGFlNwMDS4vnnurjiopIGnvr71m5rRTreP5l7uhcV8N X-Received: by 2002:a17:902:7242:: with SMTP id c2mr7030426pll.245.1553225455118; Thu, 21 Mar 2019 20:30:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553225455; cv=none; d=google.com; s=arc-20160816; b=thdm1htwZXhzzBfOOUu+DBfRGos65787Mruy+1lfY8FpI7FXX7cY+v2Hb2jqhv9rVf HwRF3r89+jV6TisXatf1PmNd0OHC/rNVfnGxaFwLreWhMAv4VAViko3rlkV8vHZqIvU9 tXXobcGmBWZfucnY7emOuZq4BZr2OUWdLvlk5oVYAkdOyOce78y1m0yI9xnATdF13C6S M8SpiNta6JAvLrjyQY97OIP76YqTNdzL5muVVLHRhte7URounQfOl0Rn6oh4OQHoaCx2 5AcyCJJ0xL8WdypSTDRf24lTM0khFEB2b47AhPPqrHcIap9pASNXWhkTMA8bxr3DG9mL JsdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=U2pUVl85WTK27TjuFsywFRLpzvqMpXhlPibWJ+DDAXE=; b=GAw7bw4l5HiDxehCTHSncB0/hLIEfKmkR/ea8sIIB0nVpuboD8MaIZ18VG3X6GJ4e3 RlxxM1nsnKUDAxQo6gdKkvEZ3GKrlVuHDhAeQqTpLHc8eMwFjYzfo9JSNUTyAMHDVWKy lbgd857ofOrsNM3YVqFFabIvyezs6wHRxV86J5DoD6YSd+7ySRHCISgyEALeS69Ov1Mv tXVEI0CVtSc+luK/G0h6WmQMiRL/E4QpYSpDWtOG7tjdC8fsDGYRHOIO6equMBplSFiW 5ZEfT8BlzNRRKpaleccDwit8cDDVEE+MCSJw3d8I5+3reWd5oH2VHX1zNIkqeNzXro9Q E/tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y6l7lu8W; 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 j188si5783026pfb.75.2019.03.21.20.30.37; Thu, 21 Mar 2019 20:30:55 -0700 (PDT) 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=Y6l7lu8W; 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 S1727769AbfCVD3g (ORCPT + 99 others); Thu, 21 Mar 2019 23:29:36 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:33104 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727750AbfCVD3f (ORCPT ); Thu, 21 Mar 2019 23:29:35 -0400 Received: by mail-pf1-f193.google.com with SMTP id i19so551317pfd.0 for ; Thu, 21 Mar 2019 20:29:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U2pUVl85WTK27TjuFsywFRLpzvqMpXhlPibWJ+DDAXE=; b=Y6l7lu8WDnNblQcW320Lc/MAAmqLRFPcHr4H0wAUI19FU5whViPeIMu61YW0eoLoWX n0/xZK42iLTuX02jmb7RTkFf0cKtvW4M2t/GjlS92uWVLVldaqxzV6LkVuza5TVlfP8s bHNJRDQxbFadDQ2pzAv6Qiy1RZn9kEOtoEYDX4A+vsyuXNoAue+gH1HKZf1a9KBN0AXT ShAPVHzVLeEK6Eb8YL+eDfHRZUCBLI48C45ESjDNm2DveiD8wvmUw8gsZ95btWo7p2AZ JgUS54t/yUwSN79jX8cdmS+himUmkEtD/uzBNBmVn3Fd7q4CQz+YfhpRWdWZks3eWWb1 pYOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=U2pUVl85WTK27TjuFsywFRLpzvqMpXhlPibWJ+DDAXE=; b=boNhbPquBfVFaFqzz+ruGhq+6GEnE0008XlN7s7pT5LwLoyi/ScfmkBm3CR3fuFWnh 5h02oFVV3v+JPRW03SXQHRgBWg/bivhID/Kdv9LX2PdvJmoWXq3UsC5tAqzDSySdTbHY eQBORqdTQKxeyzpFfrEgVJdpOL2ZN8cPmhBvGCyHKLWtApIK4MTYY8RxcU0yElEqSKsC DT3OVLuS6E8MNp8JvazKskCkl07Y01EkpO8mafd8O5cEsAjQseA6IxnYUMInGOQ24iw8 p+dG7F17A4ZK+lagOFPWoJHsrVyPEBd/ur7iKEr0seTEMQ+x8un4FoHYY/Ap6CcJLjaH +NyA== X-Gm-Message-State: APjAAAXBKLhQ+xNA2xdnNKep4LjLBdw5aZ/6lKfqMWLdJCqsZEkCP0Qv WtAouvhz7iE3TqHm4ZxDHVQ= X-Received: by 2002:a65:6489:: with SMTP id e9mr6682897pgv.260.1553225374020; Thu, 21 Mar 2019 20:29:34 -0700 (PDT) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id o76sm16154476pfa.156.2019.03.21.20.29.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Mar 2019 20:29:33 -0700 (PDT) From: Andrey Smirnov To: dri-devel@lists.freedesktop.org Cc: Andrey Smirnov , Archit Taneja , Andrzej Hajda , Laurent Pinchart , Tomi Valkeinen , Andrey Gusakov , Philipp Zabel , Chris Healy , Lucas Stach , linux-kernel@vger.kernel.org Subject: [PATCH v2 14/15] drm/bridge: tc358767: Drop unnecessary 8 byte buffer Date: Thu, 21 Mar 2019 20:29:00 -0700 Message-Id: <20190322032901.12045-15-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190322032901.12045-1-andrew.smirnov@gmail.com> References: <20190322032901.12045-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tc_get_display_props() never reads more than a byte via AUX, so there's no need to reserve 8 for that purpose. No function change intended. Signed-off-by: Andrey Smirnov Cc: Archit Taneja Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Tomi Valkeinen Cc: Andrey Gusakov Cc: Philipp Zabel Cc: Chris Healy Cc: Lucas Stach Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org --- drivers/gpu/drm/bridge/tc358767.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 07d568761463..b106e6181a5f 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -664,8 +664,7 @@ static int tc_aux_link_setup(struct tc_data *tc) static int tc_get_display_props(struct tc_data *tc) { int ret; - /* temp buffer */ - u8 tmp[8]; + u8 reg; /* Read DP Rx Link Capability */ ret = drm_dp_link_probe(&tc->aux, &tc->link.base); @@ -681,21 +680,21 @@ static int tc_get_display_props(struct tc_data *tc) tc->link.base.num_lanes = 2; } - ret = drm_dp_dpcd_readb(&tc->aux, DP_MAX_DOWNSPREAD, tmp); + ret = drm_dp_dpcd_readb(&tc->aux, DP_MAX_DOWNSPREAD, ®); if (ret < 0) goto err_dpcd_read; - tc->link.spread = tmp[0] & DP_MAX_DOWNSPREAD_0_5; + tc->link.spread = reg & DP_MAX_DOWNSPREAD_0_5; - ret = drm_dp_dpcd_readb(&tc->aux, DP_MAIN_LINK_CHANNEL_CODING, tmp); + ret = drm_dp_dpcd_readb(&tc->aux, DP_MAIN_LINK_CHANNEL_CODING, ®); if (ret < 0) goto err_dpcd_read; tc->link.scrambler_dis = false; /* read assr */ - ret = drm_dp_dpcd_readb(&tc->aux, DP_EDP_CONFIGURATION_SET, tmp); + ret = drm_dp_dpcd_readb(&tc->aux, DP_EDP_CONFIGURATION_SET, ®); if (ret < 0) goto err_dpcd_read; - tc->link.assr = tmp[0] & DP_ALTERNATE_SCRAMBLER_RESET_ENABLE; + tc->link.assr = reg & DP_ALTERNATE_SCRAMBLER_RESET_ENABLE; dev_dbg(tc->dev, "DPCD rev: %d.%d, rate: %s, lanes: %d, framing: %s\n", tc->link.base.revision >> 4, tc->link.base.revision & 0x0f, -- 2.20.1