All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] firmware: ti_sci: Use of_device_get_match_data()
@ 2022-11-02  8:57 ` zhang.songyi
  0 siblings, 0 replies; 4+ messages in thread
From: zhang.songyi @ 2022-11-02  8:57 UTC (permalink / raw)
  To: nm
  Cc: kristo, ssantosh, linux-arm-kernel, linux-kernel, zhang.songyi,
	jiang.xuexin, xue.zhihong

From 18dbde082d02c871453c5be8c762b6383a2f9641 Mon Sep 17 00:00:00 2001
From: zhang songyi <zhang.songyi@zte.com.cn>
Date: Wed, 2 Nov 2022 16:17:54 +0800
Subject: [PATCH linux-next] firmware: ti_sci: Use of_device_get_match_data()

Use of_device_get_match_data() to simplify the code.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
---
 drivers/firmware/ti_sci.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 6d2fd0ff7ff3..7db7d840fbb2 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -3340,7 +3340,6 @@ MODULE_DEVICE_TABLE(of, ti_sci_of_match);
 static int ti_sci_probe(struct platform_device *pdev)
 {
    struct device *dev = &pdev->dev;
-   const struct of_device_id *of_id;
    const struct ti_sci_desc *desc;
    struct ti_sci_xfer *xfer;
    struct ti_sci_info *info = NULL;
@@ -3351,12 +3350,11 @@ static int ti_sci_probe(struct platform_device *pdev)
    int reboot = 0;
    u32 h_id;

-   of_id = of_match_device(ti_sci_of_match, dev);
-   if (!of_id) {
+   desc = of_device_get_match_data(dev);
+   if (!desc) {
        dev_err(dev, "OF data missing\n");
        return -EINVAL;
    }
-   desc = of_id->data;

    info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
    if (!info)
--
2.15.2

_______________________________________________
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] 4+ messages in thread

* [PATCH linux-next] firmware: ti_sci: Use of_device_get_match_data()
@ 2022-11-02  8:57 ` zhang.songyi
  0 siblings, 0 replies; 4+ messages in thread
From: zhang.songyi @ 2022-11-02  8:57 UTC (permalink / raw)
  To: nm
  Cc: kristo, ssantosh, linux-arm-kernel, linux-kernel, zhang.songyi,
	jiang.xuexin, xue.zhihong

From 18dbde082d02c871453c5be8c762b6383a2f9641 Mon Sep 17 00:00:00 2001
From: zhang songyi <zhang.songyi@zte.com.cn>
Date: Wed, 2 Nov 2022 16:17:54 +0800
Subject: [PATCH linux-next] firmware: ti_sci: Use of_device_get_match_data()

Use of_device_get_match_data() to simplify the code.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
---
 drivers/firmware/ti_sci.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 6d2fd0ff7ff3..7db7d840fbb2 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -3340,7 +3340,6 @@ MODULE_DEVICE_TABLE(of, ti_sci_of_match);
 static int ti_sci_probe(struct platform_device *pdev)
 {
    struct device *dev = &pdev->dev;
-   const struct of_device_id *of_id;
    const struct ti_sci_desc *desc;
    struct ti_sci_xfer *xfer;
    struct ti_sci_info *info = NULL;
@@ -3351,12 +3350,11 @@ static int ti_sci_probe(struct platform_device *pdev)
    int reboot = 0;
    u32 h_id;

-   of_id = of_match_device(ti_sci_of_match, dev);
-   if (!of_id) {
+   desc = of_device_get_match_data(dev);
+   if (!desc) {
        dev_err(dev, "OF data missing\n");
        return -EINVAL;
    }
-   desc = of_id->data;

    info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
    if (!info)
--
2.15.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH linux-next] firmware: ti_sci: Use of_device_get_match_data()
  2022-11-02  8:57 ` zhang.songyi
@ 2022-11-03  4:58   ` Nishanth Menon
  -1 siblings, 0 replies; 4+ messages in thread
From: Nishanth Menon @ 2022-11-03  4:58 UTC (permalink / raw)
  To: zhang.songyi
  Cc: kristo, ssantosh, linux-arm-kernel, linux-kernel, jiang.xuexin,
	xue.zhihong

On 16:57-20221102, zhang.songyi@zte.com.cn wrote:
> From 18dbde082d02c871453c5be8c762b6383a2f9641 Mon Sep 17 00:00:00 2001
> From: zhang songyi <zhang.songyi@zte.com.cn>
> Date: Wed, 2 Nov 2022 16:17:54 +0800
> Subject: [PATCH linux-next] firmware: ti_sci: Use of_device_get_match_data()
> 
> Use of_device_get_match_data() to simplify the code.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
> ---
>  drivers/firmware/ti_sci.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
> index 6d2fd0ff7ff3..7db7d840fbb2 100644
> --- a/drivers/firmware/ti_sci.c
> +++ b/drivers/firmware/ti_sci.c
> @@ -3340,7 +3340,6 @@ MODULE_DEVICE_TABLE(of, ti_sci_of_match);
>  static int ti_sci_probe(struct platform_device *pdev)
>  {
>     struct device *dev = &pdev->dev;
> -   const struct of_device_id *of_id;
>     const struct ti_sci_desc *desc;
>     struct ti_sci_xfer *xfer;
>     struct ti_sci_info *info = NULL;
> @@ -3351,12 +3350,11 @@ static int ti_sci_probe(struct platform_device *pdev)
>     int reboot = 0;
>     u32 h_id;
> 
> -   of_id = of_match_device(ti_sci_of_match, dev);
> -   if (!of_id) {
> +   desc = of_device_get_match_data(dev);
> +   if (!desc) {
>         dev_err(dev, "OF data missing\n");
>         return -EINVAL;
>     }
> -   desc = of_id->data;
> 
>     info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
>     if (!info)
> --
> 2.15.2


Could you please use git send-email to post patch following guidelines?

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH linux-next] firmware: ti_sci: Use of_device_get_match_data()
@ 2022-11-03  4:58   ` Nishanth Menon
  0 siblings, 0 replies; 4+ messages in thread
From: Nishanth Menon @ 2022-11-03  4:58 UTC (permalink / raw)
  To: zhang.songyi
  Cc: kristo, ssantosh, linux-arm-kernel, linux-kernel, jiang.xuexin,
	xue.zhihong

On 16:57-20221102, zhang.songyi@zte.com.cn wrote:
> From 18dbde082d02c871453c5be8c762b6383a2f9641 Mon Sep 17 00:00:00 2001
> From: zhang songyi <zhang.songyi@zte.com.cn>
> Date: Wed, 2 Nov 2022 16:17:54 +0800
> Subject: [PATCH linux-next] firmware: ti_sci: Use of_device_get_match_data()
> 
> Use of_device_get_match_data() to simplify the code.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
> ---
>  drivers/firmware/ti_sci.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
> index 6d2fd0ff7ff3..7db7d840fbb2 100644
> --- a/drivers/firmware/ti_sci.c
> +++ b/drivers/firmware/ti_sci.c
> @@ -3340,7 +3340,6 @@ MODULE_DEVICE_TABLE(of, ti_sci_of_match);
>  static int ti_sci_probe(struct platform_device *pdev)
>  {
>     struct device *dev = &pdev->dev;
> -   const struct of_device_id *of_id;
>     const struct ti_sci_desc *desc;
>     struct ti_sci_xfer *xfer;
>     struct ti_sci_info *info = NULL;
> @@ -3351,12 +3350,11 @@ static int ti_sci_probe(struct platform_device *pdev)
>     int reboot = 0;
>     u32 h_id;
> 
> -   of_id = of_match_device(ti_sci_of_match, dev);
> -   if (!of_id) {
> +   desc = of_device_get_match_data(dev);
> +   if (!desc) {
>         dev_err(dev, "OF data missing\n");
>         return -EINVAL;
>     }
> -   desc = of_id->data;
> 
>     info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
>     if (!info)
> --
> 2.15.2


Could you please use git send-email to post patch following guidelines?

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2022-11-03  4:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-02  8:57 [PATCH linux-next] firmware: ti_sci: Use of_device_get_match_data() zhang.songyi
2022-11-02  8:57 ` zhang.songyi
2022-11-03  4:58 ` Nishanth Menon
2022-11-03  4:58   ` Nishanth Menon

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.