Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3751400rwi; Wed, 2 Nov 2022 02:40:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6VovlOF/GwmxLu4NntD40t0NO2gUUu3FSZu3e4v4nosGl5/P2mVoeXnsdEo2t6EaMEZPEd X-Received: by 2002:a05:6a00:2489:b0:56d:2d20:d01e with SMTP id c9-20020a056a00248900b0056d2d20d01emr21086881pfv.65.1667382043094; Wed, 02 Nov 2022 02:40:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667382043; cv=none; d=google.com; s=arc-20160816; b=Kf+56xfDYC8gczgODC7pQgifkO8XLUrtlM8C6eYLQ70BIlZdpc9QdWQC0aLhq3uiDn gp7zcRaLz6iQ9ho9Ua2Xf5FjEUIQYUU9R8cgvDABGg3dLwS57YFge26dhwXumWEn5TuF fcqyR4YM5M1AJBJa8HM963YsY1vjUremBUNvZznnYZeeSjeVjG05SW6hKhAAlJ3TAXDR NoUpwfUmT9fO9INLIaYgY/9jFh6lRmIlQj+huP+wa0WAJOukdCk/zjXNmEQ4epXEyni2 TYUoVurjK+FuBAjGP6XOPcAhxA6XO9PmVN4PkMhiENeaR7X4bFexO36ym4cvcr6pLJTd iF7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=6/Za6kW88aHgM/YlKbe18pR3tMpvwLM+VD7HVvucY6g=; b=V7PvyV/PF570nhGeAd5w7RX++V/G/0LhvMkogPLXNcBMliBAsKWI02fHiACogwToZN D5bMCdrk+ZVZv3kHdi8eAaE0fNw4ifvn41Q3bhiOMT6Z6HtW05Uoso4G6YbYyox61ug5 ZJSLasFWk+DzpbRe79cJE++QANphMBqLrOihfWEiIGyIvrVsrke1yUqOptmZySRPLmxE 9WPvpLwmquIFatnBscALb6wU4H4i3pws7MsbR4bj1bDvCBmATzw5j9ECvaTlfM3GtWf/ AjstLEWY+UzoFJpBWBCZQBQ02d9G5NJYr56AUImKBuLPuK0izn7DkPdPS7+Kp2q9dGkM E4QQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b17-20020a631b11000000b0046ebb32e9d4si16859777pgb.737.2022.11.02.02.40.29; Wed, 02 Nov 2022 02:40:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230497AbiKBJHh (ORCPT + 97 others); Wed, 2 Nov 2022 05:07:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229988AbiKBJGz (ORCPT ); Wed, 2 Nov 2022 05:06:55 -0400 X-Greylist: delayed 424 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 02 Nov 2022 02:05:21 PDT Received: from mxus.zte.com.cn (mxus.zte.com.cn [20.112.44.237]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9344D25F6 for ; Wed, 2 Nov 2022 02:05:20 -0700 (PDT) Received: from mxhk.zte.com.cn (unknown [192.168.250.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mxus.zte.com.cn (FangMail) with ESMTPS id 4N2LPz6s1yz9wMT5 for ; Wed, 2 Nov 2022 16:57:59 +0800 (CST) Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4N2LPw34p5z8R039; Wed, 2 Nov 2022 16:57:56 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl1.zte.com.cn with SMTP id 2A28vgoZ031476; Wed, 2 Nov 2022 16:57:42 +0800 (+08) (envelope-from zhang.songyi@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Wed, 2 Nov 2022 16:57:45 +0800 (CST) Date: Wed, 2 Nov 2022 16:57:45 +0800 (CST) X-Zmail-TransId: 2af9636231091191451f X-Mailer: Zmail v1.0 Message-ID: <202211021657454006946@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , Subject: =?UTF-8?B?W1BBVENIIGxpbnV4LW5leHRdIGZpcm13YXJlOiB0aV9zY2k6IFVzZSBvZl9kZXZpY2VfZ2V0X21hdGNoX2RhdGEoKQ==?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl1.zte.com.cn 2A28vgoZ031476 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at 10-207-168-7 with ID 63623116.000 by FangMail milter! X-FangMail-Envelope: 1667379480/4N2LPz6s1yz9wMT5/63623116.000/192.168.250.137/[192.168.250.137]/mxhk.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63623116.000/4N2LPz6s1yz9wMT5 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From 18dbde082d02c871453c5be8c762b6383a2f9641 Mon Sep 17 00:00:00 2001 From: zhang songyi 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 Signed-off-by: zhang songyi --- 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