diff for duplicates of <cbbdc53ea47f0e7ea02fc7d197664819958ea2cd.camel@mediatek.com> diff --git a/N1/2.bin b/N1/2.bin new file mode 100644 index 0000000..b9e28df --- /dev/null +++ b/N1/2.bin @@ -0,0 +1,129 @@ +<html><body><p> +<pre> +Hi, Angelo: + +On Mon, 2025-01-13 at 15:52 +0100, AngeloGioacchino Del Regno wrote: +> External email : Please do not click links or open attachments until you have verified the sender or the content. +>  +>  +> Change error prints to use dev_err_probe() instead of dev_err() +> where possible in function mtk_hdmi_dt_parse_pdata(), used only +> during device probe. +> While at it, also beautify some prints. + +I think you have do two things. +The first one is "Use dev_err_probe() in mtk_hdmi_dt_parse_pdata()" as the title says. +The second one is "beautify some prints". + +The title does not mention the second one, so I think the second one is not related to this patch. +You think some refinement is not worth to be a patch. +If it's not worth, maybe we should keep them as they are. +Or you could collect all refinement into one refinement patch, and this would looks worth. + +Regards, +CK + +>  +> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> +> --- +>  drivers/gpu/drm/mediatek/mtk_hdmi.c | 34 ++++++++++------------------- +>  1 file changed, 11 insertions(+), 23 deletions(-) +>  +> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c +> index 65e9629b6b77..48c37294dcbb 100644 +> --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c +> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c +> @@ -1372,30 +1372,23 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, +>  { +>         struct device *dev = &pdev->dev; +>         struct device_node *np = dev->of_node; +> -       struct device_node *cec_np, *remote, *i2c_np; +> +       struct device_node *remote, *i2c_np; +>         struct platform_device *cec_pdev; +>         struct regmap *regmap; +>         int ret; +>  +>         ret = mtk_hdmi_get_all_clk(hdmi, np); +> -       if (ret) { +> -               if (ret != -EPROBE_DEFER) +> -                       dev_err(dev, "Failed to get clocks: %d\n", ret); +> - +> -               return ret; +> -       } +> +       if (ret) +> +               return dev_err_probe(dev, ret, "Failed to get clocks\n"); +>  +>         /* The CEC module handles HDMI hotplug detection */ +>         cec_np = of_get_compatible_child(np->parent, "mediatek,mt8173-cec"); +> -       if (!cec_np) { +> -               dev_err(dev, "Failed to find CEC node\n"); +> -               return -EINVAL; +> -       } +> +       if (!cec_np) +> +               return dev_err_probe(dev, -EINVAL, "Failed to find CEC node\n"); +>  +>         cec_pdev = of_find_device_by_node(cec_np); +>         if (!cec_pdev) { +> -               dev_err(hdmi->dev, "Waiting for CEC device %pOF\n", +> -                       cec_np); +> +               dev_err(hdmi->dev, "Waiting for CEC device %pOF\n", cec_np); +>                 of_node_put(cec_np); +>                 return -EPROBE_DEFER; +>         } +> @@ -1413,9 +1406,8 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, +>         if (IS_ERR(regmap)) +>                 ret = PTR_ERR(regmap); +>         if (ret) { +> -               dev_err(dev, +> -                       "Failed to get system configuration registers: %d\n", +> -                       ret); +> +               dev_err_probe(dev, ret, +> +                             "Failed to get system configuration registers\n"); +>                 goto put_device; +>         } +>         hdmi->sys_regmap = regmap; +> @@ -1443,20 +1435,16 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, +>         } +>  +>         i2c_np = of_parse_phandle(remote, "ddc-i2c-bus", 0); +> +       of_node_put(remote); +>         if (!i2c_np) { +> -               dev_err(dev, "Failed to find ddc-i2c-bus node in %pOF\n", +> -                       remote); +> -               of_node_put(remote); +> -               ret = -EINVAL; +> +               ret = dev_err_probe(dev, -EINVAL, "No ddc-i2c-bus in connector\n"); +>                 goto put_device; +>         } +> -       of_node_put(remote); +>  +>         hdmi->ddc_adpt = of_find_i2c_adapter_by_node(i2c_np); +>         of_node_put(i2c_np); +>         if (!hdmi->ddc_adpt) { +> -               dev_err(dev, "Failed to get ddc i2c adapter by node\n"); +> -               ret = -EINVAL; +> +               ret = dev_err_probe(dev, -EINVAL, "Failed to get ddc i2c adapter by node\n"); +>                 goto put_device; +>         } +>  +> -- +> 2.47.0 +>  + + +</pre> +</p></body></html><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice + ******************** +The information contained in this e-mail message (including any +attachments) may be confidential, proprietary, privileged, or otherwise +exempt from disclosure under applicable laws. It is intended to be +conveyed only to the designated recipient(s). Any use, dissemination, +distribution, printing, retaining or copying of this e-mail (including its +attachments) by unintended recipient(s) is strictly prohibited and may +be unlawful. If you are not an intended recipient of this e-mail, or believe + +that you have received this e-mail in error, please notify the sender +immediately (by replying to this e-mail), delete any and all copies of +this e-mail (including any attachments) from your system, and do not +disclose the content of this e-mail to any other person. Thank you! +</pre><!--}--> diff --git a/N1/2.hdr b/N1/2.hdr new file mode 100644 index 0000000..da1f671 --- /dev/null +++ b/N1/2.hdr @@ -0,0 +1,3 @@ +Content-Type: text/html; + charset="utf-8" +Content-Transfer-Encoding: base64 diff --git a/a/content_digest b/N1/content_digest index 69157ef..943bd3c 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -29,7 +29,7 @@ matthias.bgg@gmail.com <matthias.bgg@gmail.com> " Jason-JH Lin (\346\236\227\347\235\277\347\245\245) <Jason-JH.Lin@mediatek.com>" " junzhi.zhao@mediatek.com <junzhi.zhao@mediatek.com>\0" - "\00:1\0" + "\01:1\0" "b\0" "Hi, Angelo:\n" "\n" @@ -140,5 +140,136 @@ "> --\n" "> 2.47.0\n" > + "\01:2\0" + "b\0" + "<html><body><p>\r\n" + "<pre>\r\n" + "Hi, Angelo:\r\n" + "\r\n" + "On Mon, 2025-01-13 at 15:52 +0100, AngeloGioacchino Del Regno wrote:\r\n" + "> External email : Please do not click links or open attachments until you have verified the sender or the content.\r\n" + "> \r\n" + "> \r\n" + "> Change error prints to use dev_err_probe() instead of dev_err()\r\n" + "> where possible in function mtk_hdmi_dt_parse_pdata(), used only\r\n" + "> during device probe.\r\n" + "> While at it, also beautify some prints.\r\n" + "\r\n" + "I think you have do two things.\r\n" + "The first one is "Use dev_err_probe() in mtk_hdmi_dt_parse_pdata()" as the title says.\r\n" + "The second one is "beautify some prints".\r\n" + "\r\n" + "The title does not mention the second one, so I think the second one is not related to this patch.\r\n" + "You think some refinement is not worth to be a patch.\r\n" + "If it's not worth, maybe we should keep them as they are.\r\n" + "Or you could collect all refinement into one refinement patch, and this would looks worth.\r\n" + "\r\n" + "Regards,\r\n" + "CK\r\n" + "\r\n" + "> \r\n" + "> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>\r\n" + "> ---\r\n" + ">  drivers/gpu/drm/mediatek/mtk_hdmi.c | 34 ++++++++++-------------------\r\n" + ">  1 file changed, 11 insertions(+), 23 deletions(-)\r\n" + "> \r\n" + "> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c\r\n" + "> index 65e9629b6b77..48c37294dcbb 100644\r\n" + "> --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c\r\n" + "> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c\r\n" + "> @@ -1372,30 +1372,23 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,\r\n" + ">  {\r\n" + ">         struct device *dev = &pdev->dev;\r\n" + ">         struct device_node *np = dev->of_node;\r\n" + "> -       struct device_node *cec_np, *remote, *i2c_np;\r\n" + "> +       struct device_node *remote, *i2c_np;\r\n" + ">         struct platform_device *cec_pdev;\r\n" + ">         struct regmap *regmap;\r\n" + ">         int ret;\r\n" + "> \r\n" + ">         ret = mtk_hdmi_get_all_clk(hdmi, np);\r\n" + "> -       if (ret) {\r\n" + "> -               if (ret != -EPROBE_DEFER)\r\n" + "> -                       dev_err(dev, "Failed to get clocks: %d\n", ret);\r\n" + "> -\r\n" + "> -               return ret;\r\n" + "> -       }\r\n" + "> +       if (ret)\r\n" + "> +               return dev_err_probe(dev, ret, "Failed to get clocks\n");\r\n" + "> \r\n" + ">         /* The CEC module handles HDMI hotplug detection */\r\n" + ">         cec_np = of_get_compatible_child(np->parent, "mediatek,mt8173-cec");\r\n" + "> -       if (!cec_np) {\r\n" + "> -               dev_err(dev, "Failed to find CEC node\n");\r\n" + "> -               return -EINVAL;\r\n" + "> -       }\r\n" + "> +       if (!cec_np)\r\n" + "> +               return dev_err_probe(dev, -EINVAL, "Failed to find CEC node\n");\r\n" + "> \r\n" + ">         cec_pdev = of_find_device_by_node(cec_np);\r\n" + ">         if (!cec_pdev) {\r\n" + "> -               dev_err(hdmi->dev, "Waiting for CEC device %pOF\n",\r\n" + "> -                       cec_np);\r\n" + "> +               dev_err(hdmi->dev, "Waiting for CEC device %pOF\n", cec_np);\r\n" + ">                 of_node_put(cec_np);\r\n" + ">                 return -EPROBE_DEFER;\r\n" + ">         }\r\n" + "> @@ -1413,9 +1406,8 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,\r\n" + ">         if (IS_ERR(regmap))\r\n" + ">                 ret = PTR_ERR(regmap);\r\n" + ">         if (ret) {\r\n" + "> -               dev_err(dev,\r\n" + "> -                       "Failed to get system configuration registers: %d\n",\r\n" + "> -                       ret);\r\n" + "> +               dev_err_probe(dev, ret,\r\n" + "> +                             "Failed to get system configuration registers\n");\r\n" + ">                 goto put_device;\r\n" + ">         }\r\n" + ">         hdmi->sys_regmap = regmap;\r\n" + "> @@ -1443,20 +1435,16 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,\r\n" + ">         }\r\n" + "> \r\n" + ">         i2c_np = of_parse_phandle(remote, "ddc-i2c-bus", 0);\r\n" + "> +       of_node_put(remote);\r\n" + ">         if (!i2c_np) {\r\n" + "> -               dev_err(dev, "Failed to find ddc-i2c-bus node in %pOF\n",\r\n" + "> -                       remote);\r\n" + "> -               of_node_put(remote);\r\n" + "> -               ret = -EINVAL;\r\n" + "> +               ret = dev_err_probe(dev, -EINVAL, "No ddc-i2c-bus in connector\n");\r\n" + ">                 goto put_device;\r\n" + ">         }\r\n" + "> -       of_node_put(remote);\r\n" + "> \r\n" + ">         hdmi->ddc_adpt = of_find_i2c_adapter_by_node(i2c_np);\r\n" + ">         of_node_put(i2c_np);\r\n" + ">         if (!hdmi->ddc_adpt) {\r\n" + "> -               dev_err(dev, "Failed to get ddc i2c adapter by node\n");\r\n" + "> -               ret = -EINVAL;\r\n" + "> +               ret = dev_err_probe(dev, -EINVAL, "Failed to get ddc i2c adapter by node\n");\r\n" + ">                 goto put_device;\r\n" + ">         }\r\n" + "> \r\n" + "> --\r\n" + "> 2.47.0\r\n" + "> \r\n" + "\r\n" + "\r\n" + "</pre>\r\n" + "</p></body></html><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice\r\n" + " ********************\r\n" + "The information contained in this e-mail message (including any \r\n" + "attachments) may be confidential, proprietary, privileged, or otherwise\r\n" + "exempt from disclosure under applicable laws. It is intended to be \r\n" + "conveyed only to the designated recipient(s). Any use, dissemination, \r\n" + "distribution, printing, retaining or copying of this e-mail (including its \r\n" + "attachments) by unintended recipient(s) is strictly prohibited and may \r\n" + "be unlawful. If you are not an intended recipient of this e-mail, or believe\r\n" + " \r\n" + "that you have received this e-mail in error, please notify the sender \r\n" + "immediately (by replying to this e-mail), delete any and all copies of \r\n" + "this e-mail (including any attachments) from your system, and do not\r\n" + "disclose the content of this e-mail to any other person. Thank you!\r\n" + </pre><!--}--> -afcf681eb93a1a504acee40df4b1cc67c98ffc568b965a26afdad413f87aa225 +9b335d05940aa574d2c69d96c134f53224e97c7eafb7929077de629c9648f5d7
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.