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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C5A2C2D0A3 for ; Wed, 4 Nov 2020 19:05:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C790720704 for ; Wed, 4 Nov 2020 19:05:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="WffJI4fY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731070AbgKDTFv (ORCPT ); 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-Google-Smtp-Source: ABdhPJwSb7Xs5JU7LvSxnxDJzTwVF5qjpqXYY4TsO/ILSHq1xQbXdfVIMJi3nS5qDmjPiCZ98ePPXg== 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 >