From patchwork Sun Jun 12 13:21:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 12878705 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0819AC43334 for ; Sun, 12 Jun 2022 13:22:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C1E4A10E36C; Sun, 12 Jun 2022 13:22:15 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by gabe.freedesktop.org (Postfix) with ESMTPS id B566A10E371 for ; Sun, 12 Jun 2022 13:22:14 +0000 (UTC) Received: from tr.lan (ip-86-49-12-201.net.upcbroadband.cz [86.49.12.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 4CF56841D6; Sun, 12 Jun 2022 15:22:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1655040132; bh=+xKiwQAc3M/tzMg5PzVhJtSVC9/b8cS977o1kmCO1c4=; h=From:To:Cc:Subject:Date:From; b=SWcXVXTaJ0Toq21ExwsE0yrQpj/fcP/AKrJwuQYi66QmGLdCOFLPsEX9Z6SYC4SLj lPEcbPKireBVHrIdK4BTmj4BHJQ9xvk7lcnlvQdOv8hgD4X/iSUqngBkiuq98x8Ild 1URyKQPqer1duh62Kj5ABJPjzuM1dIxzRguhdQ9fZW68HcTnrlU5DRFI9wnHoahyna OXXYvny5ykCG+cfzqi//lv5d+OM9xHYhScv+KWTDxLjSGblUdeF6/azfAoNhe4TWuH BAkvUazn/r4LIXC0JmgIR4B3y/yzqFqnfs5e1bCqJxSPFPTUA4Punf/1rEkZiRd97k ATjpW/kTGlxhg== From: Marek Vasut To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/3] drm: of: Mark empty drm_of_get_data_lanes_count and drm_of_get_data_lanes_ep static Date: Sun, 12 Jun 2022 15:21:50 +0200 Message-Id: <20220612132152.91052-1-marex@denx.de> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , kernel test robot , Maxime Ripard , robert.foss@linaro.org, Laurent Pinchart , Andrzej Hajda , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Mark empty implementations of drm_of_get_data_lanes_count and drm_of_get_data_lanes_ep as static inline, just like the rest of empty implementations of various functions in drm_of.h . Add missing comma to drm_of_get_data_lanes_count_ep() . Fixes: fc801750b197 ("drm: of: Add drm_of_get_data_lanes_count and drm_of_get_data_lanes_ep") Reported-by: kernel test robot Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Acked-by: Sam Ravnborg Reviewed-by: Laurent Pinchart --- include/drm/drm_of.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index 92387eabcb6f0..10ab58c407467 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h @@ -112,16 +112,18 @@ drm_of_lvds_get_data_mapping(const struct device_node *port) return -EINVAL; } -int drm_of_get_data_lanes_count(const struct device_node *endpoint, - const unsigned int min, const unsigned int max) +static inline int +drm_of_get_data_lanes_count(const struct device_node *endpoint, + const unsigned int min, const unsigned int max) { return -EINVAL; } -int drm_of_get_data_lanes_count_ep(const struct device_node *port, - int port_reg, int reg - const unsigned int min, - const unsigned int max) +static inline int +drm_of_get_data_lanes_count_ep(const struct device_node *port, + int port_reg, int reg, + const unsigned int min, + const unsigned int max) { return -EINVAL; } From patchwork Sun Jun 12 13:21:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 12878707 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0A000C433EF for ; Sun, 12 Jun 2022 13:22:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5438B10E32E; Sun, 12 Jun 2022 13:22:18 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by gabe.freedesktop.org (Postfix) with ESMTPS id ABBCF10E36C for ; Sun, 12 Jun 2022 13:22:14 +0000 (UTC) Received: from tr.lan (ip-86-49-12-201.net.upcbroadband.cz [86.49.12.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id B74C68441A; Sun, 12 Jun 2022 15:22:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1655040133; bh=/uMkAREEyFL5fNhBsokObfv/Ik4lTHRXziN6JFpJnVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I2/2BEv/kFbSAeOZ8yqAZc12TudI99cdGifFBvWMdiAECF7EE0liwjy87i2nQd9Eo gQfTVY+8KQNOH+0ZV5w488kerk46O2m4G1by8Bnj/ZyhgQciFpPdjPsdvf6IlUkFXD m5/1wbMYyjR1SnZZ0jvAMiDceVLJMp3yN/Y4dvSkWhLi/Y2YRJ1uxA9e8AUYeKcC8p gAsNOaF/BRCLkAWgqiTNdsf41p6SFBfq08pPFC4gWb7iLJ5nEkLciO6E2IIw/eFkBz l8YUUQLkq42XSf69lZ/hx8mWuRqPo8DKXbom8orbOiHpShgj/2OAc4rrE5dMDlhQsv /ziPd89KJYD+A== From: Marek Vasut To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/3] drm/bridge: tc358775: Fix drm_of_get_data_lanes_count_ep conversion Date: Sun, 12 Jun 2022 15:21:51 +0200 Message-Id: <20220612132152.91052-2-marex@denx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220612132152.91052-1-marex@denx.de> References: <20220612132152.91052-1-marex@denx.de> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , kernel test robot , Maxime Ripard , robert.foss@linaro.org, Laurent Pinchart , Andrzej Hajda , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Initialize dsi_lanes to -1, so that in case the endpoint is missing, probe would fail as it did before the conversion, instead of depending on uninitialized variable and thus undefined behavior. Fixes: 56426faa1492 ("drm/bridge: tc358775: Convert to drm_of_get_data_lanes_count_ep") Reported-by: kernel test robot Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Acked-by: Sam Ravnborg --- drivers/gpu/drm/bridge/tc358775.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c index 5b1fb8e2f9a7d..e5d00a6e7880b 100644 --- a/drivers/gpu/drm/bridge/tc358775.c +++ b/drivers/gpu/drm/bridge/tc358775.c @@ -529,7 +529,7 @@ static int tc358775_parse_dt(struct device_node *np, struct tc_data *tc) struct device_node *endpoint; struct device_node *parent; struct device_node *remote; - int dsi_lanes; + int dsi_lanes = -1; /* * To get the data-lanes of dsi, we need to access the dsi0_out of port1 From patchwork Sun Jun 12 13:21:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 12878706 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 24543C433EF for ; Sun, 12 Jun 2022 13:22:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5C37E10E371; Sun, 12 Jun 2022 13:22:18 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0117010E36C for ; Sun, 12 Jun 2022 13:22:14 +0000 (UTC) Received: from tr.lan (ip-86-49-12-201.net.upcbroadband.cz [86.49.12.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 18BDB8441D; Sun, 12 Jun 2022 15:22:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1655040133; bh=XGli3u2d7ZpdAcHpT03JTCw0BnJmNRM/hdnwYzPrjLw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LBfIa+Qgsc2zUGrgfFTBH45Th3cHtDrF2ZAKT2mbhbG4QEfw9PNi22R23GhSmkOaB 76nnqxWnwqDnkW+RiJp6V+BG4qXdaYKzgK+5yihyVQY6WpR9ZUuDMv7cBdW6C9QBt4 f3wSToCAebR2J83LotlytbWjf3cypMeSQ7KMF2UquRnXnbHOFaC8iqI90lsxkBNLW/ maZF7v51bOLTRxGKFFsPIDJqd4rh97CUdJe8c07212AcRhCIKadZCgl8tdsQphCCIN bOUZYp5NN2A0kMGdIJdwL5A8lZnRF5u7K4DmSyapbMat1Fe9v+qaOKtDT924EIbpiR ldw39TMnuEcvw== From: Marek Vasut To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/3] drm/bridge: rcar: Drop unused variables due to drm_of_get_data_lanes_count_ep Date: Sun, 12 Jun 2022 15:21:52 +0200 Message-Id: <20220612132152.91052-3-marex@denx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220612132152.91052-1-marex@denx.de> References: <20220612132152.91052-1-marex@denx.de> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , kernel test robot , Maxime Ripard , robert.foss@linaro.org, Laurent Pinchart , Andrzej Hajda , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The rcar_mipi_dsi_parse_dt() now contains two uninitialized variables due to conversion to common drm_of_get_data_lanes_count_ep() helper. Drop them. Fixes: d643daaf1694 ("drm/bridge: rcar: Convert to drm_of_get_data_lanes_count_ep") Reported-by: kernel test robot Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Acked-by: Sam Ravnborg --- drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c b/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c index 67dce337098a5..31ed285073e0f 100644 --- a/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c +++ b/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c @@ -679,8 +679,6 @@ static const struct mipi_dsi_host_ops rcar_mipi_dsi_host_ops = { static int rcar_mipi_dsi_parse_dt(struct rcar_mipi_dsi *dsi) { - struct device_node *ep; - u32 data_lanes[4]; int ret; ret = drm_of_get_data_lanes_count_ep(dsi->dev->of_node, 1, 0, 1, 4);