Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8917556ybi; Thu, 6 Jun 2019 23:44:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwGzIEorjJEP0NWLOeWkW9+IjBCbiU5UiSC6L78WUrwfwC/fjF/GGDjlPk1OCm1zNFYkeIN X-Received: by 2002:a17:902:e48d:: with SMTP id cj13mr54679925plb.156.1559889847043; Thu, 06 Jun 2019 23:44:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559889847; cv=none; d=google.com; s=arc-20160816; b=Rlj4n4+EVVKdE/OLYav/yfbCMgBjVYKm/E2evcLoQOsK6NWX8nRysZGKrUk6840d/Q MS5zOjPggvr+PmlOGzlmbbLtqEinx6TmH4Hg7DZamwTVXf0M1w9qtT6qwFovqckLrUX7 kpVpkdkJk1uiF5RdcC6HjQIbiZTEEULojtqd17t/VXbdguXX5I43a3KeR25sVhWpgbb2 bj78PB2n35z+B5o+NgWwClT3TxnFRuyY6S/ORGW1G2YAryWMH8KmgTkgDIIShDzh7eMr Wmn4ujmFNQ/atv4K0sH2pA/SOKbvZwcmfbZhLVDQmc6v9AX3T8zDsD9XWfEYrJW3457r f9Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:cc:to:subject:dkim-signature:dkim-filter; bh=Hlws9M7BqFCoD+GZJisbwaAGPzTVT29fKD3S29duRF0=; b=oKm+zrWjM7dc9DTEXtqMQfKUwGYksu1pVvuAq/X/CEKDTxjtUg9WiZoCu40tb23dX/ ROb3LHml34wiv2Rjk7RiRzjoFZK56dupoxfZwG1qJQs2AVnbJZmItNrMVPKCKMETZYIO p4MgB09uk1j1R0PnY/tn353SghMvAIaz/wCpOPjBjMaFYtZwef2qEp1oiGrR7Iu5f483 7xswWIX2pXRJLaMgIeBUUWnKO5vQXmBRd9nuk1+l7ESKEqGmCeLHzgTL+sNIu+v3eJvf NIvpY9GdEbiNb2w2iJI04pZTdmucBykRM38ljvDo27EWWdeuT9LfzSnqweoyyn0qadZJ 6cTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=FDCrKwTk; 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=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m127si1033387pgm.231.2019.06.06.23.43.50; Thu, 06 Jun 2019 23:44:07 -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=@samsung.com header.s=mail20170921 header.b=FDCrKwTk; 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=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727450AbfFGGlb (ORCPT + 99 others); Fri, 7 Jun 2019 02:41:31 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:60772 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbfFGGlb (ORCPT ); Fri, 7 Jun 2019 02:41:31 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190607064129euoutp020eb5ee278f6a39f8db3066872f207ec0~l12h3gt0J1166211662euoutp02o for ; Fri, 7 Jun 2019 06:41:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190607064129euoutp020eb5ee278f6a39f8db3066872f207ec0~l12h3gt0J1166211662euoutp02o DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1559889689; bh=Hlws9M7BqFCoD+GZJisbwaAGPzTVT29fKD3S29duRF0=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=FDCrKwTk9+cODhpdJvj0IqfnYz1BEXyHjSM7p5/zZVlSgJyCfFXJdLtmTftxNb5Io pDJUxcZDjb7msFOl2hPAVo8BP8keTBKWrltbpoe834+UCDcsredbxhCbODEDCvLZOO tCyaC4eFmCRhzEZwnYv0NysKN1v3D2Z0v0GEqy74= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190607064128eucas1p299dc8c1ac78f8ec9b41f1bdd66a0df79~l12hM9b7G0356303563eucas1p2l; Fri, 7 Jun 2019 06:41:28 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id B3.C7.04325.8170AFC5; Fri, 7 Jun 2019 07:41:28 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190607064127eucas1p2d170e0a8df77d5385beadf5cd79a6869~l12gUzWI90152201522eucas1p2y; Fri, 7 Jun 2019 06:41:27 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190607064127eusmtrp2a71e31dcb22996583f8be1ea81a1fcc5~l12gFGCnY0254702547eusmtrp2k; Fri, 7 Jun 2019 06:41:27 +0000 (GMT) X-AuditID: cbfec7f5-b75ff700000010e5-bc-5cfa0718cafa Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 57.AC.04146.7170AFC5; Fri, 7 Jun 2019 07:41:27 +0100 (BST) Received: from [106.120.51.74] (unknown [106.120.51.74]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190607064126eusmtip1cc7d169d7ca14470ccf7d036d20bd6a6~l12fUDf171602416024eusmtip1Q; Fri, 7 Jun 2019 06:41:26 +0000 (GMT) Subject: Re: [PATCH v4 14/15] drm/bridge: tc358767: Drop unnecessary 8 byte buffer To: Andrey Smirnov , dri-devel@lists.freedesktop.org Cc: Laurent Pinchart , Tomi Valkeinen , Andrey Gusakov , Philipp Zabel , Cory Tusar , Chris Healy , Lucas Stach , linux-kernel@vger.kernel.org From: Andrzej Hajda Message-ID: <34b09b98-0770-dec0-94cf-33138c3fb9ec@samsung.com> Date: Fri, 7 Jun 2019 08:41:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190607044550.13361-15-andrew.smirnov@gmail.com> Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA02SeyyVcRjH+7238zrr1OsgT0XNydaSa0rvVtHtj7d/zNRak8WR12Uc7Lwo 1ZbRXGqRxppTjQ11hIjQwbKOzalEbuFoOph0NZYUjeR4Wf77PM/3+/yey340LjeQW+jImHhe HaOMVlBSoq517q0LSP4Eun8f3sGmZhxiU/TJJDvb20KwL5oMGNs7M0mxw/eNGJuZUyxhexru UezQh5cEW1kwSB2WcsN5ixin0wxJuLsZ+SRnumHAuOwFd84wUI9x09XbuI68dsyPDpAeDOWj IxN5tZt3sDRitOYeHvfb6qKuthglIwNzHdE0MHvhXWnAdSSl5YwWwc30IiQGPxHkmKZIMZhG 8Kmsb0mxWK7Qfn694nqIoMNYSYjBBIK+/i6J2WXFnIIRYwVmZmvGD36k6CizCWfaMEhveI+b BYrZBQs1RsrMMsYbcsf1yy0IxhG0mc3LxTbMGTC1VpGixxJe5Y8RZrZgfKDwS8My48x2SK29 i4tsC4NjBZi5GTCDEhiZeioR5z4Ojd9KSZGt4KthNW8Hi7o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2JZcWXuIUYJDmYlEd6yCz9ihHhTEiurUovy44tKc1KLDzGa Aj03kVlKNDkfmErySuINTQ3NLSwNzY3Njc0slMR5OwQOxggJpCeWpGanphakFsH0MXFwSjUw GsdvKdi+MXBWpeUJleQdU5PyHlp0fXAN1mBew2ih61PF026tu3WN8J5HE+PFD1n2XmNM6zAO i73mdPPQXyuFPj7/eK2++gXHitf49ltEfFhgaNvN+9HhxKmVk+defJq4LsN18o9zs4tePNyt Jl56f+EUnjd9STKPmjaumv9lVuCFPb+5DgqkKbEUZyQaajEXFScCAGcw1F7tAgAA X-CMS-MailID: 20190607064127eucas1p2d170e0a8df77d5385beadf5cd79a6869 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190607044652epcas1p1b357013f14ae5bebe6300d35c0abe891 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190607044652epcas1p1b357013f14ae5bebe6300d35c0abe891 References: <20190607044550.13361-1-andrew.smirnov@gmail.com> <20190607044550.13361-15-andrew.smirnov@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07.06.2019 06:45, Andrey Smirnov wrote: > 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  -- Regards Andrzej > 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 e747f10021e3..4a245144aa83 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,