From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2F44C4332F for ; Thu, 3 Nov 2022 04:59:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7Hmz5+VWZdCfy2RYG0dMdQtooJpTi/GqKE8q0XD7S5k=; b=aYx6YViD6KRyG+ XE4/qe+PI3nCoiXsoIYF5V7OLqkzbEWcDHhTbCCekBjg4Za3UTLLXumJ5SmDVUBc93Vr4muuNivj7 jYTTUNOXGOAk/IAIDfe3+CWQ1KJrgP7Q6W0E+Sz8tDFThYLoJRIUNCGJQ8vSZc5m2oTc4XNZBQD4r Yc2P+1QuCCkSZP4JND2ofNd75lTkvn9LenESfrcLvzvSpzCy+AHtCBQrlTQOrlbYWM5r3trd+peH2 ZKgkCbD+uKszfYZplfCqwRbnVXKcrIRiQSFMe/uBSjcpGdaZmICmEynDTGhBtnxRCLEb/udXnugpF abvoCkmds5oEhjd3aeUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqSIs-00G59W-28; Thu, 03 Nov 2022 04:58:10 +0000 Received: from fllv0015.ext.ti.com ([198.47.19.141]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqSIo-00G590-Vu for linux-arm-kernel@lists.infradead.org; Thu, 03 Nov 2022 04:58:08 +0000 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2A34w3Tj104573; Wed, 2 Nov 2022 23:58:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1667451483; bh=4iQp2SQBUEk5ytWus0w+Z76aptO8qBE/W1pEv83Jcic=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=dsRDT8YkE9DTPiUGjpbH79k4PCs4zsEmGgQE89Y44KSyaRQ7TtNxF0SM3/0IeUc0U ZGkGctdnZi2rM6DBGOJsA0bjT2rwLgjkwJoLPdnMp1D8z7702hGyH8Q8YEMQ7t4aIf MDFcFECP/Kk6lPy8BBilNf5ZM0GeYeB5J/V77VOI= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2A34w3ib007369 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 2 Nov 2022 23:58:03 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Wed, 2 Nov 2022 23:58:02 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Wed, 2 Nov 2022 23:58:02 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2A34w2TT036424; Wed, 2 Nov 2022 23:58:02 -0500 Date: Wed, 2 Nov 2022 23:58:02 -0500 From: Nishanth Menon To: CC: , , , , , Subject: Re: [PATCH linux-next] firmware: ti_sci: Use of_device_get_match_data() Message-ID: <20221103045802.xtjiclljnficcmxc@bulginess> References: <202211021657454006946@zte.com.cn> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <202211021657454006946@zte.com.cn> User-Agent: NeoMutt/20171215 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221102_215807_128756_D6835119 X-CRM114-Status: GOOD ( 20.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 16:57-20221102, zhang.songyi@zte.com.cn wrote: > 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 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