Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1865735pxb; Fri, 5 Feb 2021 03:31:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDyZQ4J/CbgfV/Nrtq7iCUxhcM/L7wW7ISm59wxZv6SSLc9QDwNuWXn6Ei0sk9dQMxmZnE X-Received: by 2002:a17:907:35ca:: with SMTP id ap10mr3632050ejc.451.1612524662639; Fri, 05 Feb 2021 03:31:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612524662; cv=none; d=google.com; s=arc-20160816; b=tjdz6cvFHlOkJvd1UnSVV1MZFf5yK3Gd3/7VBi4ALFeVnffP8N/4i4dwjczxBgsyAd 0BWi+2TMuPpLt0OcZ/AHZmUQ+kIAIcXgqS+Xuz3pnhsvT91jNGZUXSCT4nFncC7OAYpU 5NtUvDkpv5nbjk0I6W/PJuTAmPSX8w4Zge/r9YjDToBpHBXAiXKO+9DWaMbe6gotusXa 0r4lCt8W8NP62NaAAmkpU9e8/aCQAxuBJgwVnuH/TGz+MiwDojoMjKF9Ki7pUp/e8TSE lxg6vBPdBhbmcQbFjPMPc4ahQZ6zKGVV2/THOjLOMAiR7MHVO2+QJwvn1AW+YMEcOPyb 2lLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=vVhluiN+5BOsD2L9K3Iny8HhR+qZ41FlPExCZ+PrPR0=; b=IgWSlJTohgPYuoHRxew/jshCZW/bVVMQrHDnenQNwVP+Kjs7phcVO+9UQN1vmAvMZU 2d3zEgTJYQ1UzRN0JjaaC9TBg09dUwnSDC+7kXlOFns4+oDjm1645aYMgeEyA2NDmo7Q Jt9hYb0iM9ZoCyQcmr/WWjkGqGe4xPKLzCzoDR58p31NStCGlcRQ1IBd7hfgVyz6jxa4 7DgPyMEKTf+6gp5nplM9TBnjWH5CtPb1sCr1k2YRPAnT6qwcf6LjpoHphDNHoZ/NIw9e U2EA5smj4C4LpIk1j3U1DUQEhDos8rgrY8iV2q2FCEoU2/VgsLGhOLFSuMxdVI6z3jEs 69iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=R0v8+yhi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b91si655897edf.532.2021.02.05.03.30.38; Fri, 05 Feb 2021 03:31:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=R0v8+yhi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231968AbhBEL3E (ORCPT + 99 others); Fri, 5 Feb 2021 06:29:04 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:48394 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231357AbhBEL0E (ORCPT ); Fri, 5 Feb 2021 06:26:04 -0500 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 CC: Vignesh Raghavendra , , 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-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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