[PATCH v4 15/15] drm/bridge: tc358767: Replace magic number in tc_main_link_enable()

Andrey Smirnov andrew.smirnov at gmail.com
Fri Jun 7 04:45:50 UTC 2019


We don't need 8 byte array, DP_LINK_STATUS_SIZE (6) should be
enough. This also gets rid of a magic number as a bonus.

Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
Cc: Andrzej Hajda <a.hajda at samsung.com>
Cc: Laurent Pinchart <Laurent.pinchart at ideasonboard.com>
Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
Cc: Andrey Gusakov <andrey.gusakov at cogentembedded.com>
Cc: Philipp Zabel <p.zabel at pengutronix.de>
Cc: Cory Tusar <cory.tusar at zii.aero>
Cc: Chris Healy <cphealy at gmail.com>
Cc: Lucas Stach <l.stach at pengutronix.de>
Cc: dri-devel at lists.freedesktop.org
Cc: linux-kernel at vger.kernel.org
---
 drivers/gpu/drm/bridge/tc358767.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index 4a245144aa83..05c5fab011f8 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -874,7 +874,7 @@ static int tc_main_link_enable(struct tc_data *tc)
 	u32 dp_phy_ctrl;
 	u32 value;
 	int ret;
-	u8 tmp[8];
+	u8 tmp[DP_LINK_STATUS_SIZE];
 
 	dev_dbg(tc->dev, "link enable\n");
 
-- 
2.21.0



More information about the dri-devel mailing list