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 6428ACDB470 for ; Wed, 11 Oct 2023 17:46:52 +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=Q+iHI62Ct+7Sb2LdCjjuTtvr0ShLuOtaaY/FKQDC+0w=; b=rWY46mXfhHHI8A mqBLhcdkOreWSNuXz9NjmGUgoAF6dWu7dfTUNUfo+DTlrOTdirsUoHFj8YqYbii+hkJ2YpVtrH++f LglKWYUQZLi2WKt0qHg8hwlJitDq4pMOIVRBmZTEVnLWKs4oGuGPNnuzwvK4tJ0pd/TcMFGGRr1E8 Dk1hznDnj+C0/ukO2vu7YlwZsprs/8o8IvQ5DSEh86V3S6pnIZEpyoPjrMHIgy4twIhlGLJBYvZ0Q BxEV0LG6wAptNulQ5s3/vgsFBdTbxgFxkfXVPi5e2E8GqPoQ/ptRlovlRZ4AYG2CNiri7Qx9xQoXI 4NuxE4Jd04wSy2NPqRBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqdHp-00GNEk-1A; Wed, 11 Oct 2023 17:46:21 +0000 Received: from mail-oa1-x2e.google.com ([2001:4860:4864:20::2e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqdHm-00GNEP-3A for linux-arm-kernel@lists.infradead.org; Wed, 11 Oct 2023 17:46:20 +0000 Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-1dc9c2b2b79so32346fac.0 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=lists.infradead.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=Qgi0WaPDcjSRRq4g/wPJRDB2m1VupCeesIBL3k/X2QGNahHkg7YfQ5/Ng0bGT3ncKT 0foYrpD4DV4pM6A8MnUvANIhyhG8AbaW8wd+7BrCUisASrjTiGtCM6+WBn9n/39bRwUZ uUxmak1JpDbazo9zzKwfNnMbxl8oNeVDvBp2jBVDyPHz3H8Ao7K1oW1n+RGYwKq79H8h pvsvUgBgHZM4ztHp6nYe28ulejRrAP+e20H2HhGwW6ZSk6/eY2UKQdCPdl8xoITGohuL +uZR44VzBFpCCby5nKmp6w9t2HrYDbRNtrUhgZhs2ZR0ZkqdTB+Heracy8BHy5a8keLo Bjsw== 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=B9rGCVnWvO9Z9WFSPi2NGhFIHiPO2I7RYbQ7+jBVYnOVXbbyxDITihBGp4ECHaOqKd b4cXYQap+hREDzL4p1sTor0Ol44I6/2QKBtVltJ6TBwA6y9pTQBirICmw15VsaEKioe8 KT+0norM+QkjTpdEu6Z/VpQJ/Cs2JKYfNbY1fJpze2kI0Ekj2DrPHB5i+7tEGhy236N/ 8vhbk9i6Lx13VPxgfijY4/bFSsTnif1IGAbURcm6UsAPDn3lQEOOXInSn9V4Eal/M82D Q0eZj5US3eFmfEXrW+ikmzYXYRMlAb7fSrThZFst5uBigP59VOVGnbEcQ6cUY7vcZYp4 kUYQ== X-Gm-Message-State: AOJu0Ywlc8QJ/UJtBv0GXg9ntmcA+zZGt+2UtbXlVQwYHTAy51tckWrC Wo9PCMfLI4z6rT34mi/3y+Zq6w== X-Google-Smtp-Source: AGHT+IHm2w7sS5fQYEdtfUV3xeYuE81hOMu1l4YBnnpyYQgzOJ8pLWde9SSOYgV61kWZpxepTZ3Okg== 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-Disposition: inline In-Reply-To: <20231009211356.3242037-10-robh@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231011_104619_060950_45212D27 X-CRM114-Status: GOOD ( 18.94 ) 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 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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel