Re: [PATCH bpf] treewide: add missing includes masked by cgroup -> bpf dependency

2021-11-23 Thread Peter Chen
On 21-11-20 07:26:02, Jakub Kicinski wrote:
> On Sat, 20 Nov 2021 15:30:11 +0800 Peter Chen wrote:
> > > diff --git a/drivers/usb/cdns3/host.c b/drivers/usb/cdns3/host.c
> > > index 84dadfa726aa..9643b905e2d8 100644
> > > --- a/drivers/usb/cdns3/host.c
> > > +++ b/drivers/usb/cdns3/host.c
> > > @@ -10,6 +10,7 @@
> > >   */
> > >  
> > >  #include 
> > > +#include   
> > 
> > Should be "#include "?
> 
> Why? Different files are missing different includes, this one needs
> slab.h:
> 
> ../drivers/usb/cdns3/host.c: In function ‘__cdns_host_init’:
> ../drivers/usb/cdns3/host.c:86:2: error: implicit declaration of function 
> ‘kfree’; did you mean ‘vfree’? [-Werror=implicit-function-declaration]
>   kfree(cdns->xhci_plat_data);
>   ^
>   vfree

Oh, my fault.

Acked-by: Peter Chen 

-- 

Thanks,
Peter Chen



Re: [PATCH bpf] treewide: add missing includes masked by cgroup -> bpf dependency

2021-11-19 Thread Peter Chen
On 21-11-19 19:52:53, Jakub Kicinski wrote:
> cgroup.h (therefore swap.h, therefore half of the universe)
> includes bpf.h which in turn includes module.h and slab.h.
> Since we're about to get rid of that dependency we need
> to clean things up.
> 
> Signed-off-by: Jakub Kicinski 
> ---
>  static inline struct inode *bdev_file_inode(struct file *file)
> diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c 
> b/drivers/gpu/drm/drm_gem_shmem_helper.c
> index 7b9f69f21f1e..bca0de92802e 100644
> --- a/drivers/gpu/drm/drm_gem_shmem_helper.c
> +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
> @@ -9,6 +9,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #ifdef CONFIG_X86
>  #include 
> diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c 
> b/drivers/gpu/drm/i915/gt/intel_gtt.c
> index 67d14afa6623..b67f620c3d93 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gtt.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gtt.c
> @@ -6,6 +6,7 @@
>  #include  /* fault-inject.h is not standalone! */
>  
>  #include 
> +#include 
>  
>  #include "gem/i915_gem_lmem.h"
>  #include "i915_trace.h"
> diff --git a/drivers/gpu/drm/i915/i915_request.c 
> b/drivers/gpu/drm/i915/i915_request.c
> index 820a1f38b271..89cccefeea63 100644
> --- a/drivers/gpu/drm/i915/i915_request.c
> +++ b/drivers/gpu/drm/i915/i915_request.c
> @@ -29,6 +29,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include "gem/i915_gem_context.h"
>  #include "gt/intel_breadcrumbs.h"
> diff --git a/drivers/gpu/drm/lima/lima_device.c 
> b/drivers/gpu/drm/lima/lima_device.c
> index 65fdca366e41..f74f8048af8f 100644
> --- a/drivers/gpu/drm/lima/lima_device.c
> +++ b/drivers/gpu/drm/lima/lima_device.c
> @@ -4,6 +4,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  
> diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c 
> b/drivers/gpu/drm/msm/msm_gem_shrinker.c
> index 4a1420b05e97..086dacf2f26a 100644
> --- a/drivers/gpu/drm/msm/msm_gem_shrinker.c
> +++ b/drivers/gpu/drm/msm/msm_gem_shrinker.c
> @@ -5,6 +5,7 @@
>   */
>  
>  #include 
> +#include 
>  
>  #include "msm_drv.h"
>  #include "msm_gem.h"
> diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
> index 7e83c00a3f48..79c870a3bef8 100644
> --- a/drivers/gpu/drm/ttm/ttm_tt.c
> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> @@ -34,6 +34,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  
> diff --git a/drivers/net/ethernet/huawei/hinic/hinic_sriov.c 
> b/drivers/net/ethernet/huawei/hinic/hinic_sriov.c
> index a78c398bf5b2..01e7d3c0b68e 100644
> --- a/drivers/net/ethernet/huawei/hinic/hinic_sriov.c
> +++ b/drivers/net/ethernet/huawei/hinic/hinic_sriov.c
> @@ -8,6 +8,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include "hinic_hw_dev.h"
>  #include "hinic_dev.h"
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c 
> b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
> index 0ef68fdd1f26..61c20907315f 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
> @@ -5,6 +5,8 @@
>   *
>   */
>  
> +#include 
> +
>  #include "otx2_common.h"
>  #include "otx2_ptp.h"
>  
> diff --git a/drivers/pci/controller/dwc/pci-exynos.c 
> b/drivers/pci/controller/dwc/pci-exynos.c
> index c24dab383654..722dacdd5a17 100644
> --- a/drivers/pci/controller/dwc/pci-exynos.c
> +++ b/drivers/pci/controller/dwc/pci-exynos.c
> @@ -19,6 +19,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include "pcie-designware.h"
>  
> diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c 
> b/drivers/pci/controller/dwc/pcie-qcom-ep.c
> index 7b17da2f9b3f..cfe66bf04c1d 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c
> @@ -18,6 +18,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include "pcie-designware.h"
>  
> diff --git a/drivers/usb/cdns3/host.c b/drivers/usb/cdns3/host.c
> index 84dadfa726aa..9643b905e2d8 100644
> --- a/drivers/usb/cdns3/host.c
> +++ b/drivers/usb/cdns3/host.c
> @@ -10,6 +10,7 @@
>   */
>  
>  #include 
> +#include 

