Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2353357rdb; Tue, 10 Oct 2023 00:59:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEhSEuZvDMh8VO0jfa1wcV+upWl3W+HNIQGa42I7wH/zydaHZbVlIYsl2OvLcua5Es/u8+l X-Received: by 2002:a17:902:d50c:b0:1c4:fae:bf28 with SMTP id b12-20020a170902d50c00b001c40faebf28mr16410020plg.32.1696924797722; Tue, 10 Oct 2023 00:59:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696924797; cv=none; d=google.com; s=arc-20160816; b=JbjdOPdB79RZR2d0CcVkjCwaV8UPuEd1K2BHcCXzgrmnHbicGA9v0jNV19tzW3H4yo VU2IzISew9BWnX7U4oBN+mNscwUiCCkpwy2HSpq1rwkG0cdhMMpWXDMUEGpXfBA16V2K sJPrcpmJxrY0N87pkIViCa7BhbiDaxbhZ/Bskria9FE7qsQt82SALcKvji0wT0VSpil2 alVV/WrKINWDjFDEcDQzYHXHZD4gNNHe6xoirIuIhH1AUCZEr+lrRwZG24yHCZBxXr8J IpRGYNfboBK/8jtN4yPvmrUBghkCMkDnZzOPSVn3HCc0d2Z8GXj1PeBCsG3wJ2okaBCF UCjA== 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:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=t6FqgqlXllmqDpAuOcl6ZMCWgd2QVrsE+XreUWApzA8=; fh=uqppd1ljjFiJjyZPF9vQIW5pejcN9eVLUug+YQNfMGE=; b=RHDeUPNagQ9WJsjwSDhWMMopZfVum6NQV2tikb4FRjqK42TTfRYc64n9i6u9+bHGFm kb1c+uUFyz9x4zFETCJXrNJh+8LMf/27WTDm6MueFMt1NkTFjQJR7atdD6gJ1fRsqMd4 14ehBETkpPFNCQhniIXRxwJc90Sjc6PlwOaksPwgMgR2D0OtMUrMPdBiR4en1V1xxLAR inmbNz2fOfHdPObvvOfoPfGE9/OurJ/mOuuvyTP/tZ3XErqe/MzY8mh5NffPK2tM/XTw W2JQMqAd8CU+SzWaLaTuYeNOSJ/CgWqhEq8+H2uDAh00uiWb/pZMHzLds3xtwMMzP28b oD8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=8WG6ldG0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id q12-20020a170902eb8c00b001c73738781dsi10837222plg.609.2023.10.10.00.59.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 00:59:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=8WG6ldG0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 385F88023980; Tue, 10 Oct 2023 00:59:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442707AbjJJH7h (ORCPT + 99 others); Tue, 10 Oct 2023 03:59:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442686AbjJJH7f (ORCPT ); Tue, 10 Oct 2023 03:59:35 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34267BA; Tue, 10 Oct 2023 00:59:32 -0700 (PDT) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 39A0nQgY016238; Tue, 10 Oct 2023 09:59:17 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=selector1; bh=t6FqgqlXllmqDpAuOcl6Z MCWgd2QVrsE+XreUWApzA8=; b=8WG6ldG0V+qYvxZh225ReFUd/uM46ZswXZSpm 0OWAdpoqq1PV/zkX/pS9te9Sd5ryP+EX8SkQtAcCwPSFOzWuQmAf8JIriXW/VDfY X/RH8FwK3Zo1EdvJOAhVCl+p051ADyShFwGrIBjkqKJsDlW6/AJ/WiLvhVo/tnQu BSjoko3UbmDljHPTjwtl7e3L6yk/KmRxB9cpB7XOawDqSe1H65vaVIjpauBnz8X4 FWsq2nJlrWf7RwwWdckkGXTbjmr0VTBZoHpIPkTN4v9eGcUNREUMH8VueQBrSYWd ef8WFNLN5lO2sKu2Q+aVAuymUo7yDHuTLHfWmJGm+Yp+uqcDA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3tkhf7grvu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Oct 2023 09:59:17 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 67756100058; Tue, 10 Oct 2023 09:59:16 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 57A842128B1; Tue, 10 Oct 2023 09:59:16 +0200 (CEST) Received: from gnbcxd0016.gnb.st.com (10.129.178.213) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 10 Oct 2023 09:59:16 +0200 Date: Tue, 10 Oct 2023 09:59:07 +0200 From: Alain Volmat To: Rob Herring CC: Hugues Fruchet , Mauro Carvalho Chehab , Maxime Coquelin , Alexandre Torgue , , , , Subject: Re: [Linux-stm32] [PATCH] media: stm32-dcmi: Drop unnecessary of_match_device() call Message-ID: <20231010075907.GA1642294@gnbcxd0016.gnb.st.com> Mail-Followup-To: Rob Herring , Hugues Fruchet , Mauro Carvalho Chehab , Maxime Coquelin , Alexandre Torgue , linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org References: <20231009211356.3242037-2-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20231009211356.3242037-2-robh@kernel.org> X-Disclaimer: ce message est personnel / this message is private X-Originating-IP: [10.129.178.213] X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-10_04,2023-10-09_01,2023-05-22_02 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 pete.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 (pete.vger.email [0.0.0.0]); Tue, 10 Oct 2023 00:59:53 -0700 (PDT) X-Spam-Level: ** Hi Rob, thanks for the patch. Acked-by: Alain Volmat Regards, Alain On Mon, Oct 09, 2023 at 04:13:32PM -0500, Rob Herring wrote: > If probe is reached, we've already matched the device and in the case of > DT matching, the struct device_node pointer will be set. Therefore, there > is no need to call of_match_device() in probe. > > Signed-off-by: Rob Herring > --- > drivers/media/platform/st/stm32/stm32-dcmi.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/drivers/media/platform/st/stm32/stm32-dcmi.c b/drivers/media/platform/st/stm32/stm32-dcmi.c > index 8cb4fdcae137..48140fdf40bb 100644 > --- a/drivers/media/platform/st/stm32/stm32-dcmi.c > +++ b/drivers/media/platform/st/stm32/stm32-dcmi.c > @@ -20,7 +20,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -1890,7 +1889,6 @@ static int dcmi_graph_init(struct stm32_dcmi *dcmi) > static int dcmi_probe(struct platform_device *pdev) > { > struct device_node *np = pdev->dev.of_node; > - const struct of_device_id *match = NULL; > struct v4l2_fwnode_endpoint ep = { .bus_type = 0 }; > struct stm32_dcmi *dcmi; > struct vb2_queue *q; > @@ -1899,12 +1897,6 @@ static int dcmi_probe(struct platform_device *pdev) > struct clk *mclk; > int ret = 0; > > - match = of_match_device(of_match_ptr(stm32_dcmi_of_match), &pdev->dev); > - if (!match) { > - dev_err(&pdev->dev, "Could not find a match in devicetree\n"); > - return -ENODEV; > - } > - > dcmi = devm_kzalloc(&pdev->dev, sizeof(struct stm32_dcmi), GFP_KERNEL); > if (!dcmi) > return -ENOMEM; > -- > 2.42.0 > > _______________________________________________ > Linux-stm32 mailing list > Linux-stm32@st-md-mailman.stormreply.com > https://st-md-mailman.stormreply.com/mailman/listinfo/linux-stm32