* [PATCH v2 0/3] drm: Add component_match_add_of and convert users of drm_of_component_match_add
@ 2022-12-22 23:37 ` Sean Anderson
0 siblings, 0 replies; 28+ messages in thread
From: Sean Anderson @ 2022-12-22 23:37 UTC (permalink / raw)
To: David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, dri-devel
Cc: alsa-devel, Xinliang Liu, Liviu Dudau, linux-kernel,
Paul Cercueil, John Stultz, Mihail Atanassov, Will Deacon,
Samuel Holland, Sean Anderson, Joerg Roedel, Takashi Iwai,
Russell King, Jernej Skrabec, Chen-Yu Tsai, Mali DP Maintainers,
linux-arm-kernel, linux-arm-msm, Alain Volmat, Xinwei Kong,
linux-sunxi, Chun-Kuang Hu, Chen Feng, freedreno, Abhinav Kumar,
etnaviv, Christian Gmeiner, Mark Brown, linux-mediatek,
Matthias Brugger, Sean Paul, Yong Wu, linux-mips, Tomi Valkeinen,
iommu, Robin Murphy, Liam Girdwood, Rob Clark, Philipp Zabel,
Dmitry Baryshkov, Tian Tao, Jyri Sarha, Brian Starkey,
Lucas Stach
This series adds a new function component_match_add_of to simplify the
common case of calling component_match_add_release with
component_release_of and component_compare_of. There is already
drm_of_component_match_add, which allows for a custom compare function.
However, all existing users just use component_compare_of (or an
equivalent).
Changes in v2:
- Split off conversion from helper addition
- Rebased onto drm/drm-next
Sean Anderson (3):
component: Add helper for device nodes
iommu/sound: Use component_match_add_of helper
drm: Convert users of drm_of_component_match_add to
component_match_add_of
.../gpu/drm/arm/display/komeda/komeda_drv.c | 6 ++--
drivers/gpu/drm/arm/hdlcd_drv.c | 9 +-----
drivers/gpu/drm/arm/malidp_drv.c | 11 +------
drivers/gpu/drm/armada/armada_drv.c | 10 ++++---
drivers/gpu/drm/drm_of.c | 29 +++----------------
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +--
.../gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 3 +-
drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 3 +-
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 4 +--
drivers/gpu/drm/msm/msm_drv.c | 14 ++++-----
drivers/gpu/drm/sti/sti_drv.c | 3 +-
drivers/gpu/drm/sun4i/sun4i_drv.c | 3 +-
drivers/gpu/drm/tilcdc/tilcdc_external.c | 10 ++-----
drivers/iommu/mtk_iommu.c | 3 +-
drivers/iommu/mtk_iommu_v1.c | 3 +-
include/drm/drm_of.h | 12 --------
include/linux/component.h | 9 ++++++
sound/soc/codecs/wcd938x.c | 6 ++--
18 files changed, 46 insertions(+), 96 deletions(-)
--
2.35.1.1320.gc452695387.dirty
^ permalink raw reply [flat|nested] 28+ messages in thread* [PATCH v2 0/3] drm: Add component_match_add_of and convert users of drm_of_component_match_add @ 2022-12-22 23:37 ` Sean Anderson 0 siblings, 0 replies; 28+ messages in thread From: Sean Anderson @ 2022-12-22 23:37 UTC (permalink / raw) To: David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel Cc: alsa-devel, Xinliang Liu, Liviu Dudau, linux-kernel, Paul Cercueil, John Stultz, Mihail Atanassov, Will Deacon, Samuel Holland, Sean Anderson, Joerg Roedel, Takashi Iwai, Russell King, Jernej Skrabec, Chen-Yu Tsai, Mali DP Maintainers, linux-arm-kernel, linux-arm-msm, Alain Volmat, Xinwei Kong, linux-sunxi, Chun-Kuang Hu, Chen Feng, freedreno, Abhinav Kumar, etnaviv, Mark Brown, linux-mediatek, Matthias Brugger, Jaroslav Kysela, Sean Paul, Yong Wu, linux-mips, Tomi Valkeinen, iommu, Robin Murphy, Liam Girdwood, Dmitry Baryshkov, Tian Tao, Jyri Sarha This series adds a new function component_match_add_of to simplify the common case of calling component_match_add_release with component_release_of and component_compare_of. There is already drm_of_component_match_add, which allows for a custom compare function. However, all existing users just use component_compare_of (or an equivalent). Changes in v2: - Split off conversion from helper addition - Rebased onto drm/drm-next Sean Anderson (3): component: Add helper for device nodes iommu/sound: Use component_match_add_of helper drm: Convert users of drm_of_component_match_add to component_match_add_of .../gpu/drm/arm/display/komeda/komeda_drv.c | 6 ++-- drivers/gpu/drm/arm/hdlcd_drv.c | 9 +----- drivers/gpu/drm/arm/malidp_drv.c | 11 +------ drivers/gpu/drm/armada/armada_drv.c | 10 ++++--- drivers/gpu/drm/drm_of.c | 29 +++---------------- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +-- .../gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 3 +- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 3 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 4 +-- drivers/gpu/drm/msm/msm_drv.c | 14 ++++----- drivers/gpu/drm/sti/sti_drv.c | 3 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 3 +- drivers/gpu/drm/tilcdc/tilcdc_external.c | 10 ++----- drivers/iommu/mtk_iommu.c | 3 +- drivers/iommu/mtk_iommu_v1.c | 3 +- include/drm/drm_of.h | 12 -------- include/linux/component.h | 9 ++++++ sound/soc/codecs/wcd938x.c | 6 ++-- 18 files changed, 46 insertions(+), 96 deletions(-) -- 2.35.1.1320.gc452695387.dirty ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 0/3] drm: Add component_match_add_of and convert users of drm_of_component_match_add @ 2022-12-22 23:37 ` Sean Anderson 0 siblings, 0 replies; 28+ messages in thread From: Sean Anderson @ 2022-12-22 23:37 UTC (permalink / raw) To: David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel Cc: linux-kernel, Sean Anderson, Abhinav Kumar, Alain Volmat, Brian Starkey, Chen Feng, Chen-Yu Tsai, Christian Gmeiner, Chun-Kuang Hu, Dmitry Baryshkov, Jaroslav Kysela, Jernej Skrabec, Joerg Roedel, John Stultz, Jyri Sarha, Liam Girdwood, Liviu Dudau, Lucas Stach, Mali DP Maintainers, Mark Brown, Matthias Brugger, Mihail Atanassov, Paul Cercueil, Philipp Zabel, Rob Clark, Robin Murphy, Russell King, Samuel Holland, Sean Paul, Takashi Iwai, Tian Tao, Tomi Valkeinen, Will Deacon, Xinliang Liu, Xinwei Kong, Yong Wu, alsa-devel, etnaviv, freedreno, iommu, linux-arm-kernel, linux-arm-msm, linux-mediatek, linux-mips, linux-sunxi This series adds a new function component_match_add_of to simplify the common case of calling component_match_add_release with component_release_of and component_compare_of. There is already drm_of_component_match_add, which allows for a custom compare function. However, all existing users just use component_compare_of (or an equivalent). Changes in v2: - Split off conversion from helper addition - Rebased onto drm/drm-next Sean Anderson (3): component: Add helper for device nodes iommu/sound: Use component_match_add_of helper drm: Convert users of drm_of_component_match_add to component_match_add_of .../gpu/drm/arm/display/komeda/komeda_drv.c | 6 ++-- drivers/gpu/drm/arm/hdlcd_drv.c | 9 +----- drivers/gpu/drm/arm/malidp_drv.c | 11 +------ drivers/gpu/drm/armada/armada_drv.c | 10 ++++--- drivers/gpu/drm/drm_of.c | 29 +++---------------- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +-- .../gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 3 +- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 3 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 4 +-- drivers/gpu/drm/msm/msm_drv.c | 14 ++++----- drivers/gpu/drm/sti/sti_drv.c | 3 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 3 +- drivers/gpu/drm/tilcdc/tilcdc_external.c | 10 ++----- drivers/iommu/mtk_iommu.c | 3 +- drivers/iommu/mtk_iommu_v1.c | 3 +- include/drm/drm_of.h | 12 -------- include/linux/component.h | 9 ++++++ sound/soc/codecs/wcd938x.c | 6 ++-- 18 files changed, 46 insertions(+), 96 deletions(-) -- 2.35.1.1320.gc452695387.dirty ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 1/3] component: Add helper for device nodes 2022-12-22 23:37 ` Sean Anderson @ 2022-12-22 23:37 ` Sean Anderson -1 siblings, 0 replies; 28+ messages in thread From: Sean Anderson @ 2022-12-22 23:37 UTC (permalink / raw) To: David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel Cc: Sean Anderson, linux-kernel There is a common case where component_patch_add_release is called with component_release_of/component_compare_of and a device node. Add a helper. Signed-off-by: Sean Anderson <sean.anderson@seco.com> --- Changes in v2: - Split off conversion from helper addition include/linux/component.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/component.h b/include/linux/component.h index df4aa75c9e7c..fb5d2dbc34d8 100644 --- a/include/linux/component.h +++ b/include/linux/component.h @@ -6,6 +6,7 @@ struct device; +struct device_node; /** * struct component_ops - callbacks for component drivers @@ -128,4 +129,12 @@ static inline void component_match_add(struct device *parent, compare_data); } +static inline void component_match_add_of(struct device *parent, + struct component_match **matchptr, + struct device_node *node) +{ + component_match_add_release(parent, matchptr, component_release_of, + component_compare_of, node); +} + #endif -- 2.35.1.1320.gc452695387.dirty ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 1/3] component: Add helper for device nodes @ 2022-12-22 23:37 ` Sean Anderson 0 siblings, 0 replies; 28+ messages in thread From: Sean Anderson @ 2022-12-22 23:37 UTC (permalink / raw) To: David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel Cc: linux-kernel, Sean Anderson There is a common case where component_patch_add_release is called with component_release_of/component_compare_of and a device node. Add a helper. Signed-off-by: Sean Anderson <sean.anderson@seco.com> --- Changes in v2: - Split off conversion from helper addition include/linux/component.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/component.h b/include/linux/component.h index df4aa75c9e7c..fb5d2dbc34d8 100644 --- a/include/linux/component.h +++ b/include/linux/component.h @@ -6,6 +6,7 @@ struct device; +struct device_node; /** * struct component_ops - callbacks for component drivers @@ -128,4 +129,12 @@ static inline void component_match_add(struct device *parent, compare_data); } +static inline void component_match_add_of(struct device *parent, + struct component_match **matchptr, + struct device_node *node) +{ + component_match_add_release(parent, matchptr, component_release_of, + component_compare_of, node); +} + #endif -- 2.35.1.1320.gc452695387.dirty ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper 2022-12-22 23:37 ` Sean Anderson (?) (?) @ 2022-12-22 23:37 ` Sean Anderson -1 siblings, 0 replies; 28+ messages in thread From: Sean Anderson @ 2022-12-22 23:37 UTC (permalink / raw) To: David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel Cc: alsa-devel, Sean Anderson, Will Deacon, Joerg Roedel, Takashi Iwai, Liam Girdwood, linux-kernel, iommu, Mark Brown, linux-mediatek, linux-arm-kernel, Matthias Brugger, Robin Murphy, Yong Wu Convert users of component_match_add_release with component_release_of and component_compare_of to component_match_add_of. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Acked-by: Mark Brown <broonie@kernel.org> --- Changes in v2: - Split off from helper addition drivers/iommu/mtk_iommu.c | 3 +-- drivers/iommu/mtk_iommu_v1.c | 3 +-- sound/soc/codecs/wcd938x.c | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 2ab2ecfe01f8..483b7a9e4410 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m } data->larb_imu[id].dev = &plarbdev->dev; - component_match_add_release(dev, match, component_release_of, - component_compare_of, larbnode); + component_match_add_of(dev, match, larbnode); } /* Get smi-(sub)-common dev from the last larb. */ diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c index 6e0e65831eb7..fb09ed6bf550 100644 --- a/drivers/iommu/mtk_iommu_v1.c +++ b/drivers/iommu/mtk_iommu_v1.c @@ -672,8 +672,7 @@ static int mtk_iommu_v1_probe(struct platform_device *pdev) } data->larb_imu[i].dev = &plarbdev->dev; - component_match_add_release(dev, &match, component_release_of, - component_compare_of, larbnode); + component_match_add_of(dev, &match, larbnode); } platform_set_drvdata(pdev, data); diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index aca06a4026f3..2f8444e54083 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -4474,8 +4474,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, } of_node_get(wcd938x->rxnode); - component_match_add_release(dev, matchptr, component_release_of, - component_compare_of, wcd938x->rxnode); + component_match_add_of(dev, matchptr, wcd938x->rxnode); wcd938x->txnode = of_parse_phandle(np, "qcom,tx-device", 0); if (!wcd938x->txnode) { @@ -4483,8 +4482,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, return -ENODEV; } of_node_get(wcd938x->txnode); - component_match_add_release(dev, matchptr, component_release_of, - component_compare_of, wcd938x->txnode); + component_match_add_of(dev, matchptr, wcd938x->txnode); return 0; } -- 2.35.1.1320.gc452695387.dirty ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper @ 2022-12-22 23:37 ` Sean Anderson 0 siblings, 0 replies; 28+ messages in thread From: Sean Anderson @ 2022-12-22 23:37 UTC (permalink / raw) To: David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel Cc: alsa-devel, Sean Anderson, Will Deacon, Joerg Roedel, Takashi Iwai, Liam Girdwood, linux-kernel, iommu, Mark Brown, linux-mediatek, linux-arm-kernel, Matthias Brugger, Jaroslav Kysela, Robin Murphy, Yong Wu Convert users of component_match_add_release with component_release_of and component_compare_of to component_match_add_of. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Acked-by: Mark Brown <broonie@kernel.org> --- Changes in v2: - Split off from helper addition drivers/iommu/mtk_iommu.c | 3 +-- drivers/iommu/mtk_iommu_v1.c | 3 +-- sound/soc/codecs/wcd938x.c | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 2ab2ecfe01f8..483b7a9e4410 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m } data->larb_imu[id].dev = &plarbdev->dev; - component_match_add_release(dev, match, component_release_of, - component_compare_of, larbnode); + component_match_add_of(dev, match, larbnode); } /* Get smi-(sub)-common dev from the last larb. */ diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c index 6e0e65831eb7..fb09ed6bf550 100644 --- a/drivers/iommu/mtk_iommu_v1.c +++ b/drivers/iommu/mtk_iommu_v1.c @@ -672,8 +672,7 @@ static int mtk_iommu_v1_probe(struct platform_device *pdev) } data->larb_imu[i].dev = &plarbdev->dev; - component_match_add_release(dev, &match, component_release_of, - component_compare_of, larbnode); + component_match_add_of(dev, &match, larbnode); } platform_set_drvdata(pdev, data); diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index aca06a4026f3..2f8444e54083 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -4474,8 +4474,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, } of_node_get(wcd938x->rxnode); - component_match_add_release(dev, matchptr, component_release_of, - component_compare_of, wcd938x->rxnode); + component_match_add_of(dev, matchptr, wcd938x->rxnode); wcd938x->txnode = of_parse_phandle(np, "qcom,tx-device", 0); if (!wcd938x->txnode) { @@ -4483,8 +4482,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, return -ENODEV; } of_node_get(wcd938x->txnode); - component_match_add_release(dev, matchptr, component_release_of, - component_compare_of, wcd938x->txnode); + component_match_add_of(dev, matchptr, wcd938x->txnode); return 0; } -- 2.35.1.1320.gc452695387.dirty ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper @ 2022-12-22 23:37 ` Sean Anderson 0 siblings, 0 replies; 28+ messages in thread From: Sean Anderson @ 2022-12-22 23:37 UTC (permalink / raw) To: David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel Cc: linux-kernel, Sean Anderson, Mark Brown, Jaroslav Kysela, Joerg Roedel, Liam Girdwood, Matthias Brugger, Robin Murphy, Takashi Iwai, Will Deacon, Yong Wu, alsa-devel, iommu, linux-arm-kernel, linux-mediatek Convert users of component_match_add_release with component_release_of and component_compare_of to component_match_add_of. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Acked-by: Mark Brown <broonie@kernel.org> --- Changes in v2: - Split off from helper addition drivers/iommu/mtk_iommu.c | 3 +-- drivers/iommu/mtk_iommu_v1.c | 3 +-- sound/soc/codecs/wcd938x.c | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 2ab2ecfe01f8..483b7a9e4410 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m } data->larb_imu[id].dev = &plarbdev->dev; - component_match_add_release(dev, match, component_release_of, - component_compare_of, larbnode); + component_match_add_of(dev, match, larbnode); } /* Get smi-(sub)-common dev from the last larb. */ diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c index 6e0e65831eb7..fb09ed6bf550 100644 --- a/drivers/iommu/mtk_iommu_v1.c +++ b/drivers/iommu/mtk_iommu_v1.c @@ -672,8 +672,7 @@ static int mtk_iommu_v1_probe(struct platform_device *pdev) } data->larb_imu[i].dev = &plarbdev->dev; - component_match_add_release(dev, &match, component_release_of, - component_compare_of, larbnode); + component_match_add_of(dev, &match, larbnode); } platform_set_drvdata(pdev, data); diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index aca06a4026f3..2f8444e54083 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -4474,8 +4474,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, } of_node_get(wcd938x->rxnode); - component_match_add_release(dev, matchptr, component_release_of, - component_compare_of, wcd938x->rxnode); + component_match_add_of(dev, matchptr, wcd938x->rxnode); wcd938x->txnode = of_parse_phandle(np, "qcom,tx-device", 0); if (!wcd938x->txnode) { @@ -4483,8 +4482,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, return -ENODEV; } of_node_get(wcd938x->txnode); - component_match_add_release(dev, matchptr, component_release_of, - component_compare_of, wcd938x->txnode); + component_match_add_of(dev, matchptr, wcd938x->txnode); return 0; } -- 2.35.1.1320.gc452695387.dirty _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper @ 2022-12-22 23:37 ` Sean Anderson 0 siblings, 0 replies; 28+ messages in thread From: Sean Anderson @ 2022-12-22 23:37 UTC (permalink / raw) To: David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel Cc: linux-kernel, Sean Anderson, Mark Brown, Jaroslav Kysela, Joerg Roedel, Liam Girdwood, Matthias Brugger, Robin Murphy, Takashi Iwai, Will Deacon, Yong Wu, alsa-devel, iommu, linux-arm-kernel, linux-mediatek Convert users of component_match_add_release with component_release_of and component_compare_of to component_match_add_of. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Acked-by: Mark Brown <broonie@kernel.org> --- Changes in v2: - Split off from helper addition drivers/iommu/mtk_iommu.c | 3 +-- drivers/iommu/mtk_iommu_v1.c | 3 +-- sound/soc/codecs/wcd938x.c | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 2ab2ecfe01f8..483b7a9e4410 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m } data->larb_imu[id].dev = &plarbdev->dev; - component_match_add_release(dev, match, component_release_of, - component_compare_of, larbnode); + component_match_add_of(dev, match, larbnode); } /* Get smi-(sub)-common dev from the last larb. */ diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c index 6e0e65831eb7..fb09ed6bf550 100644 --- a/drivers/iommu/mtk_iommu_v1.c +++ b/drivers/iommu/mtk_iommu_v1.c @@ -672,8 +672,7 @@ static int mtk_iommu_v1_probe(struct platform_device *pdev) } data->larb_imu[i].dev = &plarbdev->dev; - component_match_add_release(dev, &match, component_release_of, - component_compare_of, larbnode); + component_match_add_of(dev, &match, larbnode); } platform_set_drvdata(pdev, data); diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index aca06a4026f3..2f8444e54083 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -4474,8 +4474,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, } of_node_get(wcd938x->rxnode); - component_match_add_release(dev, matchptr, component_release_of, - component_compare_of, wcd938x->rxnode); + component_match_add_of(dev, matchptr, wcd938x->rxnode); wcd938x->txnode = of_parse_phandle(np, "qcom,tx-device", 0); if (!wcd938x->txnode) { @@ -4483,8 +4482,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, return -ENODEV; } of_node_get(wcd938x->txnode); - component_match_add_release(dev, matchptr, component_release_of, - component_compare_of, wcd938x->txnode); + component_match_add_of(dev, matchptr, wcd938x->txnode); return 0; } -- 2.35.1.1320.gc452695387.dirty ^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper 2022-12-22 23:37 ` Sean Anderson (?) (?) @ 2023-01-03 13:01 ` Robin Murphy -1 siblings, 0 replies; 28+ messages in thread From: Robin Murphy @ 2023-01-03 13:01 UTC (permalink / raw) To: Sean Anderson, David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel Cc: alsa-devel, Joerg Roedel, Takashi Iwai, Liam Girdwood, linux-kernel, iommu, Mark Brown, linux-mediatek, linux-arm-kernel, Matthias Brugger, Will Deacon, Yong Wu Hi Sean, On 22/12/2022 11:37 pm, Sean Anderson wrote: > Convert users of component_match_add_release with component_release_of > and component_compare_of to component_match_add_of. > > Signed-off-by: Sean Anderson <sean.anderson@seco.com> > Acked-by: Mark Brown <broonie@kernel.org> > --- > > Changes in v2: > - Split off from helper addition > > drivers/iommu/mtk_iommu.c | 3 +-- > drivers/iommu/mtk_iommu_v1.c | 3 +-- > sound/soc/codecs/wcd938x.c | 6 ++---- > 3 files changed, 4 insertions(+), 8 deletions(-) > > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c > index 2ab2ecfe01f8..483b7a9e4410 100644 > --- a/drivers/iommu/mtk_iommu.c > +++ b/drivers/iommu/mtk_iommu.c > @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m > } > data->larb_imu[id].dev = &plarbdev->dev; > > - component_match_add_release(dev, match, component_release_of, > - component_compare_of, larbnode); > + component_match_add_of(dev, match, larbnode); I've long since given up trying to make sense of how the DRM tree works, but the conflicting change is definitely already in mainline: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 Thanks, Robin. > } > > /* Get smi-(sub)-common dev from the last larb. */ > diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c > index 6e0e65831eb7..fb09ed6bf550 100644 > --- a/drivers/iommu/mtk_iommu_v1.c > +++ b/drivers/iommu/mtk_iommu_v1.c > @@ -672,8 +672,7 @@ static int mtk_iommu_v1_probe(struct platform_device *pdev) > } > data->larb_imu[i].dev = &plarbdev->dev; > > - component_match_add_release(dev, &match, component_release_of, > - component_compare_of, larbnode); > + component_match_add_of(dev, &match, larbnode); > } > > platform_set_drvdata(pdev, data); > diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c > index aca06a4026f3..2f8444e54083 100644 > --- a/sound/soc/codecs/wcd938x.c > +++ b/sound/soc/codecs/wcd938x.c > @@ -4474,8 +4474,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, > } > > of_node_get(wcd938x->rxnode); > - component_match_add_release(dev, matchptr, component_release_of, > - component_compare_of, wcd938x->rxnode); > + component_match_add_of(dev, matchptr, wcd938x->rxnode); > > wcd938x->txnode = of_parse_phandle(np, "qcom,tx-device", 0); > if (!wcd938x->txnode) { > @@ -4483,8 +4482,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, > return -ENODEV; > } > of_node_get(wcd938x->txnode); > - component_match_add_release(dev, matchptr, component_release_of, > - component_compare_of, wcd938x->txnode); > + component_match_add_of(dev, matchptr, wcd938x->txnode); > return 0; > } > ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper @ 2023-01-03 13:01 ` Robin Murphy 0 siblings, 0 replies; 28+ messages in thread From: Robin Murphy @ 2023-01-03 13:01 UTC (permalink / raw) To: Sean Anderson, David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel Cc: alsa-devel, Joerg Roedel, Takashi Iwai, Liam Girdwood, linux-kernel, iommu, Mark Brown, linux-mediatek, linux-arm-kernel, Matthias Brugger, Jaroslav Kysela, Will Deacon, Yong Wu Hi Sean, On 22/12/2022 11:37 pm, Sean Anderson wrote: > Convert users of component_match_add_release with component_release_of > and component_compare_of to component_match_add_of. > > Signed-off-by: Sean Anderson <sean.anderson@seco.com> > Acked-by: Mark Brown <broonie@kernel.org> > --- > > Changes in v2: > - Split off from helper addition > > drivers/iommu/mtk_iommu.c | 3 +-- > drivers/iommu/mtk_iommu_v1.c | 3 +-- > sound/soc/codecs/wcd938x.c | 6 ++---- > 3 files changed, 4 insertions(+), 8 deletions(-) > > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c > index 2ab2ecfe01f8..483b7a9e4410 100644 > --- a/drivers/iommu/mtk_iommu.c > +++ b/drivers/iommu/mtk_iommu.c > @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m > } > data->larb_imu[id].dev = &plarbdev->dev; > > - component_match_add_release(dev, match, component_release_of, > - component_compare_of, larbnode); > + component_match_add_of(dev, match, larbnode); I've long since given up trying to make sense of how the DRM tree works, but the conflicting change is definitely already in mainline: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 Thanks, Robin. > } > > /* Get smi-(sub)-common dev from the last larb. */ > diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c > index 6e0e65831eb7..fb09ed6bf550 100644 > --- a/drivers/iommu/mtk_iommu_v1.c > +++ b/drivers/iommu/mtk_iommu_v1.c > @@ -672,8 +672,7 @@ static int mtk_iommu_v1_probe(struct platform_device *pdev) > } > data->larb_imu[i].dev = &plarbdev->dev; > > - component_match_add_release(dev, &match, component_release_of, > - component_compare_of, larbnode); > + component_match_add_of(dev, &match, larbnode); > } > > platform_set_drvdata(pdev, data); > diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c > index aca06a4026f3..2f8444e54083 100644 > --- a/sound/soc/codecs/wcd938x.c > +++ b/sound/soc/codecs/wcd938x.c > @@ -4474,8 +4474,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, > } > > of_node_get(wcd938x->rxnode); > - component_match_add_release(dev, matchptr, component_release_of, > - component_compare_of, wcd938x->rxnode); > + component_match_add_of(dev, matchptr, wcd938x->rxnode); > > wcd938x->txnode = of_parse_phandle(np, "qcom,tx-device", 0); > if (!wcd938x->txnode) { > @@ -4483,8 +4482,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, > return -ENODEV; > } > of_node_get(wcd938x->txnode); > - component_match_add_release(dev, matchptr, component_release_of, > - component_compare_of, wcd938x->txnode); > + component_match_add_of(dev, matchptr, wcd938x->txnode); > return 0; > } > ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper @ 2023-01-03 13:01 ` Robin Murphy 0 siblings, 0 replies; 28+ messages in thread From: Robin Murphy @ 2023-01-03 13:01 UTC (permalink / raw) To: Sean Anderson, David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel Cc: linux-kernel, Mark Brown, Jaroslav Kysela, Joerg Roedel, Liam Girdwood, Matthias Brugger, Takashi Iwai, Will Deacon, Yong Wu, alsa-devel, iommu, linux-arm-kernel, linux-mediatek Hi Sean, On 22/12/2022 11:37 pm, Sean Anderson wrote: > Convert users of component_match_add_release with component_release_of > and component_compare_of to component_match_add_of. > > Signed-off-by: Sean Anderson <sean.anderson@seco.com> > Acked-by: Mark Brown <broonie@kernel.org> > --- > > Changes in v2: > - Split off from helper addition > > drivers/iommu/mtk_iommu.c | 3 +-- > drivers/iommu/mtk_iommu_v1.c | 3 +-- > sound/soc/codecs/wcd938x.c | 6 ++---- > 3 files changed, 4 insertions(+), 8 deletions(-) > > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c > index 2ab2ecfe01f8..483b7a9e4410 100644 > --- a/drivers/iommu/mtk_iommu.c > +++ b/drivers/iommu/mtk_iommu.c > @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m > } > data->larb_imu[id].dev = &plarbdev->dev; > > - component_match_add_release(dev, match, component_release_of, > - component_compare_of, larbnode); > + component_match_add_of(dev, match, larbnode); I've long since given up trying to make sense of how the DRM tree works, but the conflicting change is definitely already in mainline: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 Thanks, Robin. > } > > /* Get smi-(sub)-common dev from the last larb. */ > diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c > index 6e0e65831eb7..fb09ed6bf550 100644 > --- a/drivers/iommu/mtk_iommu_v1.c > +++ b/drivers/iommu/mtk_iommu_v1.c > @@ -672,8 +672,7 @@ static int mtk_iommu_v1_probe(struct platform_device *pdev) > } > data->larb_imu[i].dev = &plarbdev->dev; > > - component_match_add_release(dev, &match, component_release_of, > - component_compare_of, larbnode); > + component_match_add_of(dev, &match, larbnode); > } > > platform_set_drvdata(pdev, data); > diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c > index aca06a4026f3..2f8444e54083 100644 > --- a/sound/soc/codecs/wcd938x.c > +++ b/sound/soc/codecs/wcd938x.c > @@ -4474,8 +4474,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, > } > > of_node_get(wcd938x->rxnode); > - component_match_add_release(dev, matchptr, component_release_of, > - component_compare_of, wcd938x->rxnode); > + component_match_add_of(dev, matchptr, wcd938x->rxnode); > > wcd938x->txnode = of_parse_phandle(np, "qcom,tx-device", 0); > if (!wcd938x->txnode) { > @@ -4483,8 +4482,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, > return -ENODEV; > } > of_node_get(wcd938x->txnode); > - component_match_add_release(dev, matchptr, component_release_of, > - component_compare_of, wcd938x->txnode); > + component_match_add_of(dev, matchptr, wcd938x->txnode); > return 0; > } > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper @ 2023-01-03 13:01 ` Robin Murphy 0 siblings, 0 replies; 28+ messages in thread From: Robin Murphy @ 2023-01-03 13:01 UTC (permalink / raw) To: Sean Anderson, David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel Cc: linux-kernel, Mark Brown, Jaroslav Kysela, Joerg Roedel, Liam Girdwood, Matthias Brugger, Takashi Iwai, Will Deacon, Yong Wu, alsa-devel, iommu, linux-arm-kernel, linux-mediatek Hi Sean, On 22/12/2022 11:37 pm, Sean Anderson wrote: > Convert users of component_match_add_release with component_release_of > and component_compare_of to component_match_add_of. > > Signed-off-by: Sean Anderson <sean.anderson@seco.com> > Acked-by: Mark Brown <broonie@kernel.org> > --- > > Changes in v2: > - Split off from helper addition > > drivers/iommu/mtk_iommu.c | 3 +-- > drivers/iommu/mtk_iommu_v1.c | 3 +-- > sound/soc/codecs/wcd938x.c | 6 ++---- > 3 files changed, 4 insertions(+), 8 deletions(-) > > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c > index 2ab2ecfe01f8..483b7a9e4410 100644 > --- a/drivers/iommu/mtk_iommu.c > +++ b/drivers/iommu/mtk_iommu.c > @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m > } > data->larb_imu[id].dev = &plarbdev->dev; > > - component_match_add_release(dev, match, component_release_of, > - component_compare_of, larbnode); > + component_match_add_of(dev, match, larbnode); I've long since given up trying to make sense of how the DRM tree works, but the conflicting change is definitely already in mainline: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 Thanks, Robin. > } > > /* Get smi-(sub)-common dev from the last larb. */ > diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c > index 6e0e65831eb7..fb09ed6bf550 100644 > --- a/drivers/iommu/mtk_iommu_v1.c > +++ b/drivers/iommu/mtk_iommu_v1.c > @@ -672,8 +672,7 @@ static int mtk_iommu_v1_probe(struct platform_device *pdev) > } > data->larb_imu[i].dev = &plarbdev->dev; > > - component_match_add_release(dev, &match, component_release_of, > - component_compare_of, larbnode); > + component_match_add_of(dev, &match, larbnode); > } > > platform_set_drvdata(pdev, data); > diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c > index aca06a4026f3..2f8444e54083 100644 > --- a/sound/soc/codecs/wcd938x.c > +++ b/sound/soc/codecs/wcd938x.c > @@ -4474,8 +4474,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, > } > > of_node_get(wcd938x->rxnode); > - component_match_add_release(dev, matchptr, component_release_of, > - component_compare_of, wcd938x->rxnode); > + component_match_add_of(dev, matchptr, wcd938x->rxnode); > > wcd938x->txnode = of_parse_phandle(np, "qcom,tx-device", 0); > if (!wcd938x->txnode) { > @@ -4483,8 +4482,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, > return -ENODEV; > } > of_node_get(wcd938x->txnode); > - component_match_add_release(dev, matchptr, component_release_of, > - component_compare_of, wcd938x->txnode); > + component_match_add_of(dev, matchptr, wcd938x->txnode); > return 0; > } > ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper 2023-01-03 13:01 ` Robin Murphy (?) (?) @ 2023-01-03 16:15 ` Maxime Ripard -1 siblings, 0 replies; 28+ messages in thread From: Maxime Ripard @ 2023-01-03 16:15 UTC (permalink / raw) To: Robin Murphy Cc: alsa-devel, Daniel Vetter, Liam Girdwood, Sean Anderson, Will Deacon, Joerg Roedel, Takashi Iwai, Maarten Lankhorst, linux-kernel, dri-devel, iommu, Mark Brown, linux-mediatek, linux-arm-kernel, Thomas Zimmermann, Matthias Brugger, David Airlie, Yong Wu [-- Attachment #1: Type: text/plain, Size: 1721 bytes --] Hi Robin, On Tue, Jan 03, 2023 at 01:01:07PM +0000, Robin Murphy wrote: > Hi Sean, > > On 22/12/2022 11:37 pm, Sean Anderson wrote: > > Convert users of component_match_add_release with component_release_of > > and component_compare_of to component_match_add_of. > > > > Signed-off-by: Sean Anderson <sean.anderson@seco.com> > > Acked-by: Mark Brown <broonie@kernel.org> > > --- > > > > Changes in v2: > > - Split off from helper addition > > > > drivers/iommu/mtk_iommu.c | 3 +-- > > drivers/iommu/mtk_iommu_v1.c | 3 +-- > > sound/soc/codecs/wcd938x.c | 6 ++---- > > 3 files changed, 4 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c > > index 2ab2ecfe01f8..483b7a9e4410 100644 > > --- a/drivers/iommu/mtk_iommu.c > > +++ b/drivers/iommu/mtk_iommu.c > > @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m > > } > > data->larb_imu[id].dev = &plarbdev->dev; > > - component_match_add_release(dev, match, component_release_of, > > - component_compare_of, larbnode); > > + component_match_add_of(dev, match, larbnode); > > I've long since given up trying to make sense of how the DRM tree works, but > the conflicting change is definitely already in mainline: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 As far as I can see, that patch doesn't affect DRM at all, and the commit you pointed to doesn't either, nor has it been merged through the DRM tree. Can you expand a bit on how we're involved in this, what we should clarify or help with? Maxime [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper @ 2023-01-03 16:15 ` Maxime Ripard 0 siblings, 0 replies; 28+ messages in thread From: Maxime Ripard @ 2023-01-03 16:15 UTC (permalink / raw) To: Robin Murphy Cc: alsa-devel, Liam Girdwood, Sean Anderson, Will Deacon, Joerg Roedel, Takashi Iwai, linux-kernel, dri-devel, Jaroslav Kysela, iommu, Mark Brown, linux-mediatek, linux-arm-kernel, Thomas Zimmermann, Matthias Brugger, Yong Wu [-- Attachment #1: Type: text/plain, Size: 1721 bytes --] Hi Robin, On Tue, Jan 03, 2023 at 01:01:07PM +0000, Robin Murphy wrote: > Hi Sean, > > On 22/12/2022 11:37 pm, Sean Anderson wrote: > > Convert users of component_match_add_release with component_release_of > > and component_compare_of to component_match_add_of. > > > > Signed-off-by: Sean Anderson <sean.anderson@seco.com> > > Acked-by: Mark Brown <broonie@kernel.org> > > --- > > > > Changes in v2: > > - Split off from helper addition > > > > drivers/iommu/mtk_iommu.c | 3 +-- > > drivers/iommu/mtk_iommu_v1.c | 3 +-- > > sound/soc/codecs/wcd938x.c | 6 ++---- > > 3 files changed, 4 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c > > index 2ab2ecfe01f8..483b7a9e4410 100644 > > --- a/drivers/iommu/mtk_iommu.c > > +++ b/drivers/iommu/mtk_iommu.c > > @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m > > } > > data->larb_imu[id].dev = &plarbdev->dev; > > - component_match_add_release(dev, match, component_release_of, > > - component_compare_of, larbnode); > > + component_match_add_of(dev, match, larbnode); > > I've long since given up trying to make sense of how the DRM tree works, but > the conflicting change is definitely already in mainline: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 As far as I can see, that patch doesn't affect DRM at all, and the commit you pointed to doesn't either, nor has it been merged through the DRM tree. Can you expand a bit on how we're involved in this, what we should clarify or help with? Maxime [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper @ 2023-01-03 16:15 ` Maxime Ripard 0 siblings, 0 replies; 28+ messages in thread From: Maxime Ripard @ 2023-01-03 16:15 UTC (permalink / raw) To: Robin Murphy Cc: Sean Anderson, David Airlie, Daniel Vetter, Maarten Lankhorst, Thomas Zimmermann, dri-devel, linux-kernel, Mark Brown, Jaroslav Kysela, Joerg Roedel, Liam Girdwood, Matthias Brugger, Takashi Iwai, Will Deacon, Yong Wu, alsa-devel, iommu, linux-arm-kernel, linux-mediatek [-- Attachment #1.1: Type: text/plain, Size: 1721 bytes --] Hi Robin, On Tue, Jan 03, 2023 at 01:01:07PM +0000, Robin Murphy wrote: > Hi Sean, > > On 22/12/2022 11:37 pm, Sean Anderson wrote: > > Convert users of component_match_add_release with component_release_of > > and component_compare_of to component_match_add_of. > > > > Signed-off-by: Sean Anderson <sean.anderson@seco.com> > > Acked-by: Mark Brown <broonie@kernel.org> > > --- > > > > Changes in v2: > > - Split off from helper addition > > > > drivers/iommu/mtk_iommu.c | 3 +-- > > drivers/iommu/mtk_iommu_v1.c | 3 +-- > > sound/soc/codecs/wcd938x.c | 6 ++---- > > 3 files changed, 4 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c > > index 2ab2ecfe01f8..483b7a9e4410 100644 > > --- a/drivers/iommu/mtk_iommu.c > > +++ b/drivers/iommu/mtk_iommu.c > > @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m > > } > > data->larb_imu[id].dev = &plarbdev->dev; > > - component_match_add_release(dev, match, component_release_of, > > - component_compare_of, larbnode); > > + component_match_add_of(dev, match, larbnode); > > I've long since given up trying to make sense of how the DRM tree works, but > the conflicting change is definitely already in mainline: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 As far as I can see, that patch doesn't affect DRM at all, and the commit you pointed to doesn't either, nor has it been merged through the DRM tree. Can you expand a bit on how we're involved in this, what we should clarify or help with? Maxime [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper @ 2023-01-03 16:15 ` Maxime Ripard 0 siblings, 0 replies; 28+ messages in thread From: Maxime Ripard @ 2023-01-03 16:15 UTC (permalink / raw) To: Robin Murphy Cc: Sean Anderson, David Airlie, Daniel Vetter, Maarten Lankhorst, Thomas Zimmermann, dri-devel, linux-kernel, Mark Brown, Jaroslav Kysela, Joerg Roedel, Liam Girdwood, Matthias Brugger, Takashi Iwai, Will Deacon, Yong Wu, alsa-devel, iommu, linux-arm-kernel, linux-mediatek [-- Attachment #1: Type: text/plain, Size: 1721 bytes --] Hi Robin, On Tue, Jan 03, 2023 at 01:01:07PM +0000, Robin Murphy wrote: > Hi Sean, > > On 22/12/2022 11:37 pm, Sean Anderson wrote: > > Convert users of component_match_add_release with component_release_of > > and component_compare_of to component_match_add_of. > > > > Signed-off-by: Sean Anderson <sean.anderson@seco.com> > > Acked-by: Mark Brown <broonie@kernel.org> > > --- > > > > Changes in v2: > > - Split off from helper addition > > > > drivers/iommu/mtk_iommu.c | 3 +-- > > drivers/iommu/mtk_iommu_v1.c | 3 +-- > > sound/soc/codecs/wcd938x.c | 6 ++---- > > 3 files changed, 4 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c > > index 2ab2ecfe01f8..483b7a9e4410 100644 > > --- a/drivers/iommu/mtk_iommu.c > > +++ b/drivers/iommu/mtk_iommu.c > > @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m > > } > > data->larb_imu[id].dev = &plarbdev->dev; > > - component_match_add_release(dev, match, component_release_of, > > - component_compare_of, larbnode); > > + component_match_add_of(dev, match, larbnode); > > I've long since given up trying to make sense of how the DRM tree works, but > the conflicting change is definitely already in mainline: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 As far as I can see, that patch doesn't affect DRM at all, and the commit you pointed to doesn't either, nor has it been merged through the DRM tree. Can you expand a bit on how we're involved in this, what we should clarify or help with? Maxime [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper 2023-01-03 16:15 ` Maxime Ripard (?) (?) @ 2023-01-03 16:24 ` Sean Anderson -1 siblings, 0 replies; 28+ messages in thread From: Sean Anderson @ 2023-01-03 16:24 UTC (permalink / raw) To: Maxime Ripard, Robin Murphy Cc: alsa-devel, Daniel Vetter, Liam Girdwood, Will Deacon, Joerg Roedel, Takashi Iwai, Maarten Lankhorst, linux-kernel, dri-devel, iommu, Mark Brown, linux-mediatek, linux-arm-kernel, Thomas Zimmermann, Matthias Brugger, David Airlie, Yong Wu On 1/3/23 11:15, Maxime Ripard wrote: > Hi Robin, > > On Tue, Jan 03, 2023 at 01:01:07PM +0000, Robin Murphy wrote: >> Hi Sean, >> >> On 22/12/2022 11:37 pm, Sean Anderson wrote: >> > Convert users of component_match_add_release with component_release_of >> > and component_compare_of to component_match_add_of. >> > >> > Signed-off-by: Sean Anderson <sean.anderson@seco.com> >> > Acked-by: Mark Brown <broonie@kernel.org> >> > --- >> > >> > Changes in v2: >> > - Split off from helper addition >> > >> > drivers/iommu/mtk_iommu.c | 3 +-- >> > drivers/iommu/mtk_iommu_v1.c | 3 +-- >> > sound/soc/codecs/wcd938x.c | 6 ++---- >> > 3 files changed, 4 insertions(+), 8 deletions(-) >> > >> > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c >> > index 2ab2ecfe01f8..483b7a9e4410 100644 >> > --- a/drivers/iommu/mtk_iommu.c >> > +++ b/drivers/iommu/mtk_iommu.c >> > @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m >> > } >> > data->larb_imu[id].dev = &plarbdev->dev; >> > - component_match_add_release(dev, match, component_release_of, >> > - component_compare_of, larbnode); >> > + component_match_add_of(dev, match, larbnode); >> >> I've long since given up trying to make sense of how the DRM tree works, but >> the conflicting change is definitely already in mainline: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 > > As far as I can see, that patch doesn't affect DRM at all, and the > commit you pointed to doesn't either, nor has it been merged through the > DRM tree. > > Can you expand a bit on how we're involved in this, what we should > clarify or help with? Patches 2 and 3 of this series depend on patch 1. Since patch 3 contains the bulk of the changes, I based this series on the drm-next tree. However, patch 2 has a conflict elswhere in the tree, which did not appear until 6.2-rc1. At the time I sent out this series, drm-next did not contain this commit, and I couldn't find it based on Robin's description [1], so now we end up with a conflict. As this commit has now been merged into drm-next, I can rebase and resend if there are no other comments. --Sean [1] https://lore.kernel.org/linux-arm-kernel/56310773-a062-0e48-28f7-6d2c5d035fee@seco.com/ ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper @ 2023-01-03 16:24 ` Sean Anderson 0 siblings, 0 replies; 28+ messages in thread From: Sean Anderson @ 2023-01-03 16:24 UTC (permalink / raw) To: Maxime Ripard, Robin Murphy Cc: alsa-devel, Liam Girdwood, Will Deacon, Joerg Roedel, Takashi Iwai, linux-kernel, dri-devel, Jaroslav Kysela, iommu, Mark Brown, linux-mediatek, linux-arm-kernel, Thomas Zimmermann, Matthias Brugger, Yong Wu On 1/3/23 11:15, Maxime Ripard wrote: > Hi Robin, > > On Tue, Jan 03, 2023 at 01:01:07PM +0000, Robin Murphy wrote: >> Hi Sean, >> >> On 22/12/2022 11:37 pm, Sean Anderson wrote: >> > Convert users of component_match_add_release with component_release_of >> > and component_compare_of to component_match_add_of. >> > >> > Signed-off-by: Sean Anderson <sean.anderson@seco.com> >> > Acked-by: Mark Brown <broonie@kernel.org> >> > --- >> > >> > Changes in v2: >> > - Split off from helper addition >> > >> > drivers/iommu/mtk_iommu.c | 3 +-- >> > drivers/iommu/mtk_iommu_v1.c | 3 +-- >> > sound/soc/codecs/wcd938x.c | 6 ++---- >> > 3 files changed, 4 insertions(+), 8 deletions(-) >> > >> > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c >> > index 2ab2ecfe01f8..483b7a9e4410 100644 >> > --- a/drivers/iommu/mtk_iommu.c >> > +++ b/drivers/iommu/mtk_iommu.c >> > @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m >> > } >> > data->larb_imu[id].dev = &plarbdev->dev; >> > - component_match_add_release(dev, match, component_release_of, >> > - component_compare_of, larbnode); >> > + component_match_add_of(dev, match, larbnode); >> >> I've long since given up trying to make sense of how the DRM tree works, but >> the conflicting change is definitely already in mainline: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 > > As far as I can see, that patch doesn't affect DRM at all, and the > commit you pointed to doesn't either, nor has it been merged through the > DRM tree. > > Can you expand a bit on how we're involved in this, what we should > clarify or help with? Patches 2 and 3 of this series depend on patch 1. Since patch 3 contains the bulk of the changes, I based this series on the drm-next tree. However, patch 2 has a conflict elswhere in the tree, which did not appear until 6.2-rc1. At the time I sent out this series, drm-next did not contain this commit, and I couldn't find it based on Robin's description [1], so now we end up with a conflict. As this commit has now been merged into drm-next, I can rebase and resend if there are no other comments. --Sean [1] https://lore.kernel.org/linux-arm-kernel/56310773-a062-0e48-28f7-6d2c5d035fee@seco.com/ ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper @ 2023-01-03 16:24 ` Sean Anderson 0 siblings, 0 replies; 28+ messages in thread From: Sean Anderson @ 2023-01-03 16:24 UTC (permalink / raw) To: Maxime Ripard, Robin Murphy Cc: David Airlie, Daniel Vetter, Maarten Lankhorst, Thomas Zimmermann, dri-devel, linux-kernel, Mark Brown, Jaroslav Kysela, Joerg Roedel, Liam Girdwood, Matthias Brugger, Takashi Iwai, Will Deacon, Yong Wu, alsa-devel, iommu, linux-arm-kernel, linux-mediatek On 1/3/23 11:15, Maxime Ripard wrote: > Hi Robin, > > On Tue, Jan 03, 2023 at 01:01:07PM +0000, Robin Murphy wrote: >> Hi Sean, >> >> On 22/12/2022 11:37 pm, Sean Anderson wrote: >> > Convert users of component_match_add_release with component_release_of >> > and component_compare_of to component_match_add_of. >> > >> > Signed-off-by: Sean Anderson <sean.anderson@seco.com> >> > Acked-by: Mark Brown <broonie@kernel.org> >> > --- >> > >> > Changes in v2: >> > - Split off from helper addition >> > >> > drivers/iommu/mtk_iommu.c | 3 +-- >> > drivers/iommu/mtk_iommu_v1.c | 3 +-- >> > sound/soc/codecs/wcd938x.c | 6 ++---- >> > 3 files changed, 4 insertions(+), 8 deletions(-) >> > >> > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c >> > index 2ab2ecfe01f8..483b7a9e4410 100644 >> > --- a/drivers/iommu/mtk_iommu.c >> > +++ b/drivers/iommu/mtk_iommu.c >> > @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m >> > } >> > data->larb_imu[id].dev = &plarbdev->dev; >> > - component_match_add_release(dev, match, component_release_of, >> > - component_compare_of, larbnode); >> > + component_match_add_of(dev, match, larbnode); >> >> I've long since given up trying to make sense of how the DRM tree works, but >> the conflicting change is definitely already in mainline: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 > > As far as I can see, that patch doesn't affect DRM at all, and the > commit you pointed to doesn't either, nor has it been merged through the > DRM tree. > > Can you expand a bit on how we're involved in this, what we should > clarify or help with? Patches 2 and 3 of this series depend on patch 1. Since patch 3 contains the bulk of the changes, I based this series on the drm-next tree. However, patch 2 has a conflict elswhere in the tree, which did not appear until 6.2-rc1. At the time I sent out this series, drm-next did not contain this commit, and I couldn't find it based on Robin's description [1], so now we end up with a conflict. As this commit has now been merged into drm-next, I can rebase and resend if there are no other comments. --Sean [1] https://lore.kernel.org/linux-arm-kernel/56310773-a062-0e48-28f7-6d2c5d035fee@seco.com/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper @ 2023-01-03 16:24 ` Sean Anderson 0 siblings, 0 replies; 28+ messages in thread From: Sean Anderson @ 2023-01-03 16:24 UTC (permalink / raw) To: Maxime Ripard, Robin Murphy Cc: David Airlie, Daniel Vetter, Maarten Lankhorst, Thomas Zimmermann, dri-devel, linux-kernel, Mark Brown, Jaroslav Kysela, Joerg Roedel, Liam Girdwood, Matthias Brugger, Takashi Iwai, Will Deacon, Yong Wu, alsa-devel, iommu, linux-arm-kernel, linux-mediatek On 1/3/23 11:15, Maxime Ripard wrote: > Hi Robin, > > On Tue, Jan 03, 2023 at 01:01:07PM +0000, Robin Murphy wrote: >> Hi Sean, >> >> On 22/12/2022 11:37 pm, Sean Anderson wrote: >> > Convert users of component_match_add_release with component_release_of >> > and component_compare_of to component_match_add_of. >> > >> > Signed-off-by: Sean Anderson <sean.anderson@seco.com> >> > Acked-by: Mark Brown <broonie@kernel.org> >> > --- >> > >> > Changes in v2: >> > - Split off from helper addition >> > >> > drivers/iommu/mtk_iommu.c | 3 +-- >> > drivers/iommu/mtk_iommu_v1.c | 3 +-- >> > sound/soc/codecs/wcd938x.c | 6 ++---- >> > 3 files changed, 4 insertions(+), 8 deletions(-) >> > >> > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c >> > index 2ab2ecfe01f8..483b7a9e4410 100644 >> > --- a/drivers/iommu/mtk_iommu.c >> > +++ b/drivers/iommu/mtk_iommu.c >> > @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m >> > } >> > data->larb_imu[id].dev = &plarbdev->dev; >> > - component_match_add_release(dev, match, component_release_of, >> > - component_compare_of, larbnode); >> > + component_match_add_of(dev, match, larbnode); >> >> I've long since given up trying to make sense of how the DRM tree works, but >> the conflicting change is definitely already in mainline: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 > > As far as I can see, that patch doesn't affect DRM at all, and the > commit you pointed to doesn't either, nor has it been merged through the > DRM tree. > > Can you expand a bit on how we're involved in this, what we should > clarify or help with? Patches 2 and 3 of this series depend on patch 1. Since patch 3 contains the bulk of the changes, I based this series on the drm-next tree. However, patch 2 has a conflict elswhere in the tree, which did not appear until 6.2-rc1. At the time I sent out this series, drm-next did not contain this commit, and I couldn't find it based on Robin's description [1], so now we end up with a conflict. As this commit has now been merged into drm-next, I can rebase and resend if there are no other comments. --Sean [1] https://lore.kernel.org/linux-arm-kernel/56310773-a062-0e48-28f7-6d2c5d035fee@seco.com/ ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper 2023-01-03 16:15 ` Maxime Ripard (?) (?) @ 2023-01-03 16:39 ` Robin Murphy -1 siblings, 0 replies; 28+ messages in thread From: Robin Murphy @ 2023-01-03 16:39 UTC (permalink / raw) To: Maxime Ripard Cc: alsa-devel, Daniel Vetter, Liam Girdwood, Sean Anderson, Will Deacon, Joerg Roedel, Takashi Iwai, Maarten Lankhorst, linux-kernel, dri-devel, iommu, Mark Brown, linux-mediatek, linux-arm-kernel, Thomas Zimmermann, Matthias Brugger, David Airlie, Yong Wu On 03/01/2023 4:15 pm, Maxime Ripard wrote: > Hi Robin, > > On Tue, Jan 03, 2023 at 01:01:07PM +0000, Robin Murphy wrote: >> Hi Sean, >> >> On 22/12/2022 11:37 pm, Sean Anderson wrote: >>> Convert users of component_match_add_release with component_release_of >>> and component_compare_of to component_match_add_of. >>> >>> Signed-off-by: Sean Anderson <sean.anderson@seco.com> >>> Acked-by: Mark Brown <broonie@kernel.org> >>> --- >>> >>> Changes in v2: >>> - Split off from helper addition >>> >>> drivers/iommu/mtk_iommu.c | 3 +-- >>> drivers/iommu/mtk_iommu_v1.c | 3 +-- >>> sound/soc/codecs/wcd938x.c | 6 ++---- >>> 3 files changed, 4 insertions(+), 8 deletions(-) >>> >>> diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c >>> index 2ab2ecfe01f8..483b7a9e4410 100644 >>> --- a/drivers/iommu/mtk_iommu.c >>> +++ b/drivers/iommu/mtk_iommu.c >>> @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m >>> } >>> data->larb_imu[id].dev = &plarbdev->dev; >>> - component_match_add_release(dev, match, component_release_of, >>> - component_compare_of, larbnode); >>> + component_match_add_of(dev, match, larbnode); >> >> I've long since given up trying to make sense of how the DRM tree works, but >> the conflicting change is definitely already in mainline: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 > > As far as I can see, that patch doesn't affect DRM at all, and the > commit you pointed to doesn't either, nor has it been merged through the > DRM tree. Right it doesn't affect DRM, and was merged via the IOMMU tree, but it does affect *this* patch, which Sean has based on a drm-next branch that seemingly still wasn't up to date with 6.2-rc1 at the time. Since v2 had already been posted, it seemed like a bright idea to comment here to clarify that it was still relevant, rather than bumping the old thread to reply directly. Apologies for any confusion. In practical terms I think it's merely a case of dropping this hunk; the other one in mtk_iommu_v1.c looks fine to me. Cheers, Robin. > Can you expand a bit on how we're involved in this, what we should > clarify or help with? > > Maxime ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper @ 2023-01-03 16:39 ` Robin Murphy 0 siblings, 0 replies; 28+ messages in thread From: Robin Murphy @ 2023-01-03 16:39 UTC (permalink / raw) To: Maxime Ripard Cc: alsa-devel, Liam Girdwood, Sean Anderson, Will Deacon, Joerg Roedel, Takashi Iwai, linux-kernel, dri-devel, Jaroslav Kysela, iommu, Mark Brown, linux-mediatek, linux-arm-kernel, Thomas Zimmermann, Matthias Brugger, Yong Wu On 03/01/2023 4:15 pm, Maxime Ripard wrote: > Hi Robin, > > On Tue, Jan 03, 2023 at 01:01:07PM +0000, Robin Murphy wrote: >> Hi Sean, >> >> On 22/12/2022 11:37 pm, Sean Anderson wrote: >>> Convert users of component_match_add_release with component_release_of >>> and component_compare_of to component_match_add_of. >>> >>> Signed-off-by: Sean Anderson <sean.anderson@seco.com> >>> Acked-by: Mark Brown <broonie@kernel.org> >>> --- >>> >>> Changes in v2: >>> - Split off from helper addition >>> >>> drivers/iommu/mtk_iommu.c | 3 +-- >>> drivers/iommu/mtk_iommu_v1.c | 3 +-- >>> sound/soc/codecs/wcd938x.c | 6 ++---- >>> 3 files changed, 4 insertions(+), 8 deletions(-) >>> >>> diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c >>> index 2ab2ecfe01f8..483b7a9e4410 100644 >>> --- a/drivers/iommu/mtk_iommu.c >>> +++ b/drivers/iommu/mtk_iommu.c >>> @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m >>> } >>> data->larb_imu[id].dev = &plarbdev->dev; >>> - component_match_add_release(dev, match, component_release_of, >>> - component_compare_of, larbnode); >>> + component_match_add_of(dev, match, larbnode); >> >> I've long since given up trying to make sense of how the DRM tree works, but >> the conflicting change is definitely already in mainline: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 > > As far as I can see, that patch doesn't affect DRM at all, and the > commit you pointed to doesn't either, nor has it been merged through the > DRM tree. Right it doesn't affect DRM, and was merged via the IOMMU tree, but it does affect *this* patch, which Sean has based on a drm-next branch that seemingly still wasn't up to date with 6.2-rc1 at the time. Since v2 had already been posted, it seemed like a bright idea to comment here to clarify that it was still relevant, rather than bumping the old thread to reply directly. Apologies for any confusion. In practical terms I think it's merely a case of dropping this hunk; the other one in mtk_iommu_v1.c looks fine to me. Cheers, Robin. > Can you expand a bit on how we're involved in this, what we should > clarify or help with? > > Maxime ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper @ 2023-01-03 16:39 ` Robin Murphy 0 siblings, 0 replies; 28+ messages in thread From: Robin Murphy @ 2023-01-03 16:39 UTC (permalink / raw) To: Maxime Ripard Cc: Sean Anderson, David Airlie, Daniel Vetter, Maarten Lankhorst, Thomas Zimmermann, dri-devel, linux-kernel, Mark Brown, Jaroslav Kysela, Joerg Roedel, Liam Girdwood, Matthias Brugger, Takashi Iwai, Will Deacon, Yong Wu, alsa-devel, iommu, linux-arm-kernel, linux-mediatek On 03/01/2023 4:15 pm, Maxime Ripard wrote: > Hi Robin, > > On Tue, Jan 03, 2023 at 01:01:07PM +0000, Robin Murphy wrote: >> Hi Sean, >> >> On 22/12/2022 11:37 pm, Sean Anderson wrote: >>> Convert users of component_match_add_release with component_release_of >>> and component_compare_of to component_match_add_of. >>> >>> Signed-off-by: Sean Anderson <sean.anderson@seco.com> >>> Acked-by: Mark Brown <broonie@kernel.org> >>> --- >>> >>> Changes in v2: >>> - Split off from helper addition >>> >>> drivers/iommu/mtk_iommu.c | 3 +-- >>> drivers/iommu/mtk_iommu_v1.c | 3 +-- >>> sound/soc/codecs/wcd938x.c | 6 ++---- >>> 3 files changed, 4 insertions(+), 8 deletions(-) >>> >>> diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c >>> index 2ab2ecfe01f8..483b7a9e4410 100644 >>> --- a/drivers/iommu/mtk_iommu.c >>> +++ b/drivers/iommu/mtk_iommu.c >>> @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m >>> } >>> data->larb_imu[id].dev = &plarbdev->dev; >>> - component_match_add_release(dev, match, component_release_of, >>> - component_compare_of, larbnode); >>> + component_match_add_of(dev, match, larbnode); >> >> I've long since given up trying to make sense of how the DRM tree works, but >> the conflicting change is definitely already in mainline: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 > > As far as I can see, that patch doesn't affect DRM at all, and the > commit you pointed to doesn't either, nor has it been merged through the > DRM tree. Right it doesn't affect DRM, and was merged via the IOMMU tree, but it does affect *this* patch, which Sean has based on a drm-next branch that seemingly still wasn't up to date with 6.2-rc1 at the time. Since v2 had already been posted, it seemed like a bright idea to comment here to clarify that it was still relevant, rather than bumping the old thread to reply directly. Apologies for any confusion. In practical terms I think it's merely a case of dropping this hunk; the other one in mtk_iommu_v1.c looks fine to me. Cheers, Robin. > Can you expand a bit on how we're involved in this, what we should > clarify or help with? > > Maxime _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper @ 2023-01-03 16:39 ` Robin Murphy 0 siblings, 0 replies; 28+ messages in thread From: Robin Murphy @ 2023-01-03 16:39 UTC (permalink / raw) To: Maxime Ripard Cc: Sean Anderson, David Airlie, Daniel Vetter, Maarten Lankhorst, Thomas Zimmermann, dri-devel, linux-kernel, Mark Brown, Jaroslav Kysela, Joerg Roedel, Liam Girdwood, Matthias Brugger, Takashi Iwai, Will Deacon, Yong Wu, alsa-devel, iommu, linux-arm-kernel, linux-mediatek On 03/01/2023 4:15 pm, Maxime Ripard wrote: > Hi Robin, > > On Tue, Jan 03, 2023 at 01:01:07PM +0000, Robin Murphy wrote: >> Hi Sean, >> >> On 22/12/2022 11:37 pm, Sean Anderson wrote: >>> Convert users of component_match_add_release with component_release_of >>> and component_compare_of to component_match_add_of. >>> >>> Signed-off-by: Sean Anderson <sean.anderson@seco.com> >>> Acked-by: Mark Brown <broonie@kernel.org> >>> --- >>> >>> Changes in v2: >>> - Split off from helper addition >>> >>> drivers/iommu/mtk_iommu.c | 3 +-- >>> drivers/iommu/mtk_iommu_v1.c | 3 +-- >>> sound/soc/codecs/wcd938x.c | 6 ++---- >>> 3 files changed, 4 insertions(+), 8 deletions(-) >>> >>> diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c >>> index 2ab2ecfe01f8..483b7a9e4410 100644 >>> --- a/drivers/iommu/mtk_iommu.c >>> +++ b/drivers/iommu/mtk_iommu.c >>> @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m >>> } >>> data->larb_imu[id].dev = &plarbdev->dev; >>> - component_match_add_release(dev, match, component_release_of, >>> - component_compare_of, larbnode); >>> + component_match_add_of(dev, match, larbnode); >> >> I've long since given up trying to make sense of how the DRM tree works, but >> the conflicting change is definitely already in mainline: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 > > As far as I can see, that patch doesn't affect DRM at all, and the > commit you pointed to doesn't either, nor has it been merged through the > DRM tree. Right it doesn't affect DRM, and was merged via the IOMMU tree, but it does affect *this* patch, which Sean has based on a drm-next branch that seemingly still wasn't up to date with 6.2-rc1 at the time. Since v2 had already been posted, it seemed like a bright idea to comment here to clarify that it was still relevant, rather than bumping the old thread to reply directly. Apologies for any confusion. In practical terms I think it's merely a case of dropping this hunk; the other one in mtk_iommu_v1.c looks fine to me. Cheers, Robin. > Can you expand a bit on how we're involved in this, what we should > clarify or help with? > > Maxime ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 3/3] drm: Convert users of drm_of_component_match_add to component_match_add_of 2022-12-22 23:37 ` Sean Anderson (?) @ 2022-12-22 23:37 ` Sean Anderson -1 siblings, 0 replies; 28+ messages in thread From: Sean Anderson @ 2022-12-22 23:37 UTC (permalink / raw) To: David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel Cc: linux-kernel, Sean Anderson, Jyri Sarha, Abhinav Kumar, Alain Volmat, Brian Starkey, Chen Feng, Chen-Yu Tsai, Christian Gmeiner, Chun-Kuang Hu, Dmitry Baryshkov, Jernej Skrabec, John Stultz, Liviu Dudau, Lucas Stach, Mali DP Maintainers, Matthias Brugger, Mihail Atanassov, Paul Cercueil, Philipp Zabel, Rob Clark, Russell King, Samuel Holland, Sean Paul, Tian Tao, Tomi Valkeinen, Xinliang Liu, Xinwei Kong, etnaviv, freedreno, linux-arm-kernel, linux-arm-msm, linux-mediatek, linux-mips, linux-sunxi Every user of this function either uses component_compare_of or something equivalent. Most of them immediately put the device node as well. Convert these users to component_match_add_of and remove drm_of_component_match_add. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Acked-by: Jyri Sarha <jyri.sarhaı@iki.fi> Tested-by: Jyri Sarha <jyri.sarha@iki.fi> --- (no changes since v1) .../gpu/drm/arm/display/komeda/komeda_drv.c | 6 ++-- drivers/gpu/drm/arm/hdlcd_drv.c | 9 +----- drivers/gpu/drm/arm/malidp_drv.c | 11 +------ drivers/gpu/drm/armada/armada_drv.c | 10 ++++--- drivers/gpu/drm/drm_of.c | 29 +++---------------- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +-- .../gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 3 +- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 3 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 4 +-- drivers/gpu/drm/msm/msm_drv.c | 14 ++++----- drivers/gpu/drm/sti/sti_drv.c | 3 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 3 +- drivers/gpu/drm/tilcdc/tilcdc_external.c | 10 ++----- include/drm/drm_of.h | 12 -------- 14 files changed, 33 insertions(+), 88 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c index 3f4e719eebd8..e3bfc72c378f 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c @@ -103,10 +103,8 @@ static void komeda_add_slave(struct device *master, struct device_node *remote; remote = of_graph_get_remote_node(np, port, endpoint); - if (remote) { - drm_of_component_match_add(master, match, component_compare_of, remote); - of_node_put(remote); - } + if (remote) + component_match_add_of(master, match, remote); } static int komeda_platform_probe(struct platform_device *pdev) diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c index 7043d1c9ed8f..fa37ca10c80b 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c @@ -353,11 +353,6 @@ static const struct component_master_ops hdlcd_master_ops = { .unbind = hdlcd_drm_unbind, }; -static int compare_dev(struct device *dev, void *data) -{ - return dev->of_node == data; -} - static int hdlcd_probe(struct platform_device *pdev) { struct device_node *port; @@ -368,9 +363,7 @@ static int hdlcd_probe(struct platform_device *pdev) if (!port) return -ENODEV; - drm_of_component_match_add(&pdev->dev, &match, compare_dev, port); - of_node_put(port); - + component_match_add_of(&pdev->dev, &match, port); return component_master_add_with_match(&pdev->dev, &hdlcd_master_ops, match); } diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 589c1c66a6dc..3a49c29ba5b8 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -909,13 +909,6 @@ static const struct component_master_ops malidp_master_ops = { .unbind = malidp_unbind, }; -static int malidp_compare_dev(struct device *dev, void *data) -{ - struct device_node *np = data; - - return dev->of_node == np; -} - static int malidp_platform_probe(struct platform_device *pdev) { struct device_node *port; @@ -929,9 +922,7 @@ static int malidp_platform_probe(struct platform_device *pdev) if (!port) return -ENODEV; - drm_of_component_match_add(&pdev->dev, &match, malidp_compare_dev, - port); - of_node_put(port); + component_match_add_of(&pdev->dev, &match, port); return component_master_add_with_match(&pdev->dev, &malidp_master_ops, match); } diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c index 0643887800b4..c0211ad7a45d 100644 --- a/drivers/gpu/drm/armada/armada_drv.c +++ b/drivers/gpu/drm/armada/armada_drv.c @@ -184,10 +184,12 @@ static void armada_add_endpoints(struct device *dev, for_each_endpoint_of_node(dev_node, ep) { remote = of_graph_get_remote_port_parent(ep); - if (remote && of_device_is_available(remote)) - drm_of_component_match_add(dev, match, component_compare_of, - remote); - of_node_put(remote); + if (remote) { + if (of_device_is_available(remote)) + component_match_add_of(dev, match, remote); + else + of_node_put(remote); + } } } diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 7bbcb999bb75..0a474729ddf6 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -78,24 +78,6 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, } EXPORT_SYMBOL(drm_of_find_possible_crtcs); -/** - * drm_of_component_match_add - Add a component helper OF node match rule - * @master: master device - * @matchptr: component match pointer - * @compare: compare function used for matching component - * @node: of_node - */ -void drm_of_component_match_add(struct device *master, - struct component_match **matchptr, - int (*compare)(struct device *, void *), - struct device_node *node) -{ - of_node_get(node); - component_match_add_release(master, matchptr, component_release_of, - compare, node); -} -EXPORT_SYMBOL_GPL(drm_of_component_match_add); - /** * drm_of_component_probe - Generic probe function for a component based master * @dev: master device containing the OF node @@ -130,10 +112,9 @@ int drm_of_component_probe(struct device *dev, break; if (of_device_is_available(port->parent)) - drm_of_component_match_add(dev, &match, compare_of, - port); - - of_node_put(port); + component_match_add_of(dev, &match, port); + else + of_node_put(port); } if (i == 0) { @@ -171,9 +152,7 @@ int drm_of_component_probe(struct device *dev, continue; } - drm_of_component_match_add(dev, &match, compare_of, - remote); - of_node_put(remote); + component_match_add_of(dev, &match, remote); } of_node_put(port); } diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c index 1d2b4fb4bcf8..4a0dba34a6e7 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c @@ -590,8 +590,8 @@ static int etnaviv_pdev_probe(struct platform_device *pdev) if (!first_node) first_node = core_node; - drm_of_component_match_add(&pdev->dev, &match, - component_compare_of, core_node); + of_node_get(core_node); + component_match_add_of(&pdev->dev, &match, core_node); } } else { char **names = dev->platform_data; diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c index 9c5d49bf40c9..3ee277615c39 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c @@ -273,8 +273,7 @@ static int kirin_drm_platform_probe(struct platform_device *pdev) if (!remote) return -ENODEV; - drm_of_component_match_add(dev, &match, component_compare_of, remote); - of_node_put(remote); + component_match_add_of(dev, &match, remote); return component_master_add_with_match(dev, &kirin_drm_ops, match); } diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c index 3d5af44bf92d..d0c87175dec4 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c @@ -1444,8 +1444,7 @@ static int ingenic_drm_probe(struct platform_device *pdev) if (!np) return ingenic_drm_bind(dev, false); - drm_of_component_match_add(dev, &match, component_compare_of, np); - of_node_put(np); + component_match_add_of(dev, &match, np); return component_master_add_with_match(dev, &ingenic_master_ops, match); } diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index cd5b18ef7951..abead814bfdc 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -787,8 +787,8 @@ static int mtk_drm_probe(struct platform_device *pdev) comp_type == MTK_DSI) { dev_info(dev, "Adding component match for %pOF\n", node); - drm_of_component_match_add(dev, &match, component_compare_of, - node); + of_node_get(node); + component_match_add_of(dev, &match, node); } ret = mtk_ddp_comp_init(node, &private->ddp_comp[comp_id], comp_id); diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 8b0b0ac74a6f..8ccf57def955 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -5,6 +5,7 @@ * Author: Rob Clark <robdclark@gmail.com> */ +#include <linux/component.h> #include <linux/dma-mapping.h> #include <linux/fault-inject.h> #include <linux/kthread.h> @@ -1156,10 +1157,9 @@ static int add_components_mdp(struct device *master_dev, continue; if (of_device_is_available(intf)) - drm_of_component_match_add(master_dev, matchptr, - component_compare_of, intf); - - of_node_put(intf); + component_match_add_of(master_dev, matchptr, intf); + else + of_node_put(intf); } return 0; @@ -1188,9 +1188,9 @@ static int add_gpu_components(struct device *dev, return 0; if (of_device_is_available(np)) - drm_of_component_match_add(dev, matchptr, component_compare_of, np); - - of_node_put(np); + component_match_add_of(dev, matchptr, np); + else + of_node_put(np); return 0; } diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index ef6a4e63198f..e3aae4574c75 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -238,8 +238,7 @@ static int sti_platform_probe(struct platform_device *pdev) child_np = of_get_next_available_child(node, NULL); while (child_np) { - drm_of_component_match_add(dev, &match, component_compare_of, - child_np); + component_match_add_of(dev, &match, child_np); child_np = of_get_next_available_child(node, child_np); } diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index cc94efbbf2d4..9b3ddd82f1be 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c @@ -323,7 +323,8 @@ static int sun4i_drv_add_endpoints(struct device *dev, of_device_is_available(node))) { /* Add current component */ DRM_DEBUG_DRIVER("Adding component %pOF\n", node); - drm_of_component_match_add(dev, match, component_compare_of, node); + of_node_get(node); + component_match_add_of(dev, match, node); count++; } diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.c b/drivers/gpu/drm/tilcdc/tilcdc_external.c index 3b86d002ef62..0138ce02a64f 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_external.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_external.c @@ -155,11 +155,6 @@ int tilcdc_attach_external_device(struct drm_device *ddev) return ret; } -static int dev_match_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - int tilcdc_get_external_components(struct device *dev, struct component_match **match) { @@ -173,7 +168,8 @@ int tilcdc_get_external_components(struct device *dev, } if (match) - drm_of_component_match_add(dev, match, dev_match_of, node); - of_node_put(node); + component_match_add_of(dev, match, node); + else + of_node_put(node); return 1; } diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index 10ab58c40746..685c44dc1dae 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h @@ -33,10 +33,6 @@ uint32_t drm_of_crtc_port_mask(struct drm_device *dev, struct device_node *port); uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, struct device_node *port); -void drm_of_component_match_add(struct device *master, - struct component_match **matchptr, - int (*compare)(struct device *, void *), - struct device_node *node); int drm_of_component_probe(struct device *dev, int (*compare_of)(struct device *, void *), const struct component_master_ops *m_ops); @@ -69,14 +65,6 @@ static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, return 0; } -static inline void -drm_of_component_match_add(struct device *master, - struct component_match **matchptr, - int (*compare)(struct device *, void *), - struct device_node *node) -{ -} - static inline int drm_of_component_probe(struct device *dev, int (*compare_of)(struct device *, void *), -- 2.35.1.1320.gc452695387.dirty ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 3/3] drm: Convert users of drm_of_component_match_add to component_match_add_of @ 2022-12-22 23:37 ` Sean Anderson 0 siblings, 0 replies; 28+ messages in thread From: Sean Anderson @ 2022-12-22 23:37 UTC (permalink / raw) To: David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel Cc: Xinliang Liu, Liviu Dudau, linux-mips, Paul Cercueil, John Stultz, Mihail Atanassov, Samuel Holland, Sean Anderson, Russell King, Jernej Skrabec, Chen-Yu Tsai, Mali DP Maintainers, linux-arm-msm, Alain Volmat, Xinwei Kong, linux-sunxi, Chun-Kuang Hu, Chen Feng, Abhinav Kumar, etnaviv, linux-mediatek, Matthias Brugger, Sean Paul, linux-arm-kernel, Tomi Valkeinen, freedreno, linux-kernel, Dmitry Baryshkov, Tian Tao, Jyri Sarha Every user of this function either uses component_compare_of or something equivalent. Most of them immediately put the device node as well. Convert these users to component_match_add_of and remove drm_of_component_match_add. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Acked-by: Jyri Sarha <jyri.sarhaı@iki.fi> Tested-by: Jyri Sarha <jyri.sarha@iki.fi> --- (no changes since v1) .../gpu/drm/arm/display/komeda/komeda_drv.c | 6 ++-- drivers/gpu/drm/arm/hdlcd_drv.c | 9 +----- drivers/gpu/drm/arm/malidp_drv.c | 11 +------ drivers/gpu/drm/armada/armada_drv.c | 10 ++++--- drivers/gpu/drm/drm_of.c | 29 +++---------------- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +-- .../gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 3 +- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 3 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 4 +-- drivers/gpu/drm/msm/msm_drv.c | 14 ++++----- drivers/gpu/drm/sti/sti_drv.c | 3 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 3 +- drivers/gpu/drm/tilcdc/tilcdc_external.c | 10 ++----- include/drm/drm_of.h | 12 -------- 14 files changed, 33 insertions(+), 88 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c index 3f4e719eebd8..e3bfc72c378f 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c @@ -103,10 +103,8 @@ static void komeda_add_slave(struct device *master, struct device_node *remote; remote = of_graph_get_remote_node(np, port, endpoint); - if (remote) { - drm_of_component_match_add(master, match, component_compare_of, remote); - of_node_put(remote); - } + if (remote) + component_match_add_of(master, match, remote); } static int komeda_platform_probe(struct platform_device *pdev) diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c index 7043d1c9ed8f..fa37ca10c80b 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c @@ -353,11 +353,6 @@ static const struct component_master_ops hdlcd_master_ops = { .unbind = hdlcd_drm_unbind, }; -static int compare_dev(struct device *dev, void *data) -{ - return dev->of_node == data; -} - static int hdlcd_probe(struct platform_device *pdev) { struct device_node *port; @@ -368,9 +363,7 @@ static int hdlcd_probe(struct platform_device *pdev) if (!port) return -ENODEV; - drm_of_component_match_add(&pdev->dev, &match, compare_dev, port); - of_node_put(port); - + component_match_add_of(&pdev->dev, &match, port); return component_master_add_with_match(&pdev->dev, &hdlcd_master_ops, match); } diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 589c1c66a6dc..3a49c29ba5b8 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -909,13 +909,6 @@ static const struct component_master_ops malidp_master_ops = { .unbind = malidp_unbind, }; -static int malidp_compare_dev(struct device *dev, void *data) -{ - struct device_node *np = data; - - return dev->of_node == np; -} - static int malidp_platform_probe(struct platform_device *pdev) { struct device_node *port; @@ -929,9 +922,7 @@ static int malidp_platform_probe(struct platform_device *pdev) if (!port) return -ENODEV; - drm_of_component_match_add(&pdev->dev, &match, malidp_compare_dev, - port); - of_node_put(port); + component_match_add_of(&pdev->dev, &match, port); return component_master_add_with_match(&pdev->dev, &malidp_master_ops, match); } diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c index 0643887800b4..c0211ad7a45d 100644 --- a/drivers/gpu/drm/armada/armada_drv.c +++ b/drivers/gpu/drm/armada/armada_drv.c @@ -184,10 +184,12 @@ static void armada_add_endpoints(struct device *dev, for_each_endpoint_of_node(dev_node, ep) { remote = of_graph_get_remote_port_parent(ep); - if (remote && of_device_is_available(remote)) - drm_of_component_match_add(dev, match, component_compare_of, - remote); - of_node_put(remote); + if (remote) { + if (of_device_is_available(remote)) + component_match_add_of(dev, match, remote); + else + of_node_put(remote); + } } } diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 7bbcb999bb75..0a474729ddf6 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -78,24 +78,6 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, } EXPORT_SYMBOL(drm_of_find_possible_crtcs); -/** - * drm_of_component_match_add - Add a component helper OF node match rule - * @master: master device - * @matchptr: component match pointer - * @compare: compare function used for matching component - * @node: of_node - */ -void drm_of_component_match_add(struct device *master, - struct component_match **matchptr, - int (*compare)(struct device *, void *), - struct device_node *node) -{ - of_node_get(node); - component_match_add_release(master, matchptr, component_release_of, - compare, node); -} -EXPORT_SYMBOL_GPL(drm_of_component_match_add); - /** * drm_of_component_probe - Generic probe function for a component based master * @dev: master device containing the OF node @@ -130,10 +112,9 @@ int drm_of_component_probe(struct device *dev, break; if (of_device_is_available(port->parent)) - drm_of_component_match_add(dev, &match, compare_of, - port); - - of_node_put(port); + component_match_add_of(dev, &match, port); + else + of_node_put(port); } if (i == 0) { @@ -171,9 +152,7 @@ int drm_of_component_probe(struct device *dev, continue; } - drm_of_component_match_add(dev, &match, compare_of, - remote); - of_node_put(remote); + component_match_add_of(dev, &match, remote); } of_node_put(port); } diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c index 1d2b4fb4bcf8..4a0dba34a6e7 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c @@ -590,8 +590,8 @@ static int etnaviv_pdev_probe(struct platform_device *pdev) if (!first_node) first_node = core_node; - drm_of_component_match_add(&pdev->dev, &match, - component_compare_of, core_node); + of_node_get(core_node); + component_match_add_of(&pdev->dev, &match, core_node); } } else { char **names = dev->platform_data; diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c index 9c5d49bf40c9..3ee277615c39 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c @@ -273,8 +273,7 @@ static int kirin_drm_platform_probe(struct platform_device *pdev) if (!remote) return -ENODEV; - drm_of_component_match_add(dev, &match, component_compare_of, remote); - of_node_put(remote); + component_match_add_of(dev, &match, remote); return component_master_add_with_match(dev, &kirin_drm_ops, match); } diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c index 3d5af44bf92d..d0c87175dec4 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c @@ -1444,8 +1444,7 @@ static int ingenic_drm_probe(struct platform_device *pdev) if (!np) return ingenic_drm_bind(dev, false); - drm_of_component_match_add(dev, &match, component_compare_of, np); - of_node_put(np); + component_match_add_of(dev, &match, np); return component_master_add_with_match(dev, &ingenic_master_ops, match); } diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index cd5b18ef7951..abead814bfdc 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -787,8 +787,8 @@ static int mtk_drm_probe(struct platform_device *pdev) comp_type == MTK_DSI) { dev_info(dev, "Adding component match for %pOF\n", node); - drm_of_component_match_add(dev, &match, component_compare_of, - node); + of_node_get(node); + component_match_add_of(dev, &match, node); } ret = mtk_ddp_comp_init(node, &private->ddp_comp[comp_id], comp_id); diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 8b0b0ac74a6f..8ccf57def955 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -5,6 +5,7 @@ * Author: Rob Clark <robdclark@gmail.com> */ +#include <linux/component.h> #include <linux/dma-mapping.h> #include <linux/fault-inject.h> #include <linux/kthread.h> @@ -1156,10 +1157,9 @@ static int add_components_mdp(struct device *master_dev, continue; if (of_device_is_available(intf)) - drm_of_component_match_add(master_dev, matchptr, - component_compare_of, intf); - - of_node_put(intf); + component_match_add_of(master_dev, matchptr, intf); + else + of_node_put(intf); } return 0; @@ -1188,9 +1188,9 @@ static int add_gpu_components(struct device *dev, return 0; if (of_device_is_available(np)) - drm_of_component_match_add(dev, matchptr, component_compare_of, np); - - of_node_put(np); + component_match_add_of(dev, matchptr, np); + else + of_node_put(np); return 0; } diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index ef6a4e63198f..e3aae4574c75 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -238,8 +238,7 @@ static int sti_platform_probe(struct platform_device *pdev) child_np = of_get_next_available_child(node, NULL); while (child_np) { - drm_of_component_match_add(dev, &match, component_compare_of, - child_np); + component_match_add_of(dev, &match, child_np); child_np = of_get_next_available_child(node, child_np); } diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index cc94efbbf2d4..9b3ddd82f1be 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c @@ -323,7 +323,8 @@ static int sun4i_drv_add_endpoints(struct device *dev, of_device_is_available(node))) { /* Add current component */ DRM_DEBUG_DRIVER("Adding component %pOF\n", node); - drm_of_component_match_add(dev, match, component_compare_of, node); + of_node_get(node); + component_match_add_of(dev, match, node); count++; } diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.c b/drivers/gpu/drm/tilcdc/tilcdc_external.c index 3b86d002ef62..0138ce02a64f 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_external.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_external.c @@ -155,11 +155,6 @@ int tilcdc_attach_external_device(struct drm_device *ddev) return ret; } -static int dev_match_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - int tilcdc_get_external_components(struct device *dev, struct component_match **match) { @@ -173,7 +168,8 @@ int tilcdc_get_external_components(struct device *dev, } if (match) - drm_of_component_match_add(dev, match, dev_match_of, node); - of_node_put(node); + component_match_add_of(dev, match, node); + else + of_node_put(node); return 1; } diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index 10ab58c40746..685c44dc1dae 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h @@ -33,10 +33,6 @@ uint32_t drm_of_crtc_port_mask(struct drm_device *dev, struct device_node *port); uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, struct device_node *port); -void drm_of_component_match_add(struct device *master, - struct component_match **matchptr, - int (*compare)(struct device *, void *), - struct device_node *node); int drm_of_component_probe(struct device *dev, int (*compare_of)(struct device *, void *), const struct component_master_ops *m_ops); @@ -69,14 +65,6 @@ static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, return 0; } -static inline void -drm_of_component_match_add(struct device *master, - struct component_match **matchptr, - int (*compare)(struct device *, void *), - struct device_node *node) -{ -} - static inline int drm_of_component_probe(struct device *dev, int (*compare_of)(struct device *, void *), -- 2.35.1.1320.gc452695387.dirty ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 3/3] drm: Convert users of drm_of_component_match_add to component_match_add_of @ 2022-12-22 23:37 ` Sean Anderson 0 siblings, 0 replies; 28+ messages in thread From: Sean Anderson @ 2022-12-22 23:37 UTC (permalink / raw) To: David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel Cc: linux-kernel, Sean Anderson, Jyri Sarha, Abhinav Kumar, Alain Volmat, Brian Starkey, Chen Feng, Chen-Yu Tsai, Christian Gmeiner, Chun-Kuang Hu, Dmitry Baryshkov, Jernej Skrabec, John Stultz, Liviu Dudau, Lucas Stach, Mali DP Maintainers, Matthias Brugger, Mihail Atanassov, Paul Cercueil, Philipp Zabel, Rob Clark, Russell King, Samuel Holland, Sean Paul, Tian Tao, Tomi Valkeinen, Xinliang Liu, Xinwei Kong, etnaviv, freedreno, linux-arm-kernel, linux-arm-msm, linux-mediatek, linux-mips, linux-sunxi Every user of this function either uses component_compare_of or something equivalent. Most of them immediately put the device node as well. Convert these users to component_match_add_of and remove drm_of_component_match_add. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Acked-by: Jyri Sarha <jyri.sarhaı@iki.fi> Tested-by: Jyri Sarha <jyri.sarha@iki.fi> --- (no changes since v1) .../gpu/drm/arm/display/komeda/komeda_drv.c | 6 ++-- drivers/gpu/drm/arm/hdlcd_drv.c | 9 +----- drivers/gpu/drm/arm/malidp_drv.c | 11 +------ drivers/gpu/drm/armada/armada_drv.c | 10 ++++--- drivers/gpu/drm/drm_of.c | 29 +++---------------- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +-- .../gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 3 +- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 3 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 4 +-- drivers/gpu/drm/msm/msm_drv.c | 14 ++++----- drivers/gpu/drm/sti/sti_drv.c | 3 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 3 +- drivers/gpu/drm/tilcdc/tilcdc_external.c | 10 ++----- include/drm/drm_of.h | 12 -------- 14 files changed, 33 insertions(+), 88 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c index 3f4e719eebd8..e3bfc72c378f 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c @@ -103,10 +103,8 @@ static void komeda_add_slave(struct device *master, struct device_node *remote; remote = of_graph_get_remote_node(np, port, endpoint); - if (remote) { - drm_of_component_match_add(master, match, component_compare_of, remote); - of_node_put(remote); - } + if (remote) + component_match_add_of(master, match, remote); } static int komeda_platform_probe(struct platform_device *pdev) diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c index 7043d1c9ed8f..fa37ca10c80b 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c @@ -353,11 +353,6 @@ static const struct component_master_ops hdlcd_master_ops = { .unbind = hdlcd_drm_unbind, }; -static int compare_dev(struct device *dev, void *data) -{ - return dev->of_node == data; -} - static int hdlcd_probe(struct platform_device *pdev) { struct device_node *port; @@ -368,9 +363,7 @@ static int hdlcd_probe(struct platform_device *pdev) if (!port) return -ENODEV; - drm_of_component_match_add(&pdev->dev, &match, compare_dev, port); - of_node_put(port); - + component_match_add_of(&pdev->dev, &match, port); return component_master_add_with_match(&pdev->dev, &hdlcd_master_ops, match); } diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 589c1c66a6dc..3a49c29ba5b8 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -909,13 +909,6 @@ static const struct component_master_ops malidp_master_ops = { .unbind = malidp_unbind, }; -static int malidp_compare_dev(struct device *dev, void *data) -{ - struct device_node *np = data; - - return dev->of_node == np; -} - static int malidp_platform_probe(struct platform_device *pdev) { struct device_node *port; @@ -929,9 +922,7 @@ static int malidp_platform_probe(struct platform_device *pdev) if (!port) return -ENODEV; - drm_of_component_match_add(&pdev->dev, &match, malidp_compare_dev, - port); - of_node_put(port); + component_match_add_of(&pdev->dev, &match, port); return component_master_add_with_match(&pdev->dev, &malidp_master_ops, match); } diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c index 0643887800b4..c0211ad7a45d 100644 --- a/drivers/gpu/drm/armada/armada_drv.c +++ b/drivers/gpu/drm/armada/armada_drv.c @@ -184,10 +184,12 @@ static void armada_add_endpoints(struct device *dev, for_each_endpoint_of_node(dev_node, ep) { remote = of_graph_get_remote_port_parent(ep); - if (remote && of_device_is_available(remote)) - drm_of_component_match_add(dev, match, component_compare_of, - remote); - of_node_put(remote); + if (remote) { + if (of_device_is_available(remote)) + component_match_add_of(dev, match, remote); + else + of_node_put(remote); + } } } diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 7bbcb999bb75..0a474729ddf6 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -78,24 +78,6 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, } EXPORT_SYMBOL(drm_of_find_possible_crtcs); -/** - * drm_of_component_match_add - Add a component helper OF node match rule - * @master: master device - * @matchptr: component match pointer - * @compare: compare function used for matching component - * @node: of_node - */ -void drm_of_component_match_add(struct device *master, - struct component_match **matchptr, - int (*compare)(struct device *, void *), - struct device_node *node) -{ - of_node_get(node); - component_match_add_release(master, matchptr, component_release_of, - compare, node); -} -EXPORT_SYMBOL_GPL(drm_of_component_match_add); - /** * drm_of_component_probe - Generic probe function for a component based master * @dev: master device containing the OF node @@ -130,10 +112,9 @@ int drm_of_component_probe(struct device *dev, break; if (of_device_is_available(port->parent)) - drm_of_component_match_add(dev, &match, compare_of, - port); - - of_node_put(port); + component_match_add_of(dev, &match, port); + else + of_node_put(port); } if (i == 0) { @@ -171,9 +152,7 @@ int drm_of_component_probe(struct device *dev, continue; } - drm_of_component_match_add(dev, &match, compare_of, - remote); - of_node_put(remote); + component_match_add_of(dev, &match, remote); } of_node_put(port); } diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c index 1d2b4fb4bcf8..4a0dba34a6e7 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c @@ -590,8 +590,8 @@ static int etnaviv_pdev_probe(struct platform_device *pdev) if (!first_node) first_node = core_node; - drm_of_component_match_add(&pdev->dev, &match, - component_compare_of, core_node); + of_node_get(core_node); + component_match_add_of(&pdev->dev, &match, core_node); } } else { char **names = dev->platform_data; diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c index 9c5d49bf40c9..3ee277615c39 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c @@ -273,8 +273,7 @@ static int kirin_drm_platform_probe(struct platform_device *pdev) if (!remote) return -ENODEV; - drm_of_component_match_add(dev, &match, component_compare_of, remote); - of_node_put(remote); + component_match_add_of(dev, &match, remote); return component_master_add_with_match(dev, &kirin_drm_ops, match); } diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c index 3d5af44bf92d..d0c87175dec4 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c @@ -1444,8 +1444,7 @@ static int ingenic_drm_probe(struct platform_device *pdev) if (!np) return ingenic_drm_bind(dev, false); - drm_of_component_match_add(dev, &match, component_compare_of, np); - of_node_put(np); + component_match_add_of(dev, &match, np); return component_master_add_with_match(dev, &ingenic_master_ops, match); } diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index cd5b18ef7951..abead814bfdc 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -787,8 +787,8 @@ static int mtk_drm_probe(struct platform_device *pdev) comp_type == MTK_DSI) { dev_info(dev, "Adding component match for %pOF\n", node); - drm_of_component_match_add(dev, &match, component_compare_of, - node); + of_node_get(node); + component_match_add_of(dev, &match, node); } ret = mtk_ddp_comp_init(node, &private->ddp_comp[comp_id], comp_id); diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 8b0b0ac74a6f..8ccf57def955 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -5,6 +5,7 @@ * Author: Rob Clark <robdclark@gmail.com> */ +#include <linux/component.h> #include <linux/dma-mapping.h> #include <linux/fault-inject.h> #include <linux/kthread.h> @@ -1156,10 +1157,9 @@ static int add_components_mdp(struct device *master_dev, continue; if (of_device_is_available(intf)) - drm_of_component_match_add(master_dev, matchptr, - component_compare_of, intf); - - of_node_put(intf); + component_match_add_of(master_dev, matchptr, intf); + else + of_node_put(intf); } return 0; @@ -1188,9 +1188,9 @@ static int add_gpu_components(struct device *dev, return 0; if (of_device_is_available(np)) - drm_of_component_match_add(dev, matchptr, component_compare_of, np); - - of_node_put(np); + component_match_add_of(dev, matchptr, np); + else + of_node_put(np); return 0; } diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index ef6a4e63198f..e3aae4574c75 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -238,8 +238,7 @@ static int sti_platform_probe(struct platform_device *pdev) child_np = of_get_next_available_child(node, NULL); while (child_np) { - drm_of_component_match_add(dev, &match, component_compare_of, - child_np); + component_match_add_of(dev, &match, child_np); child_np = of_get_next_available_child(node, child_np); } diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index cc94efbbf2d4..9b3ddd82f1be 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c @@ -323,7 +323,8 @@ static int sun4i_drv_add_endpoints(struct device *dev, of_device_is_available(node))) { /* Add current component */ DRM_DEBUG_DRIVER("Adding component %pOF\n", node); - drm_of_component_match_add(dev, match, component_compare_of, node); + of_node_get(node); + component_match_add_of(dev, match, node); count++; } diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.c b/drivers/gpu/drm/tilcdc/tilcdc_external.c index 3b86d002ef62..0138ce02a64f 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_external.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_external.c @@ -155,11 +155,6 @@ int tilcdc_attach_external_device(struct drm_device *ddev) return ret; } -static int dev_match_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - int tilcdc_get_external_components(struct device *dev, struct component_match **match) { @@ -173,7 +168,8 @@ int tilcdc_get_external_components(struct device *dev, } if (match) - drm_of_component_match_add(dev, match, dev_match_of, node); - of_node_put(node); + component_match_add_of(dev, match, node); + else + of_node_put(node); return 1; } diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index 10ab58c40746..685c44dc1dae 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h @@ -33,10 +33,6 @@ uint32_t drm_of_crtc_port_mask(struct drm_device *dev, struct device_node *port); uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, struct device_node *port); -void drm_of_component_match_add(struct device *master, - struct component_match **matchptr, - int (*compare)(struct device *, void *), - struct device_node *node); int drm_of_component_probe(struct device *dev, int (*compare_of)(struct device *, void *), const struct component_master_ops *m_ops); @@ -69,14 +65,6 @@ static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, return 0; } -static inline void -drm_of_component_match_add(struct device *master, - struct component_match **matchptr, - int (*compare)(struct device *, void *), - struct device_node *node) -{ -} - static inline int drm_of_component_probe(struct device *dev, int (*compare_of)(struct device *, void *), -- 2.35.1.1320.gc452695387.dirty _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 28+ messages in thread
end of thread, other threads:[~2023-01-03 18:19 UTC | newest] Thread overview: 28+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-12-22 23:37 [PATCH v2 0/3] drm: Add component_match_add_of and convert users of drm_of_component_match_add Sean Anderson 2022-12-22 23:37 ` Sean Anderson 2022-12-22 23:37 ` Sean Anderson 2022-12-22 23:37 ` [PATCH v2 1/3] component: Add helper for device nodes Sean Anderson 2022-12-22 23:37 ` Sean Anderson 2022-12-22 23:37 ` [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper Sean Anderson 2022-12-22 23:37 ` Sean Anderson 2022-12-22 23:37 ` Sean Anderson 2022-12-22 23:37 ` Sean Anderson 2023-01-03 13:01 ` Robin Murphy 2023-01-03 13:01 ` Robin Murphy 2023-01-03 13:01 ` Robin Murphy 2023-01-03 13:01 ` Robin Murphy 2023-01-03 16:15 ` Maxime Ripard 2023-01-03 16:15 ` Maxime Ripard 2023-01-03 16:15 ` Maxime Ripard 2023-01-03 16:15 ` Maxime Ripard 2023-01-03 16:24 ` Sean Anderson 2023-01-03 16:24 ` Sean Anderson 2023-01-03 16:24 ` Sean Anderson 2023-01-03 16:24 ` Sean Anderson 2023-01-03 16:39 ` Robin Murphy 2023-01-03 16:39 ` Robin Murphy 2023-01-03 16:39 ` Robin Murphy 2023-01-03 16:39 ` Robin Murphy 2022-12-22 23:37 ` [PATCH v2 3/3] drm: Convert users of drm_of_component_match_add to component_match_add_of Sean Anderson 2022-12-22 23:37 ` Sean Anderson 2022-12-22 23:37 ` Sean Anderson
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.