Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1534180pxb; Wed, 4 Nov 2020 11:31:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzWKul2RlH5VYXUXgedz2isVIB4B/nWLamwvGk8RE1ujQVQ9EovvDdJAckQoGdndpnXTpjT X-Received: by 2002:a50:e3ca:: with SMTP id c10mr7515014edm.222.1604518282993; Wed, 04 Nov 2020 11:31:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604518282; cv=none; d=google.com; s=arc-20160816; b=QwBv5wog8f6hf/EdsscSmJKbMm/B6BoanDkmp+NLGAcEWPyr58qIgCZfBXc5xYNq1n +VA0mGzVr+nn49Mv+6IqygpOvHwjAuCkcSntwpN5YhTc4FpP3q/VWflkrYTSEj/w8+Yd y3NymV+koQPD/nlqV1GgpUiWMTpTTtra9T+pcRgUNOHQjuf8fWuu9+fUrOrYKPfATcEb fYPZ9arkHRu4Ay40aciAqGZLPV0au9NF5GQMlZI1naqdPbHxhmSQszNhZ1KyO70Gd+qr yKLAj6xMCUbgjJsGt6INd3iuaA96m/fNRkA8xPv4rlOymd7DDx4i4OYMCy1IZaHLAYAa Nqrw== 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=e3RgBMCNd6sKZVbOqvGd6J+ApVrztDEwtVCn4pPL4cY=; b=iDxG6KB+qRJUzmvp3KRSw3CnfO802Ev323k8bInDgO8P4tUH2PNa25LEhB1FBCouXS YWqCEIIZFdzAiEVIz5E5UGmKjdZzGbue5nXF52PujtpwcmHQ9vBLIEX3eliDY2XsNLoo kh7c1bh+fyYoMh0sePkmruFfYIDCRYKKUrEuo5k8LUKqLWfbGftn67FmM4pwewIFv3/Q 9BQzYTGN4IbU7bh0BYnMwN8UwX6gIoXrWD6ngsRQl7prc9w4jVUMSGM2jc7+//LYlcJm 6QNbn9ceKJLBhMuacduYa4Yv/T4/mSoTGno6PyVrlmIO2DpHIa9kpThyB6Sb5RzKlm4f YEmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WffJI4fY; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a9si1861287edt.50.2020.11.04.11.31.00; Wed, 04 Nov 2020 11:31:22 -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=@linaro.org header.s=google header.b=WffJI4fY; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731012AbgKDTFv (ORCPT + 99 others); Wed, 4 Nov 2020 14:05:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730008AbgKDTFu (ORCPT ); Wed, 4 Nov 2020 14:05:50 -0500 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8642BC0613D3 for ; Wed, 4 Nov 2020 11:05:50 -0800 (PST) Received: by mail-pf1-x442.google.com with SMTP id v12so2050915pfm.13 for ; Wed, 04 Nov 2020 11:05:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=e3RgBMCNd6sKZVbOqvGd6J+ApVrztDEwtVCn4pPL4cY=; b=WffJI4fYp4FmcCF8nhmDGr00/Y8B8NnS9ajFsJns0MLqg4gebReZE6TRQPBIoh6Etu 9qykh1g3rHXSVsje8HrlVgj1qIOwf2hJReWpMctR7Ua12XZIKKmWYJraVxLPIXx8mx1C PwlFC4Lx6B5D8B5nKMn+YVEZt8Yqx3diDzr6LPjXkuxxkR78nDntu3DZaqWsYp1RQomk aAYcB333lTvasR1WznLCjCwPcgBiwA06BjuZf/0iNa/pmvyQ3tFD8stopS600nXWYQFk FgQhVtTHZAlNesMYo+BKuIFzp+Afoky5/qQv3GOlCdBK6jMzY2x63MQKQ/s8nOTvFy2l vtkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=e3RgBMCNd6sKZVbOqvGd6J+ApVrztDEwtVCn4pPL4cY=; b=VoZPVsreNHXp1mv61dDYt94YNz9Uz5FYyt7vXiS4ysw0Vw6ag9pQY04XvAQNSXz8Ww DKyLVEglc/jbTEwDJutJoTyg/jpOcc/qztco/C99bDMLUToTfNoMxQ3/n9EzsbT7av5p HzqhARPDqxj0qusg+k3NPLH7slvXqSL11gOyKjtK2ZEMmgPLsfFPbQEorA8Vq+Pks8Yl GYYx8zBuD7ali6lX7q+cN6b2h2eDt7HSge4fsOn7NGZSUWKKL77qFB0ztFR26C7+qgEC +Bgpvg4wgbr7g/k2s0o7cQztWCgUOvzLyGdtUxxEvatTv/E9ZitzcMAHx+WGg3sapsgX N/9w== X-Gm-Message-State: AOAM531ZBN28Y4RJbrG/2++9jOxhjxfMk+rBWFdcMIhgFyKsg8TOhnh7 1pG4MHOnedhQ3lMEBlbzmQNP+w== X-Received: by 2002:a17:90a:5310:: with SMTP id x16mr5606218pjh.62.1604516750131; Wed, 04 Nov 2020 11:05:50 -0800 (PST) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id m129sm3210275pfd.177.2020.11.04.11.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 11:05:49 -0800 (PST) Date: Wed, 4 Nov 2020 12:05:47 -0700 From: Mathieu Poirier To: Alexandre Courbot Cc: Ohad Ben-Cohen , Bjorn Andersson , Matthias Brugger , linux-remoteproc@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, kernel test robot Subject: Re: [PATCH] remoteproc/mtk_scp: surround DT device IDs with CONFIG_OF Message-ID: <20201104190547.GD2893396@xps15> References: <20201102074007.299222-1-acourbot@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201102074007.299222-1-acourbot@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alexander, On Mon, Nov 02, 2020 at 04:40:07PM +0900, Alexandre Courbot wrote: > Now that this driver can be compiled with COMPILE_TEST, we have no > guarantee that CONFIG_OF will also be defined. When that happens, a > warning about mtk_scp_of_match being defined but unused will be reported > so make sure this variable is only defined if of_match_ptr() actually > uses it. > > Fixes: cbd2dca74926c0e4610c40923cc786b732c9e8ef remoteproc: scp: add COMPILE_TEST dependency > Reported-by: kernel test robot > Signed-off-by: Alexandre Courbot > --- > drivers/remoteproc/mtk_scp.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c > index 577cbd5d421e..f74f22d4d1ff 100644 > --- a/drivers/remoteproc/mtk_scp.c > +++ b/drivers/remoteproc/mtk_scp.c > @@ -772,12 +772,14 @@ static const struct mtk_scp_of_data mt8192_of_data = { > .host_to_scp_int_bit = MT8192_HOST_IPC_INT_BIT, > }; > > +#if defined(CONFIG_OF) > static const struct of_device_id mtk_scp_of_match[] = { > { .compatible = "mediatek,mt8183-scp", .data = &mt8183_of_data }, > { .compatible = "mediatek,mt8192-scp", .data = &mt8192_of_data }, > {}, > }; > MODULE_DEVICE_TABLE(of, mtk_scp_of_match); > +#endif I think it is better to add a "depends on OF" in the Kconfig. Thanks, Mathieu > > static struct platform_driver mtk_scp_driver = { > .probe = scp_probe, > -- > 2.29.1.341.ge80a0c044ae-goog >