Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6401006ybi; Wed, 5 Jun 2019 00:07:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPyajhCIKtMuYPqMaogLSPiqzh+9hCw64PS+l9szg/fc88LfjMUhyz5o3/hKIYvw/dbdX3 X-Received: by 2002:a63:5443:: with SMTP id e3mr2407277pgm.265.1559718466514; Wed, 05 Jun 2019 00:07:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559718466; cv=none; d=google.com; s=arc-20160816; b=wJTRf2J+BVugHogVqcvydYda9OiwFaCYuJG/Fc5X6VA4XXKlxGInT9oKIKB5Ji8Pk5 fbmPJce18R1ZrHlyjFx4lzsJ/pd3kXamVP95ZsAhUgWfZywLnsdDbhT1lGjNkDiLgMlS nbLUY3N65gq9xKUOpebTjyyxujGv/NeyaNqX73ayYt8JD80DCp6zeo1VT3QgYnjplGSL Yga6qB2hnHwbjZ+buFKvfSYpccBOdyQY8WLzElkDzByBs5CvG1vW8kVg9vL3veEF1Ofd zJajGZjsCKkiJC/XMYCUOpbL5MPcUOf0c8tSaMsR4B40r5gquUESC7F/SNR6UEwKcuf/ l0pQ== 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=hrkvpzIdMBYR+6B1XOi5qDamesEvOXiYhYzlfg/ShYA=; b=oqdYGwN3ySc3RgjdVMdAVZYw0UmqxhtW4h5y51uon8K85C9KLZcUqYUtlbcKvhA5dK 3Uhz0LPIzMrGpsGrI+/2XFSC9RXXAzZ5QYokbK1oTKlBvGiBj5UHEAAWg2sojfNRjAjg LTaHPOjHBvk/DE3UJXCDFIJF3kd8YOIYjRtkFmE/lWbWmx4oHgaS//WiczHaCU1OO/87 9V6/HrVFJU1RsKQ5eiUoGeamY8o4sNUQs6/KIQqKqheHxq5THTfpfpDxkcjrIiSTyuMG KC/hQEqVa+K6SDdTeso83O+7RF0iZ6Q5sWyM4tVDhlFbYtA7H+uyIKkTpZS7MTFz0u41 szQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cEQU5N1u; 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 b184si666414pfa.227.2019.06.05.00.07.29; Wed, 05 Jun 2019 00:07:46 -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=cEQU5N1u; 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 S1726949AbfFEHF4 (ORCPT + 99 others); Wed, 5 Jun 2019 03:05:56 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:44860 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726876AbfFEHFp (ORCPT ); Wed, 5 Jun 2019 03:05:45 -0400 Received: by mail-pg1-f195.google.com with SMTP id n2so11864411pgp.11 for ; Wed, 05 Jun 2019 00:05:45 -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=hrkvpzIdMBYR+6B1XOi5qDamesEvOXiYhYzlfg/ShYA=; b=cEQU5N1uQTnf8WgA53Bsfw4aItgE0b7ohuBZXIsACGEzWjpuZOA5nXhdaE12lTADC0 nFtadpYhSPGFC61TAqneAppwg7sTOPYLwBuKHiV5mqs9Lr3LxXf5EkN/0OHAf4MMlROP hZPX/I50VIJVyuxT9PhVStp1EQRwc1YXciLzlcbRcejHKp3m6vVBAq7cLLzfU5GZkXg+ QicBleD9b18ww0oIO6S/xb5zW0jELkZa/YZhcKDYOFTarQnFP8F4chPj4vo3+iBCl8vt ycPPgbRgLI/s7KdZRiNaat80Z2i4Hu/m0x3kTu7KkdMcsE2gaG5R9FyyxFFOXroLDxgC m8aw== 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=hrkvpzIdMBYR+6B1XOi5qDamesEvOXiYhYzlfg/ShYA=; b=CNbafwPogX+bFg4Z/K+cZweGoNAtOyRt286J5/tvN+BRBeynBsO9PdOeg1u1z0HBLc kRG/2NW/77bcDbdzM4bSNqFpa42aJoMGKrcQEJLCdSwlqvUyBQDJ9yvnQOwU/QgB7SUv hnpYUdV749E1inXxgYucd7Nm2B551EuH6fIaZBmrw1+SLNO99dzOJBTHs1i6Br4e7E+i micoPvCZeE+IP7Uvdfgyre0uPXF62g8WeLkS7+dyJOmx3rWRdC7wD7TtgdvB/gANElgU pPt69iY9xX1oxB7r4MTj2R5O48p/mec/9M2cLe0KjZ2/IRD5af5sNUxRISYNP9eUkbB0 UPlw== X-Gm-Message-State: APjAAAVtzcZ9gQXFhT7m5rog6R2JoC5ii9z+BhNhVPwaOHGt4iNb8KnW S7iLJ/jW/cArSRxokT0dqAg= X-Received: by 2002:a63:1d5c:: with SMTP id d28mr2428121pgm.10.1559718344605; Wed, 05 Jun 2019 00:05:44 -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 d132sm6527348pfd.61.2019.06.05.00.05.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Jun 2019 00:05:43 -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 , Cory Tusar , Chris Healy , Lucas Stach , linux-kernel@vger.kernel.org Subject: [PATCH v3 14/15] drm/bridge: tc358767: Drop unnecessary 8 byte buffer Date: Wed, 5 Jun 2019 00:05:06 -0700 Message-Id: <20190605070507.11417-15-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190605070507.11417-1-andrew.smirnov@gmail.com> References: <20190605070507.11417-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: 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 4fe7641f84ee..41a976dff13b 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -680,8 +680,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); @@ -697,21 +696,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