Should be "#include "?

-- 

Thanks,
Peter Chen



Re: [PATCH v13 16/35] usb: chipidea: tegra: Add runtime PM and OPP support

2021-09-30 Thread Peter Chen
On 21-09-27 01:40:39, Dmitry Osipenko wrote:
> The Tegra USB controller belongs to the core power domain and we're going
> to enable GENPD support for the core domain. Now USB controller must be
> resumed using runtime PM API in order to initialize the USB power state.
> We already support runtime PM for the CI device, but CI's PM is separated
> from the RPM managed by tegra-usb driver. Add runtime PM and OPP support
> to the driver.
> 
> Signed-off-by: Dmitry Osipenko 
> ---
>  drivers/usb/chipidea/ci_hdrc_tegra.c | 53 
>  1 file changed, 46 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/ci_hdrc_tegra.c 
> b/drivers/usb/chipidea/ci_hdrc_tegra.c
> index 60361141ac04..3142ef7ebe42 100644
> --- a/drivers/usb/chipidea/ci_hdrc_tegra.c
> +++ b/drivers/usb/chipidea/ci_hdrc_tegra.c
> @@ -7,6 +7,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  
>  #include 
> @@ -15,6 +16,8 @@
>  #include 
>  #include 
>  
> +#include 
> +
>  #include "../host/ehci.h"
>  
>  #include "ci.h"
> @@ -278,6 +281,8 @@ static int tegra_usb_probe(struct platform_device *pdev)
>   if (!usb)
>   return -ENOMEM;
>  
> + platform_set_drvdata(pdev, usb);
> +
>   soc = of_device_get_match_data(>dev);
>   if (!soc) {
>   dev_err(>dev, "failed to match OF data\n");
> @@ -296,11 +301,17 @@ static int tegra_usb_probe(struct platform_device *pdev)
>   return err;
>   }
>  
> - err = clk_prepare_enable(usb->clk);
> - if (err < 0) {
> - dev_err(>dev, "failed to enable clock: %d\n", err);
> + err = devm_pm_runtime_enable(>dev);
> + if (err)
> + return err;
> +
> + err = devm_tegra_core_dev_init_opp_table_common(>dev);
> + if (err)
> + return err;
> +
> + err = pm_runtime_resume_and_get(>dev);
> + if (err)
>   return err;
> - }
>  
>   if (device_property_present(>dev, "nvidia,needs-double-reset"))
>   usb->needs_double_reset = true;
> @@ -320,8 +331,6 @@ static int tegra_usb_probe(struct platform_device *pdev)
>   if (err)
>   goto fail_power_off;
>  
> - platform_set_drvdata(pdev, usb);
> -
>   /* setup and register ChipIdea HDRC device */
>   usb->soc = soc;
>   usb->data.name = "tegra-usb";
> @@ -350,7 +359,8 @@ static int tegra_usb_probe(struct platform_device *pdev)
>  phy_shutdown:
>   usb_phy_shutdown(usb->phy);
>  fail_power_off:
> - clk_disable_unprepare(usb->clk);
> + pm_runtime_put(>dev);
> +
>   return err;
>  }
>  
> @@ -360,15 +370,44 @@ static int tegra_usb_remove(struct platform_device 
> *pdev)
>  
>   ci_hdrc_remove_device(usb->dev);
>   usb_phy_shutdown(usb->phy);
> + pm_runtime_put(>dev);
> +
> + return 0;
> +}
> +
> +static int __maybe_unused tegra_usb_runtime_resume(struct device *dev)
> +{
> + struct tegra_usb *usb = dev_get_drvdata(dev);
> + int err;
> +
> + err = clk_prepare_enable(usb->clk);
> + if (err < 0) {
> + dev_err(dev, "failed to enable clock: %d\n", err);
> + return err;
> + }
> +
> + return 0;
> +}
> +
> +static int __maybe_unused tegra_usb_runtime_suspend(struct device *dev)
> +{
> + struct tegra_usb *usb = dev_get_drvdata(dev);
> +
>   clk_disable_unprepare(usb->clk);
>  
>   return 0;
>  }
>  
> +static const struct dev_pm_ops tegra_usb_pm = {
> + SET_RUNTIME_PM_OPS(tegra_usb_runtime_suspend, tegra_usb_runtime_resume,
> +        NULL)
> +};
> +
>  static struct platform_driver tegra_usb_driver = {
>   .driver = {
>   .name = "tegra-usb",
>   .of_match_table = tegra_usb_of_match,
> + .pm = _usb_pm,
>   },
>   .probe = tegra_usb_probe,
>   .remove = tegra_usb_remove,
> -- 
> 2.32.0
> 

I got below compile error if only compile this file, I think previous patches
should include the definition, if that, feel free to add my ack to this
patch.

Acked-by: Peter Chen 

drivers/usb/chipidea/ci_hdrc_tegra.c:308:8: error: implicit declaration of 
function ‘devm_tegra_core_dev_init_opp_table_common’;
did you mean ‘devm_tegra_core_dev_init_opp_table’? 
[-Werror=implicit-function-declaration]
  308 |  err = devm_tegra_core_dev_init_opp_table_common(>dev);
  |^
  |devm_tegra_core_dev_init_opp_table


-- 

Thanks,
Peter Chen



Re: [PATCH 1/4] usb: cdns3: gadget: Replace trace_printk by dev_dbg

2020-06-29 Thread Peter Chen
On 20-06-27 15:03:04, Nicolas Boichat wrote:
> trace_printk should not be used in production code, replace it
> call with dev_dbg.
> 
> Signed-off-by: Nicolas Boichat 
> 
> ---
> 
> Unclear why a trace_printk was used in the first place, it's
> possible that some rate-limiting is necessary here.
> 
>  drivers/usb/cdns3/gadget.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
> index 5e24c2e57c0d8c8..c303ab7c62d1651 100644
> --- a/drivers/usb/cdns3/gadget.c
> +++ b/drivers/usb/cdns3/gadget.c
> @@ -421,7 +421,7 @@ static int cdns3_start_all_request(struct cdns3_device 
> *priv_dev,
>   if ((priv_req->flags & REQUEST_INTERNAL) ||
>   (priv_ep->flags & EP_TDLCHK_EN) ||
>   priv_ep->use_streams) {
> - trace_printk("Blocking external request\n");
> + dev_dbg(priv_dev->dev, "Blocking external request\n");
>   return ret;
>   }
>   }
> -- 

Reviewed-by: Peter Chen 

-- 

Thanks,
Peter Chen
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed to of_get_next_parent()

2016-08-29 Thread Peter Chen

>Sent: Saturday, August 27, 2016 8:07 PM
>To: Tomi Valkeinen ; Tony Lindgren atomide.com>;
>Sean Paul ; Peter Chen ;
>Andrey Utkin 
>Cc: David Airlie ; Peter Ujfalusi ti.com>; Dave
>Airlie ; Rob Clark ; Dr. H. 
>Nikolaus
>Schaller ; Andrew Bradford ;
>kernel at pyra-handheld.com; Discussions about the Letux Kernel kernel at openphoenux.org>; dri-devel at lists.freedesktop.org; lkml kernel at vger.kernel.org>; linux-omap at vger.kernel.org
>Subject: Re: [PATCH] omapdrm: dss: drop unneeded of_node_put() on ref passed to
>of_get_next_parent()
>
>> [8.842806] OF: ERROR: Bad of_node_put() on /encoder/ports/port at 
>> 1/endpoint
>> [8.843014] [] (omapdss_of_find_source_for_first_ep [omapdss])
>
>I can confirm that reverting 2ab9f5879162 fixes this regression, tested on 
>omap5-
>uevm.
>

It was my careless for introducing regression. The revert patch has already been
at linux-next. Sorry for inconvenience.

https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=5a78ff7bf7e25191144b550961001bbf6c734da4


Peter


[RESEND Patch 2/4] gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle

2016-08-11 Thread Peter Chen


>On 15/07/16 06:17, Peter Chen wrote:
>> of_node_put needs to be called when the device node which is got from
>> of_parse_phandle has finished using.
>>
>> Cc: Tomi Valkeinen 
>> Signed-off-by: Peter Chen 
>> ---
>>  drivers/gpu/drm/omapdrm/dss/dss-of.c | 7 ---
>>  1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/omapdrm/dss/dss-of.c
>> b/drivers/gpu/drm/omapdrm/dss/dss-of.c
>> index dfd4e96..e256d87 100644
>> --- a/drivers/gpu/drm/omapdrm/dss/dss-of.c
>> +++ b/drivers/gpu/drm/omapdrm/dss/dss-of.c
>> @@ -125,15 +125,16 @@ u32 dss_of_port_get_port_number(struct
>> device_node *port)
>>
>>  static struct device_node *omapdss_of_get_remote_port(const struct
>> device_node *node)  {
>> -struct device_node *np;
>> +struct device_node *np, *np_parent;
>>
>>  np = of_parse_phandle(node, "remote-endpoint", 0);
>>  if (!np)
>>  return NULL;
>>
>> -np = of_get_next_parent(np);
>> +np_parent = of_get_next_parent(np);
>> +of_node_put(np);
>>
>> -return np;
>> +return np_parent;
>>  }
>
>The doc for of_get_next_parent() says:
>
>"This is like of_get_parent() except that it drops the refcount on the passed 
>node,
>making it suitable for iterating".
>

It is my careless, thanks for pointing it.

Peter


[RESEND Patch 4/4] gpu: drm: arcpgu_drv: add missing of_node_put after calling of_parse_phandle

2016-07-15 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Alexey Brodkin 
Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/arc/arcpgu_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c
index ccbdadb..0226ec0 100644
--- a/drivers/gpu/drm/arc/arcpgu_drv.c
+++ b/drivers/gpu/drm/arc/arcpgu_drv.c
@@ -127,6 +127,7 @@ static int arcpgu_load(struct drm_device *drm)
encoder_node = of_parse_phandle(drm->dev->of_node, "encoder-slave", 0);
if (encoder_node) {
ret = arcpgu_drm_hdmi_init(drm, encoder_node);
+   of_node_put(encoder_node);
if (ret < 0)
return ret;
} else {
-- 
1.9.1



[RESEND Patch 3/4] gpu: drm: exynos_hdmi: add missing of_node_put after calling of_parse_phandle

2016-07-15 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Joonyoung Shim 
Cc: Seung-Woo Kim 
Cc: Kyungmin Park 
Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/exynos/exynos_hdmi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c 
b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 1625d7c..2275efe 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1820,6 +1820,7 @@ static int hdmi_probe(struct platform_device *pdev)
DRM_ERROR("Failed to find ddc node in device tree\n");
return -ENODEV;
}
+   of_node_put(dev->of_node);

 out_get_ddc_adpt:
hdata->ddc_adpt = of_find_i2c_adapter_by_node(ddc_node);
@@ -1838,6 +1839,7 @@ out_get_ddc_adpt:
ret = -ENODEV;
goto err_ddc;
}
+   of_node_put(dev->of_node);

 out_get_phy_port:
