Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0322C433DB for ; Fri, 5 Feb 2021 11:25:10 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4A5E464FC0 for ; Fri, 5 Feb 2021 11:25:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A5E464FC0 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iEq5eIcaGrj1OV9j4sYYJ0kojzzPZS6L5KTfW3VQwO0=; b=uNymussnnOAIP+kje5EYFBtjN 1Rd9zQHxA6tcrS3p4UpHH8Mve2tTRFvs0xm/3d+1eGFPQP8YyamX2lkmZEdYPmX/md/uGSSkEipD7 hdUkE8sCLNOZ/64n4bULGI/Ogn6Cwsuf3tHOr/y36odfOCJwAhIcb0e/+AQRuuJYvgR3Gqp7i/3G2 PD2JfOv4SLaBsYD42QGER06xmxfyxJXxfVdBvryGs7gkvCRM0+jo9Ewz5pVuLSRrzpl9u+KAoeraQ NqYJaHJMamY/riONcpu0+JcytD96Q2cCnnrf13zPQJtdCrh5RnSrXTGJjgZ0svYm7G6dwh7UrH87X PCq0Jvcbg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7zDd-0006G6-6o; Fri, 05 Feb 2021 11:24:09 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7zDa-0006FP-JL for linux-arm-kernel@lists.infradead.org; Fri, 05 Feb 2021 11:24:07 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 115BO1wf048344; Fri, 5 Feb 2021 05:24:01 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1612524241; bh=vVhluiN+5BOsD2L9K3Iny8HhR+qZ41FlPExCZ+PrPR0=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=R0v8+yhiWdYyyheBcgfM8gf4VQHejMqvBqEpQUmE7xN1lD4c9xpMp8kkNHdVvx50c PYkOD5pg+ED+9JSbVd3NMccJHnB7xyk31St+bZFGpc21nP6LRghRD3bebpk0Z4mDKk HxXeWHiSF+s866ZaalNom1+NnoDXf4FZtv5Ri7Is= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 115BO12F093234 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 5 Feb 2021 05:24:01 -0600 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 5 Feb 2021 05:24:01 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Fri, 5 Feb 2021 05:24:01 -0600 Received: from [10.250.100.73] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 115BNxr2116113; Fri, 5 Feb 2021 05:24:00 -0600 Subject: Re: [PATCH] soc: ti: k3-ringacc: Use of_device_get_match_data() To: Suman Anna , Santosh Shilimkar References: <20210130050400.28085-1-s-anna@ti.com> From: Grygorii Strashko Message-ID: <7340caba-6975-2bc3-021e-c54a67cbcd18@ti.com> Date: Fri, 5 Feb 2021 13:24:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210130050400.28085-1-s-anna@ti.com> Content-Language: en-US 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-20210205_062406_752925_6F6B634A X-CRM114-Status: GOOD ( 17.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vignesh Raghavendra , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 30/01/2021 07:04, Suman Anna wrote: > Simplify the retrieval of getting the match data in the probe > function by directly using of_device_get_match_data() instead > of using of_match_node() and getting data. > > Signed-off-by: Suman Anna > --- > drivers/soc/ti/k3-ringacc.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/soc/ti/k3-ringacc.c b/drivers/soc/ti/k3-ringacc.c > index b495b0d5d0fa..312ba0f98ad7 100644 > --- a/drivers/soc/ti/k3-ringacc.c > +++ b/drivers/soc/ti/k3-ringacc.c > @@ -9,6 +9,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -1517,15 +1518,13 @@ EXPORT_SYMBOL_GPL(k3_ringacc_dmarings_init); > static int k3_ringacc_probe(struct platform_device *pdev) > { > const struct ringacc_match_data *match_data; > - const struct of_device_id *match; > struct device *dev = &pdev->dev; > struct k3_ringacc *ringacc; > int ret; > > - match = of_match_node(k3_ringacc_of_match, dev->of_node); > - if (!match) > + match_data = of_device_get_match_data(&pdev->dev); > + if (!match_data) > return -ENODEV; > - match_data = match->data; > > ringacc = devm_kzalloc(dev, sizeof(*ringacc), GFP_KERNEL); > if (!ringacc) > Thank you Reviewed-by: Grygorii Strashko -- Best regards, grygorii _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel