lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211021657454006946@zte.com.cn>
Date:   Wed, 2 Nov 2022 16:57:45 +0800 (CST)
From:   <zhang.songyi@....com.cn>
To:     <nm@...com>
Cc:     <kristo@...nel.org>, <ssantosh@...nel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <zhang.songyi@....com.cn>,
        <jiang.xuexin@....com.cn>, <xue.zhihong@....com.cn>
Subject: [PATCH linux-next] firmware: ti_sci: Use of_device_get_match_data()

>From 18dbde082d02c871453c5be8c762b6383a2f9641 Mon Sep 17 00:00:00 2001
From: zhang songyi <zhang.songyi@....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@....com.cn>
Signed-off-by: zhang songyi <zhang.songyi@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