if (hdata->drv_data->is_apb_phy) {
-- 
1.9.1



[RESEND Patch 2/4] gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle

2016-07-15 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Tomi Valkeinen 
Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/omapdrm/dss/dss-of.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/dss-of.c 
b/drivers/gpu/drm/omapdrm/dss/dss-of.c
index dfd4e96..e256d87 100644
--- a/drivers/gpu/drm/omapdrm/dss/dss-of.c
+++ b/drivers/gpu/drm/omapdrm/dss/dss-of.c
@@ -125,15 +125,16 @@ u32 dss_of_port_get_port_number(struct device_node *port)

 static struct device_node *omapdss_of_get_remote_port(const struct device_node 
*node)
 {
-   struct device_node *np;
+   struct device_node *np, *np_parent;

np = of_parse_phandle(node, "remote-endpoint", 0);
if (!np)
return NULL;

-   np = of_get_next_parent(np);
+   np_parent = of_get_next_parent(np);
+   of_node_put(np);

-   return np;
+   return np_parent;
 }

 struct device_node *
-- 
1.9.1



[RESEND Patch 1/4] gpu: drm: omapdrm: connector-dvi: add missing of_node_put after calling of_parse_phandle

2016-07-15 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Tomi Valkeinen 
Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/omapdrm/displays/connector-dvi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c 
b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c
index 75f7827..684b7ae 100644
--- a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c
+++ b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c
@@ -255,6 +255,7 @@ static int dvic_probe_of(struct platform_device *pdev)
adapter_node = of_parse_phandle(node, "ddc-i2c-bus", 0);
if (adapter_node) {
adapter = of_get_i2c_adapter_by_node(adapter_node);
+   of_node_put(adapter_node);
if (adapter == NULL) {
dev_err(>dev, "failed to parse ddc-i2c-bus\n");
omap_dss_put_device(ddata->in);
-- 
1.9.1



[RESEND Patch 0/4] gpu: drm: not merged missing of_node_put fix

2016-07-15 Thread Peter Chen
Hi Daniel,

Below are the remaining fixes for missing of_node_put, which are
not applied by you or individual driver maintainers.

Peter Chen (4):
  gpu: drm: omapdrm: connector-dvi: add missing of_node_put after
calling of_parse_phandle
  gpu: drm: omapdrm: dss-of: add missing of_node_put after calling
of_parse_phandle
  gpu: drm: exynos_hdmi: add missing of_node_put after calling
of_parse_phandle
  gpu: drm: arcpgu_drv: add missing of_node_put after calling
of_parse_phandle

 drivers/gpu/drm/arc/arcpgu_drv.c | 1 +
 drivers/gpu/drm/exynos/exynos_hdmi.c | 2 ++
 drivers/gpu/drm/omapdrm/displays/connector-dvi.c | 1 +
 drivers/gpu/drm/omapdrm/dss/dss-of.c | 7 ---
 4 files changed, 8 insertions(+), 3 deletions(-)

-- 
1.9.1



[PATCH 1/1] gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle

2016-07-14 Thread Peter Chen

>>> >
>>> >Just an aside: When you do the same bugfix for multiple places it's
>>> >good practice to submit it as one series (and cc everyone involved).
>>> >Increases the odds that someone is in a good mood and reviews them
>>> >all, instead of just the one affecting their own driver.
>>>
>>> Thanks, I realized that, and did it for later fixes for drm.
>>> But if the bug fixes are at several subsystems, I think we should
>>> split patch set per subsystem.
>>
>>Yeah, splitting per subsystem makes sense I'd say. I merged some of
>>your patches, others are merged by driver maintainers directly. Is
>>there anything left? If so, pls resend those as a new series to make sure 
>>it's all in
>one place.
>>-Daniel
>>
>
>Thanks, Daniel.
>
>I am afraid I don't know which one is merged, do you have a tree? And, I can 
>re-send
>them all.
>The latest patches which merged Linux-next is at [1], I remembered I dropped 
>one
>since the fix has already been there.
>
>git log --oneline miss-of-node-put (for drm)
>
>e167f2a gpu: drm: vc4_hdmi: add missing of_node_put after calling
>of_parse_phandle
>9f86a38 gpu: drm: sun4i_drv: add missing of_node_put after calling
>of_parse_phandle e0475ac gpu: drm: sti_vtg: add missing of_node_put after 
>calling
>of_parse_phandle
>99ad059 gpu: drm: sti_hqvdp: add missing of_node_put after calling
>of_parse_phandle
>7d90d71 gpu: drm: sti_vdo: add missing of_node_put after calling 
>of_parse_phandle
>57c9e36 gpu: drm: sti_compositor: add missing of_node_put after calling
>of_parse_phandle 2cb11fb gpu: drm: rockchip_drm_drv: add missing of_node_put
>after calling of_parse_phandle 2668b9c gpu: drm: omapdrm: dss-of: add missing
>of_node_put after calling of_parse_phandle ab81c2e gpu: drm: omapdrm:
>connector-dvi: add missing of_node_put after calling of_parse_phandle
>4fc7ab7 gpn: drm: fsl_tcon: add missing of_node_put after calling 
>of_parse_phandle
>df5f61f gpu: drm: exynos_hdmi: add missing of_node_put after calling
>of_parse_phandle
>6d294e6 gpu: drm: arcpgu_drv: add missing of_node_put after calling
>of_parse_phandle
>
>
>[1] 
>https://git.kernel.org/cgit/linux/kernel/git/peter.chen/usb.git/log/?h=fix-missing-of-
>node-put
>
>

I find below are at Linux-next, do you need me to send remains?

6d5fa28 gpu: drm: rockchip_drm_drv: add missing of_node_put after calling 
of_parse_phandle
e8ef1b6 gpu: drm: sti_vtg: add missing of_node_put after calling 
of_parse_phandle
5d950ef gpu: drm: sti_hqvdp: add missing of_node_put after calling 
of_parse_phandle
f33dd64 gpu: drm: sti_vdo: add missing of_node_put after calling 
of_parse_phandle
9897f79 gpu: drm: sti_compositor: add missing of_node_put after calling 
of_parse_phandle
f7d8a3c drm/msm: add missing of_node_put after calling of_parse_phandle

Peter

>Peter
>>>
>>> Peter
>>>
>>> >
>>> >> ---
>>> >>  drivers/gpu/drm/omapdrm/dss/dss-of.c | 7 ---
>>> >>  1 file changed, 4 insertions(+), 3 deletions(-)
>>> >>
>>> >> diff --git a/drivers/gpu/drm/omapdrm/dss/dss-of.c
>>> >> b/drivers/gpu/drm/omapdrm/dss/dss-of.c
>>> >> index bf407b6..1ee6e5e 100644
>>> >> --- a/drivers/gpu/drm/omapdrm/dss/dss-of.c
>>> >> +++ b/drivers/gpu/drm/omapdrm/dss/dss-of.c
>>> >> @@ -126,15 +126,16 @@ u32 dss_of_port_get_port_number(struct
>>> >> device_node *port)
>>> >>
>>> >>  static struct device_node *omapdss_of_get_remote_port(const
>>> >> struct device_node *node)  {
>>> >> -struct device_node *np;
>>> >> +struct device_node *np, *np_parent;
>>> >>
>>> >>  np = of_parse_phandle(node, "remote-endpoint", 0);
>>> >>  if (!np)
>>> >>  return NULL;
>>> >>
>>> >> -np = of_get_next_parent(np);
>>> >> +np_parent = of_get_next_parent(np);
>>> >> +of_node_put(np);
>>> >>
>>> >> -return np;
>>> >> +return np_parent;
>>> >>  }
>>> >>
>>> >>  struct device_node *
>>> >> --
>>> >> 1.9.1
>>> >>
>>> >> ___
>>> >> dri-devel mailing list
>>> >> dri-devel at lists.freedesktop.org
>>> >> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>>> >
>>> >--
>>> >Daniel Vetter
>>> >Software Engineer, Intel Corporation http://blog.ffwll.ch
>>
>>--
>>Daniel Vetter
>>Software Engineer, Intel Corporation
>>http://blog.ffwll.ch


[PATCH 1/1] gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle

2016-07-14 Thread Peter Chen

>>
>> >
>> >Just an aside: When you do the same bugfix for multiple places it's
>> >good practice to submit it as one series (and cc everyone involved).
>> >Increases the odds that someone is in a good mood and reviews them
>> >all, instead of just the one affecting their own driver.
>>
>> Thanks, I realized that, and did it for later fixes for drm.
>> But if the bug fixes are at several subsystems, I think we should
>> split patch set per subsystem.
>
>Yeah, splitting per subsystem makes sense I'd say. I merged some of your 
>patches,
>others are merged by driver maintainers directly. Is there anything left? If 
>so, pls
>resend those as a new series to make sure it's all in one place.
>-Daniel
>

Thanks, Daniel.

I am afraid I don't know which one is merged, do you have a tree? And, I can 
re-send them all.
The latest patches which merged Linux-next is at [1], I remembered I dropped
one since the fix has already been there.

git log --oneline miss-of-node-put (for drm)

e167f2a gpu: drm: vc4_hdmi: add missing of_node_put after calling 
of_parse_phandle
9f86a38 gpu: drm: sun4i_drv: add missing of_node_put after calling 
of_parse_phandle
e0475ac gpu: drm: sti_vtg: add missing of_node_put after calling 
of_parse_phandle
99ad059 gpu: drm: sti_hqvdp: add missing of_node_put after calling 
of_parse_phandle
7d90d71 gpu: drm: sti_vdo: add missing of_node_put after calling 
of_parse_phandle
57c9e36 gpu: drm: sti_compositor: add missing of_node_put after calling 
of_parse_phandle
2cb11fb gpu: drm: rockchip_drm_drv: add missing of_node_put after calling 
of_parse_phandle
2668b9c gpu: drm: omapdrm: dss-of: add missing of_node_put after calling 
of_parse_phandle
ab81c2e gpu: drm: omapdrm: connector-dvi: add missing of_node_put after calling 
of_parse_phandle
4fc7ab7 gpn: drm: fsl_tcon: add missing of_node_put after calling 
of_parse_phandle
df5f61f gpu: drm: exynos_hdmi: add missing of_node_put after calling 
of_parse_phandle
6d294e6 gpu: drm: arcpgu_drv: add missing of_node_put after calling 
of_parse_phandle


[1] 
https://git.kernel.org/cgit/linux/kernel/git/peter.chen/usb.git/log/?h=fix-missing-of-node-put


Peter
>>
>> Peter
>>
>> >
>> >> ---
>> >>  drivers/gpu/drm/omapdrm/dss/dss-of.c | 7 ---
>> >>  1 file changed, 4 insertions(+), 3 deletions(-)
>> >>
>> >> diff --git a/drivers/gpu/drm/omapdrm/dss/dss-of.c
>> >> b/drivers/gpu/drm/omapdrm/dss/dss-of.c
>> >> index bf407b6..1ee6e5e 100644
>> >> --- a/drivers/gpu/drm/omapdrm/dss/dss-of.c
>> >> +++ b/drivers/gpu/drm/omapdrm/dss/dss-of.c
>> >> @@ -126,15 +126,16 @@ u32 dss_of_port_get_port_number(struct
>> >> device_node *port)
>> >>
>> >>  static struct device_node *omapdss_of_get_remote_port(const struct
>> >> device_node *node)  {
>> >> - struct device_node *np;
>> >> + struct device_node *np, *np_parent;
>> >>
>> >>   np = of_parse_phandle(node, "remote-endpoint", 0);
>> >>   if (!np)
>> >>   return NULL;
>> >>
>> >> - np = of_get_next_parent(np);
>> >> + np_parent = of_get_next_parent(np);
>> >> + of_node_put(np);
>> >>
>> >> - return np;
>> >> + return np_parent;
>> >>  }
>> >>
>> >>  struct device_node *
>> >> --
>> >> 1.9.1
>> >>
>> >> ___
>> >> dri-devel mailing list
>> >> dri-devel at lists.freedesktop.org
>> >> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>> >
>> >--
>> >Daniel Vetter
>> >Software Engineer, Intel Corporation
>> >http://blog.ffwll.ch
>
>--
>Daniel Vetter
>Software Engineer, Intel Corporation
>http://blog.ffwll.ch


[PATCH 1/1] gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle

2016-07-13 Thread Peter Chen

>
>Just an aside: When you do the same bugfix for multiple places it's good 
>practice to
>submit it as one series (and cc everyone involved). Increases the odds that 
>someone
>is in a good mood and reviews them all, instead of just the one affecting 
>their own
>driver.

Thanks, I realized that, and did it for later fixes for drm.
But if the bug fixes are at several subsystems, I think
we should split patch set per subsystem.

Peter

>
>> ---
>>  drivers/gpu/drm/omapdrm/dss/dss-of.c | 7 ---
>>  1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/omapdrm/dss/dss-of.c
>> b/drivers/gpu/drm/omapdrm/dss/dss-of.c
>> index bf407b6..1ee6e5e 100644
>> --- a/drivers/gpu/drm/omapdrm/dss/dss-of.c
>> +++ b/drivers/gpu/drm/omapdrm/dss/dss-of.c
>> @@ -126,15 +126,16 @@ u32 dss_of_port_get_port_number(struct
>> device_node *port)
>>
>>  static struct device_node *omapdss_of_get_remote_port(const struct
>> device_node *node)  {
>> -struct device_node *np;
>> +struct device_node *np, *np_parent;
>>
>>  np = of_parse_phandle(node, "remote-endpoint", 0);
>>  if (!np)
>>  return NULL;
>>
>> -np = of_get_next_parent(np);
>> +np_parent = of_get_next_parent(np);
>> +of_node_put(np);
>>
>> -return np;
>> +return np_parent;
>>  }
>>
>>  struct device_node *
>> --
>> 1.9.1
>>
>> ___
>> dri-devel mailing list
>> dri-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>--
>Daniel Vetter
>Software Engineer, Intel Corporation
>http://blog.ffwll.ch


[PATCH 7/7] gpu: drm: vc4_hdmi: add missing of_node_put after calling of_parse_phandle

2016-07-05 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Eric Anholt 
Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index fd2644d..26b6b06 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -465,12 +465,6 @@ static int vc4_hdmi_bind(struct device *dev, struct device 
*master, void *data)
if (IS_ERR(hdmi->hd_regs))
return PTR_ERR(hdmi->hd_regs);

-   ddc_node = of_parse_phandle(dev->of_node, "ddc", 0);
-   if (!ddc_node) {
-   DRM_ERROR("Failed to find ddc node in device tree\n");
-   return -ENODEV;
-   }
-
hdmi->pixel_clock = devm_clk_get(dev, "pixel");
if (IS_ERR(hdmi->pixel_clock)) {
DRM_ERROR("Failed to get pixel clock\n");
@@ -482,7 +476,14 @@ static int vc4_hdmi_bind(struct device *dev, struct device 
*master, void *data)
return PTR_ERR(hdmi->hsm_clock);
}

+   ddc_node = of_parse_phandle(dev->of_node, "ddc", 0);
+   if (!ddc_node) {
+   DRM_ERROR("Failed to find ddc node in device tree\n");
+   return -ENODEV;
+   }
+
hdmi->ddc = of_find_i2c_adapter_by_node(ddc_node);
+   of_node_put(ddc_node);
if (!hdmi->ddc) {
DRM_DEBUG("Failed to get ddc i2c adapter by node\n");
return -EPROBE_DEFER;
-- 
1.9.1



[PATCH 6/7] gpu: drm: sun4i_drv: add missing of_node_put after calling of_parse_phandle

2016-07-05 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/sun4i/sun4i_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c 
b/drivers/gpu/drm/sun4i/sun4i_drv.c
index 76e922b..ca291ba 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -318,6 +318,7 @@ static int sun4i_drv_probe(struct platform_device *pdev)

count += sun4i_drv_add_endpoints(>dev, ,
pipeline);
+   of_node_put(pipeline);

DRM_DEBUG_DRIVER("Queued %d outputs on pipeline %d\n",
 count, i);
-- 
1.9.1



[PATCH 5/7] gpu: drm: sti_vtg: add missing of_node_put after calling of_parse_phandle

2016-07-05 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Benjamin Gaignard 
Cc: Vincent Abriou 
Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/sti/sti_vtg.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c
index 6bf4ce4..0100c7c 100644
--- a/drivers/gpu/drm/sti/sti_vtg.c
+++ b/drivers/gpu/drm/sti/sti_vtg.c
@@ -432,6 +432,7 @@ static int vtg_probe(struct platform_device *pdev)
np = of_parse_phandle(pdev->dev.of_node, "st,slave", 0);
if (np) {
vtg->slave = of_vtg_find(np);
+   of_node_put(np);

if (!vtg->slave)
return -EPROBE_DEFER;
-- 
1.9.1



[PATCH 4/7] gpu: drm: sti_hqvdp: add missing of_node_put after calling of_parse_phandle

2016-07-05 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Benjamin Gaignard 
Cc: Vincent Abriou 
Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/sti/sti_hqvdp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
index 1edec29..4f052fa 100644
--- a/drivers/gpu/drm/sti/sti_hqvdp.c
+++ b/drivers/gpu/drm/sti/sti_hqvdp.c
@@ -1346,6 +1346,7 @@ static int sti_hqvdp_probe(struct platform_device *pdev)
vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 0);
if (vtg_np)
hqvdp->vtg = of_vtg_find(vtg_np);
+   of_node_put(vtg_np);

platform_set_drvdata(pdev, hqvdp);

-- 
1.9.1



[PATCH 3/7] gpu: drm: sti_vdo: add missing of_node_put after calling of_parse_phandle

2016-07-05 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Benjamin Gaignard 
Cc: Vincent Abriou 
Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/sti/sti_dvo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
index 25f7663..7e211a8 100644
--- a/drivers/gpu/drm/sti/sti_dvo.c
+++ b/drivers/gpu/drm/sti/sti_dvo.c
@@ -602,6 +602,7 @@ static int sti_dvo_probe(struct platform_device *pdev)
dvo->panel_node = of_parse_phandle(np, "sti,panel", 0);
if (!dvo->panel_node)
DRM_ERROR("No panel associated to the dvo output\n");
+   of_node_put(dvo->panel_node);

platform_set_drvdata(pdev, dvo);

-- 
1.9.1



[PATCH 2/7] gpu: drm: sti_compositor: add missing of_node_put after calling of_parse_phandle

2016-07-05 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Benjamin Gaignard 
Cc: Vincent Abriou 
Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/sti/sti_compositor.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/sti/sti_compositor.c 
b/drivers/gpu/drm/sti/sti_compositor.c
index 3d2fa3a..064de14 100644
--- a/drivers/gpu/drm/sti/sti_compositor.c
+++ b/drivers/gpu/drm/sti/sti_compositor.c
@@ -247,10 +247,12 @@ static int sti_compositor_probe(struct platform_device 
*pdev)
vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 0);
if (vtg_np)
compo->vtg_main = of_vtg_find(vtg_np);
+   of_node_put(vtg_np);

vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 1);
if (vtg_np)
compo->vtg_aux = of_vtg_find(vtg_np);
+   of_node_put(vtg_np);

platform_set_drvdata(pdev, compo);

-- 
1.9.1



[PATCH 1/7] gpu: drm: rockchip_drm_drv: add missing of_node_put after calling of_parse_phandle

2016-07-05 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Mark Yao 
Cc: Heiko Stuebner 
Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c 
b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index a409d1f..935c5e0 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -518,6 +518,7 @@ static int rockchip_drm_platform_probe(struct 
platform_device *pdev)
is_support_iommu = false;
}

+   of_node_put(iommu);
component_match_add(dev, , compare_of, port->parent);
of_node_put(port);
}
-- 
1.9.1



