Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5407233ybi; Wed, 12 Jun 2019 01:55:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMZjNVP3h1eigYox4puQQwZRyFrVxS9LX+YQ4jl6HtF4Z6dnnDXdNTs2cDoohqmcAiNF/n X-Received: by 2002:a62:3287:: with SMTP id y129mr28780995pfy.251.1560329709591; Wed, 12 Jun 2019 01:55:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560329709; cv=none; d=google.com; s=arc-20160816; b=RHCrOcSDImeD4nJ+6MOdGZXtbHyCl2MlZG80xzhL0aSBlNpGIVhqmKUe1uHtNRtdm2 9AyR6B6X5QvSm1caTUv/etB+9oKl0Vbl3kHxQZuNNlyj51I+e0NmhH6l8nrxmZGCe4OL dF7LZZb63VPeORpmtSpJHMs/TOgWAHKEMd7whv+hiTZ5qMYe4Uax8hR/4IwYRiUcie6y 439AvQwwUx5iuvNF6NWO75JsC5u6b6NOqNHEP919EyGgOIibz0Wj+i+SZ7ayr7E+Ji5V ndmh0ZM848iSV4gprJfJCXy+RHbbawyZhrD86tBQ7F8mIJNMIZMb5rjl9twY/SW8/ZST nqCw== 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=tyNFZYwRtJTUSjA/j/X46P0EDgr7MIqfAVin85AHqAI=; b=Tqh5iPswPPCVu40oP1Fbd+Kf+DFELBewsMmUqYyAbTL1SUMS5PcQ1Eo9N271idQmcX exIypCAHTS/tFl5dSxXJymz5mFUOi8egAN0k5+wLKXNlhUociytIJyduNzDjt+DVv29B +dwL6qJ/7r8M7D7frXRCCai3bUDi2qKc84hZX7PyzqAOk50sPKnajWzAnZ8KVExtY3ex MT2J0rhS8QGnlZSmUt/A/6DsgKpBJBzGZV2ZgIZx37sQn1htUfBZBUm4CKLUQos1jB8A DjGqSEY+eBQG/WYKmUf/7kUnby2LM8o4F/9FYuu7oMnxyOx7kNyM4i9FJo+A3dKiL0Nj TSPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NwFHJ1ZU; 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 j4si9671640pgh.209.2019.06.12.01.54.54; Wed, 12 Jun 2019 01:55:09 -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=NwFHJ1ZU; 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 S2408664AbfFLId3 (ORCPT + 99 others); Wed, 12 Jun 2019 04:33:29 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:36331 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408658AbfFLId1 (ORCPT ); Wed, 12 Jun 2019 04:33:27 -0400 Received: by mail-pl1-f195.google.com with SMTP id d21so6337471plr.3 for ; Wed, 12 Jun 2019 01:33:27 -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=tyNFZYwRtJTUSjA/j/X46P0EDgr7MIqfAVin85AHqAI=; b=NwFHJ1ZUWon7SC/JBcHFqHY051wqR07OEucDIeCaZGA8LF72pnQkrBT/x5hUhw3VQg Z+RSeejCeRkBA4ZUkROJlYa9AS9yFz0aTj/lPr2kE+Zht6m5IUpFFRgX94Jl3yAYHNdd 0MVsYoA6+UvOXs7g1t75Uz36W+z+KJqH6dexsuYTuoCEk/7rY83nA4Dr7UdskONtbpCl O/xKuzTds5M1p8ytbTb2D4WGr9MKOGf0y7SH5199K3rIG8B/xVMPW/hukMc6oi0svIpB 9gtHXr22GyGVMzwsnvR+shi5WUzI+FRysYEbzFuYJDln4wTb5lbftZxlG1JYHKtOw0Xn KSpg== 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=tyNFZYwRtJTUSjA/j/X46P0EDgr7MIqfAVin85AHqAI=; b=mGgEYRKOdroEJbxKyyiLsF8gmj9plxDeqIAbgqQeOJ7bZNLSV/YfhtZ7CLViNI7qto kba/U1HMNRiJzaA7liglVUxhgJGiOU0MU8zW8uKeufObPT5lrouuR6WacIMqffmQs51k PCmMz1AZCmeYABzk46Q1jRPJH4zVKJNCC2W40qwBhPoerz3StOHf5A1EsXuRvuH06Tie jYXl2z90y7bkxOLdttQd3eai9iGXbw317RR6Ift6QZMNNqpy8yKYlYKRyKKmwYTRdPmH W8HGUU8o9Px8hCmj/BufhsSy0Kgk5ekTM/RnLVc+MPnl+JH43P6GwtOjkVVEwYDjj3p4 tVZw== X-Gm-Message-State: APjAAAVd+4j91vh7CU3LVuY7CSl1BDJ3WMfrKL5AZFjSC8FICV/DqRgX SlzP8O89uP8SSP+j8ZE3J5c= X-Received: by 2002:a17:902:6ac6:: with SMTP id i6mr66641679plt.233.1560328407157; Wed, 12 Jun 2019 01:33:27 -0700 (PDT) Received: from localhost.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id d21sm18845991pfr.162.2019.06.12.01.33.25 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 12 Jun 2019 01:33:26 -0700 (PDT) From: Andrey Smirnov To: dri-devel@lists.freedesktop.org Cc: Andrey Smirnov , Andrzej Hajda , Laurent Pinchart , Tomi Valkeinen , Andrey Gusakov , Philipp Zabel , Cory Tusar , Chris Healy , Lucas Stach , linux-kernel@vger.kernel.org Subject: [PATCH v5 14/15] drm/bridge: tc358767: Drop unnecessary 8 byte buffer Date: Wed, 12 Jun 2019 01:32:51 -0700 Message-Id: <20190612083252.15321-15-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190612083252.15321-1-andrew.smirnov@gmail.com> References: <20190612083252.15321-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 Reviewed-by: Andrzej Hajda Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Tomi Valkeinen Cc: Andrey Gusakov Cc: Philipp Zabel Cc: Cory Tusar 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 01ca92a6d9c8..81ed359487c7 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -661,8 +661,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); @@ -678,21 +677,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.21.0