Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp984674rdg; Wed, 11 Oct 2023 10:46:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHozE6fCX2DP95oVtwm2xAafrJrgLHK+IGKM8uxPlIDDESFBshIWrVfEBtLPaSrwCezlhVf X-Received: by 2002:a05:6871:e89:b0:1e9:9c3d:ab89 with SMTP id vl9-20020a0568710e8900b001e99c3dab89mr1571214oab.32.1697046401292; Wed, 11 Oct 2023 10:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697046401; cv=none; d=google.com; s=arc-20160816; b=g0s3ZqQU0OXqaLUUxyJvNE+E1RAxoKJenwdFfbetqhwq0nb590v+Z8S4U5giUOnC4b 3vLl1Wxk/O4mS2j/6PREKf8vHZb79fWoxfVPM4LIKxEgCzx3EssgTTcpfdmUkmaz2/x6 USd5WzuBHN/GVPpmlqxtAgw6kTduW7buCaUyljhImUPxnB2tiirpx8IfJGQLCgvzRpem Mb4lCNob7K8CwhjCbKovzYrAKueDKmiz1DOtGgdrHNQmvCkt7BOYX1gVPlU3hURlKUjt qzJw2yy2hiP/FEtshJ3X0NIObzSXOkPIUC5tdhgngG84baqHeWQ1X264yE7pc4E5Y5dI qXwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7KT2lGeLwtQTB/P6/+Ge2h+4ZxKBka/i3DIq7lu38l0=; fh=6GxB2yC4VIwfSPioGOengd3OGCnFSpJQUbI5X3Jgos0=; b=FHRPDFRU3vqPwdoqxLiV1NpB+BNDNNUIBYzN5/uFbjAx9qM97gDG1VM/YI5mgYV3UA hTrr9njJd0NMCadqmOmm0W/7+uyHLJ55Dn7N9yr9cW3NDZ2pKTXQfZERUnNseaDIkKBI urYQDrg27vp4MrJnqjPT6F7WGKjWGl+iwh1zRzFCm88pjPK3tTb4qeN87KSCbeYnVjn5 mG+PSMitCJIE4e5i4+GaOg4spVgU1KZAHZ67ko2gQ/UZlLPUNd+E8iF7z5HR9jy4yuqa 3Abtk+CvDHFJAr7njEQj+8+zHKTp9KGuRfrk/9Araovpyp9/XWCxwvxx5OHJNjPDbh5M ttZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Nr7rRhNa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id x63-20020a638642000000b00578cbee11easi280058pgd.9.2023.10.11.10.46.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 10:46:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Nr7rRhNa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 1FE848135C43; Wed, 11 Oct 2023 10:46:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233045AbjJKRqV (ORCPT + 99 others); Wed, 11 Oct 2023 13:46:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232642AbjJKRqS (ORCPT ); Wed, 11 Oct 2023 13:46:18 -0400 Received: from mail-oa1-x2b.google.com (mail-oa1-x2b.google.com [IPv6:2001:4860:4864:20::2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFEF0C4 for ; Wed, 11 Oct 2023 10:46:17 -0700 (PDT) Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-1e96c9c4597so15435fac.3 for ; Wed, 11 Oct 2023 10:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697046377; x=1697651177; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=7KT2lGeLwtQTB/P6/+Ge2h+4ZxKBka/i3DIq7lu38l0=; b=Nr7rRhNaT0ULaP7g7EXB11BpmhJWUcfCbVDbKqJpgBj4b4HG1VpBSDrgTLw9WYBdYH N+pkdJseSKpimavfu/8X5Qkdxy0cZy7m8ZUx7EvRVF8hGLSc0+ylxHE6QR4Jheb1TftG UZc+85BVAah85JAumNrAStRU/yRZftgcC5oX/VM3Z99XF8yPdfvETpp8lhKWA1Juyklc lmgI0DuFj+UnULbL4s1b18XxNI3b2Gf6WxB70t1UIHtSSNiVepkY7UGCYOjUzulTWPCb V+txPvM0+xfn423XIAsXTlX1Tz9fFRPDHsm9xy0/XyaLjFODXS1ihCvVbfe+bU8t7uSL BKAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697046377; x=1697651177; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7KT2lGeLwtQTB/P6/+Ge2h+4ZxKBka/i3DIq7lu38l0=; b=fA1V5L1+dmMoHeNF/dj8jy3CMUT+SW47UgT7OBXBxcf44FZQKu7avo2e8TMWFg4aCm 7vOk8trAHlGgryUM31qBDUepdXYPnm1gJe7NdvbeRCpelD/8NGqYB/R9U9YyG8xuYDEW LzllvZX0M3Klp4Pnt7LkEVeF3UpAs5ViLgzjjg0s7eHuXP2OGQT7MPy/cpRbfJmCdAL/ CQBYZSBKVRWldYsNvjl/0KNIVQgQvPPODT5ue7QjNGQsO34K6R5I7eKM/txNtWA8Zkqf XtefMD2w0OEmt1bcMfVqkKaS07ZoXzH+Zh1Js7fWTlP2bnvOdPnBZGgAyd6qkvlYKnog 3TBQ== X-Gm-Message-State: AOJu0YwIU3ISdSrzlho/wws+1QkX2ShTnFRf/apsCI6wsCaIRZbST+vs k2Bh8aY2E5QGqvjFKijOcZ+wGEuElfqnfj3F1dk= X-Received: by 2002:a05:6870:d695:b0:1d0:f5bd:6e9 with SMTP id z21-20020a056870d69500b001d0f5bd06e9mr21630202oap.22.1697046376987; Wed, 11 Oct 2023 10:46:16 -0700 (PDT) Received: from p14s ([2604:3d09:148c:c800:fbd6:ce83:3759:dbcc]) by smtp.gmail.com with ESMTPSA id i5-20020a639d05000000b0058dc763f449sm147777pgd.1.2023.10.11.10.46.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 10:46:16 -0700 (PDT) Date: Wed, 11 Oct 2023 11:46:14 -0600 From: Mathieu Poirier To: Rob Herring Cc: Patrice Chotard , Bjorn Andersson , linux-arm-kernel@lists.infradead.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] remoteproc: st: Use device_get_match_data() Message-ID: References: <20231009211356.3242037-10-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231009211356.3242037-10-robh@kernel.org> X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 11 Oct 2023 10:46:39 -0700 (PDT) X-Spam-Level: ** On Mon, Oct 09, 2023 at 04:13:40PM -0500, Rob Herring wrote: > Use preferred device_get_match_data() instead of of_match_device() to > get the driver match data. With this, adjust the includes to explicitly > include the correct headers. > > Signed-off-by: Rob Herring > --- > drivers/remoteproc/st_remoteproc.c | 14 ++++---------- > 1 file changed, 4 insertions(+), 10 deletions(-) > Applied. Thanks, Mathieu > diff --git a/drivers/remoteproc/st_remoteproc.c b/drivers/remoteproc/st_remoteproc.c > index e3ce01d98b4c..b0638f984842 100644 > --- a/drivers/remoteproc/st_remoteproc.c > +++ b/drivers/remoteproc/st_remoteproc.c > @@ -16,10 +16,9 @@ > #include > #include > #include > -#include > -#include > #include > #include > +#include > #include > #include > #include > @@ -341,7 +340,6 @@ static int st_rproc_parse_dt(struct platform_device *pdev) > static int st_rproc_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > - const struct of_device_id *match; > struct st_rproc *ddata; > struct device_node *np = dev->of_node; > struct rproc *rproc; > @@ -349,19 +347,15 @@ static int st_rproc_probe(struct platform_device *pdev) > int enabled; > int ret, i; > > - match = of_match_device(st_rproc_match, dev); > - if (!match || !match->data) { > - dev_err(dev, "No device match found\n"); > - return -ENODEV; > - } > - > rproc = rproc_alloc(dev, np->name, &st_rproc_ops, NULL, sizeof(*ddata)); > if (!rproc) > return -ENOMEM; > > rproc->has_iommu = false; > ddata = rproc->priv; > - ddata->config = (struct st_rproc_config *)match->data; > + ddata->config = (struct st_rproc_config *)device_get_match_data(dev); > + if (!ddata->config) > + goto free_rproc; > > platform_set_drvdata(pdev, rproc); > > -- > 2.42.0 >