[PATCH 0/7] gpu: drm: remaining missing of_node_put issue fixes

2016-07-05 Thread Peter Chen
Hi David,

This is remaining missing of_node_put issue fix for gpu/drm drivers, the
other fixes I sent yesterday. I think it may be easier for reviewing
using patch set for similar issue, thanks.

Peter Chen (7):
  gpu: drm: rockchip_drm_drv: add missing of_node_put after calling
of_parse_phandle
  gpu: drm: sti_compositor: add missing of_node_put after calling
of_parse_phandle
  gpu: drm: sti_vdo: add missing of_node_put after calling
of_parse_phandle
  gpu: drm: sti_hqvdp: add missing of_node_put after calling
of_parse_phandle
  gpu: drm: sti_vtg: add missing of_node_put after calling
of_parse_phandle
  gpu: drm: sun4i_drv: add missing of_node_put after calling
of_parse_phandle
  gpu: drm: vc4_hdmi: add missing of_node_put after calling
of_parse_phandle

 drivers/gpu/drm/rockchip/rockchip_drm_drv.c |  1 +
 drivers/gpu/drm/sti/sti_compositor.c|  2 ++
 drivers/gpu/drm/sti/sti_dvo.c   |  1 +
 drivers/gpu/drm/sti/sti_hqvdp.c |  1 +
 drivers/gpu/drm/sti/sti_vtg.c   |  1 +
 drivers/gpu/drm/sun4i/sun4i_drv.c   |  1 +
 drivers/gpu/drm/vc4/vc4_hdmi.c  | 13 +++--
 7 files changed, 14 insertions(+), 6 deletions(-)

