Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp977275rwi; Wed, 2 Nov 2022 22:23:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7kE7BM0wwBelC+5gpOFM38+eraU4M4zoAsOCsdmME+yfmbHlM/BvVhbz4kk8GrfX3dydI/ X-Received: by 2002:a63:4656:0:b0:457:523c:57ad with SMTP id v22-20020a634656000000b00457523c57admr25104739pgk.318.1667452998451; Wed, 02 Nov 2022 22:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667452998; cv=none; d=google.com; s=arc-20160816; b=RD1iQ6qJxDDgO2NuqdG8mp4jrczEz8mFWDzQs4C0x5bry8zJFuutOJiea5/iw81S6Y T+w6JLJ5FNaJaG7dx1rimHb6kx3S+iRh5HEtjVoGihQUaq7YOy098kH2C+Ju/08ytm6j h99mmLUs/61OXnA81FWMoIz2SiStNQV9pu6yR3UjjmOdLKRxc0d/wMehxxsXrCtt8XsD 0brmxrsFf9dATcq6E81T9uux+ypUqtuKeGyi33khBYZyZwO1TyRHU8Jh2jaj/jLQeERc UtEXMWIGcEpw9HalVMjD5aGJTyG2x2cEwwSTvMvbriVqSzih53/XoTx1nLE3NX9l5ser 3BiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=4iQp2SQBUEk5ytWus0w+Z76aptO8qBE/W1pEv83Jcic=; b=K9d0xsfgnfkh14idwKONG5u+1DzsXcV0wrUY7Tpl2+NhXbV1ayMk5i/nRZ1faPTddk O5WT5UwGqiKTCkSy+Ja8kIufzgY173i6u4OXWpK3ELobLUg5oi2B9F8A4mVU6iTI74KE iT13ns+9dO6Py0DtJlCD6SpjQHxotnk4X3Eu9sHqW1ltP1fkYqyP2+4JvuIFW8ROi+LH q3wAp3p1m4UwU17qoXIJ6k4AztG9z6jiAn4X+usXcwjKpgAMhhYlO+ZJY4z3aeUnLKh3 waQJRc6tbkufR5D9d4Oz1FyuW6ww6EHLkTw12PA6zmjKeZD6rWk8C39f56/poeCDenYm y3bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dsRDT8Yk; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e11-20020a170902cf4b00b0017f8d9b7e5fsi18832553plg.133.2022.11.02.22.23.05; Wed, 02 Nov 2022 22:23:18 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dsRDT8Yk; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229523AbiKCE6L (ORCPT + 98 others); Thu, 3 Nov 2022 00:58:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbiKCE6J (ORCPT ); Thu, 3 Nov 2022 00:58:09 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2F4F17E1A for ; Wed, 2 Nov 2022 21:58:08 -0700 (PDT) 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-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <202211021657454006946@zte.com.cn> User-Agent: NeoMutt/20171215 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 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