-- 
1.9.1



[PATCH 1/1] gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/omapdrm/dss/dss-of.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/dss-of.c 
b/drivers/gpu/drm/omapdrm/dss/dss-of.c
index bf407b6..1ee6e5e 100644
--- a/drivers/gpu/drm/omapdrm/dss/dss-of.c
+++ b/drivers/gpu/drm/omapdrm/dss/dss-of.c
@@ -126,15 +126,16 @@ u32 dss_of_port_get_port_number(struct device_node *port)

 static struct device_node *omapdss_of_get_remote_port(const struct device_node 
*node)
 {
-   struct device_node *np;
+   struct device_node *np, *np_parent;

np = of_parse_phandle(node, "remote-endpoint", 0);
if (!np)
return NULL;

-   np = of_get_next_parent(np);
+   np_parent = of_get_next_parent(np);
+   of_node_put(np);

-   return np;
+   return np_parent;
 }

 struct device_node *
-- 
1.9.1



[PATCH 1/1] gpu: drm: omapdrm: connector-dvi: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/omapdrm/displays/connector-dvi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c 
b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c
index 747f26a..8c15bdb 100644
--- a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c
+++ b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c
@@ -255,6 +255,7 @@ static int dvic_probe_of(struct platform_device *pdev)
adapter_node = of_parse_phandle(node, "ddc-i2c-bus", 0);
if (adapter_node) {
adapter = of_get_i2c_adapter_by_node(adapter_node);
+   of_node_put(adapter_node);
if (adapter == NULL) {
dev_err(>dev, "failed to parse ddc-i2c-bus\n");
omap_dss_put_device(ddata->in);
-- 
1.9.1



[PATCH v2 1/1] gpu: drm: msm_drv: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Signed-off-by: Peter Chen 
---
Changes for v2:
- There are two missings in the code, handle it both in one patch

 drivers/gpu/drm/msm/msm_drv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 9c65409..46c6037 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -284,6 +284,7 @@ static int msm_init_vram(struct drm_device *dev)
if (node) {
struct resource r;
ret = of_address_to_resource(node, 0, );
+   of_node_put(node);
if (ret)
return ret;
size = r.end - r.start;
@@ -819,6 +820,7 @@ static int add_components(struct device *dev, struct 
component_match **matchptr,
break;

component_match_add(dev, matchptr, compare_of, node);
+   of_node_put(node);
}

return 0;
-- 
1.9.1



[PATCH 1/1] gpu: drm: msm_drv: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/msm/msm_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 9c65409..d9ba6c4 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -284,6 +284,7 @@ static int msm_init_vram(struct drm_device *dev)
if (node) {
struct resource r;
ret = of_address_to_resource(node, 0, );
+   of_node_put(node);
if (ret)
return ret;
size = r.end - r.start;
-- 
1.9.1



[PATCH 1/1] gpn: drm: fsl_tcon: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using, but current code only
calls it at error path, fix it by adding it at correct code path.

Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/fsl-dcu/fsl_tcon.c 
b/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
index bbe34f1..bca09ea 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
@@ -92,6 +92,7 @@ struct fsl_tcon *fsl_tcon_init(struct device *dev)
goto err_node_put;
}

+   of_node_put(np);
clk_prepare_enable(tcon->ipg_clk);

dev_info(dev, "Using TCON in bypass mode\n");
-- 
1.9.1



[PATCH 1/1] gpu: drm: exynos_hdmi: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/exynos/exynos_hdmi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c 
b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 58de5a4..e9591c7 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1828,6 +1828,7 @@ static int hdmi_probe(struct platform_device *pdev)
DRM_ERROR("Failed to find ddc node in device tree\n");
return -ENODEV;
}
+   of_node_put(dev->of_node);

 out_get_ddc_adpt:
hdata->ddc_adpt = of_find_i2c_adapter_by_node(ddc_node);
@@ -1846,6 +1847,7 @@ out_get_ddc_adpt:
ret = -ENODEV;
goto err_ddc;
}
+   of_node_put(dev->of_node);

 out_get_phy_port:
if (hdata->drv_data->is_apb_phy) {
-- 
1.9.1



[PATCH 1/1] gpu: drm: arcpgu_drv: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Signed-off-by: Peter Chen 
---
 drivers/gpu/drm/arc/arcpgu_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c
index 76e187a..b2c3c3b 100644
--- a/drivers/gpu/drm/arc/arcpgu_drv.c
+++ b/drivers/gpu/drm/arc/arcpgu_drv.c
@@ -155,6 +155,7 @@ static int arcpgu_load(struct drm_device *drm)
}

ret = arcpgu_drm_hdmi_init(drm, encoder_node);
+   of_node_put(encoder_node);
if (ret < 0)
return ret;

-- 
1.9.1