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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F27B7C00140 for ; Mon, 15 Aug 2022 08:24:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231467AbiHOIYC (ORCPT ); Mon, 15 Aug 2022 04:24:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231442AbiHOIYB (ORCPT ); Mon, 15 Aug 2022 04:24:01 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFF441F611 for ; Mon, 15 Aug 2022 01:23:59 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id l4so8206833wrm.13 for ; Mon, 15 Aug 2022 01:23:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=ccR4jofJWS4WjddLtDejUK8NNWJJwrLYpOoeEAK37hk=; b=Z4OrasUxwxONGoGSbJZ7h5ZiVDJCbioDFPaHHgazEMdyqJJQyiku6tGWNWKTBxDDij 0XFLBmX+VKlhOW3GlHqttMscBJR/jHcG+2v12k6Saa+CiBcOnZdA3V1wyJLfs2NW9luD OI12bNtPzaSOi2q8S34U+cWSx6mFLjiXHMgGEyxjYoxR9ewN8DqFLFMGEaOLtkFCU7K6 uMw0JCmAI4mkcpndUwsHxNzg4EGDXfB1SNKIN6iinjKhq5AiHj8qzTYoZaIWD/5JRuWL LT68U7GpoBQsbC/iS1pWAanZb98vASc0qbmjpZsf2YHcQ/Bm6TdkViWsHUFj4DVL48Kn eXDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=ccR4jofJWS4WjddLtDejUK8NNWJJwrLYpOoeEAK37hk=; b=DRlqhtI2QSdk1mrdeBCDqWT/T9SlsQhD/Vk/xBtzpPmpbKrYQ3FSmWrQNkKLZ944Oq gh9XLpkshnGMwldYFugvitcynFJBPyG4krU8opSthaltWRCTHhh8AU1YrlBwHLa74ciD jLQwZ/qyij43adjqAFb5LBAbWa+wplYn04veJmm4UB+eEZqJyjW9PYLFCNZM9Q7wl7yE yMcxeiQDVlzlkNEHKu6+SK9HSv2YZexJDc5Nw30wYwpAd0Cp1hBta15y+doHr3amW04+ B8rI2Xn9HcKDK6MCEFvmkn8KH+fNLvFHFhM8vgRZqjKWlR8qhqcXAEqxpiLjY/fTU0VP 85fw== X-Gm-Message-State: ACgBeo2p8pTOaTCbSeNC3ZU8P6m+QjxCsddc63VEwz23B1LZJ4dgCHbJ YZeYe2y+SjgYmBprDH9eBzJpUQ== X-Google-Smtp-Source: AA6agR6vOZElDps4UHQbfw36ab2JeSARI3ajaEksSEKZIFJEVKaK27WUb3W9MKgJkVPPBd8kJfPTEQ== X-Received: by 2002:a5d:5b17:0:b0:220:7cec:2953 with SMTP id bx23-20020a5d5b17000000b002207cec2953mr8158320wrb.697.1660551838382; Mon, 15 Aug 2022 01:23:58 -0700 (PDT) Received: from linaro.org ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id q65-20020a1c4344000000b003a54d610e5fsm9033154wma.26.2022.08.15.01.23.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 01:23:57 -0700 (PDT) Date: Mon, 15 Aug 2022 11:23:56 +0300 From: Abel Vesa To: Peng Fan Cc: "Peng Fan (OSS)" , Stephen Boyd , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "abelvesa@kernel.org" , "mturquette@baylibre.com" , "kernel@pengutronix.de" , "festevam@gmail.com" , dl-linux-imx , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-clk@vger.kernel.org" , kernel test robot Subject: Re: [PATCH V2 2/8] clk: imx93: guard imx93_clk_of_match with CONFIG_OF Message-ID: References: <20220815013039.474970-1-peng.fan@oss.nxp.com> <20220815013039.474970-3-peng.fan@oss.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 22-08-15 08:19:52, Peng Fan wrote: > > Subject: Re: [PATCH V2 2/8] clk: imx93: guard imx93_clk_of_match with > > CONFIG_OF > > > > On 22-08-15 09:30:33, Peng Fan (OSS) wrote: > > > From: Peng Fan > > > > > > There is build warning when CONFIG_OF is not selected. > > > >> drivers/clk/imx/clk-imx93.c:324:34: warning: 'imx93_clk_of_match' > > > >> defined but not used [-Wunused-const-variable=] > > > 324 | static const struct of_device_id imx93_clk_of_match[] = { > > > | ^~~~~~~~~~~~~~~~~~ > > > > > > Use CONFIG_OF to guard imx93_clk_of_match to avoid build warning. > > > > > > Fixes: 24defbe194b6 ("clk: imx: add i.MX93 clk") > > > Reported-by: kernel test robot > > > Signed-off-by: Peng Fan > > > --- > > > drivers/clk/imx/clk-imx93.c | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > diff --git a/drivers/clk/imx/clk-imx93.c b/drivers/clk/imx/clk-imx93.c > > > index f5c9fa40491c..5099048b7916 100644 > > > --- a/drivers/clk/imx/clk-imx93.c > > > +++ b/drivers/clk/imx/clk-imx93.c > > > @@ -321,11 +321,13 @@ static int imx93_clocks_probe(struct > > platform_device *pdev) > > > return ret; > > > } > > > > > > +#ifdef CONFIG_OF > > > > Hmm, I'm not sure if we should do this or rather should we make this driver > > depend somehow on CONFIG_OF in Kconfig. > > > > Looking at the other i.MX clock drivers, it would seem we need this for all > > them too. > > No. It is i.MX93 use of_match_ptr, I could drop it as i.MX8M. > > Thanks, > Peng. Right. Thanks for pointing that out. > > > > > I fairly OK with this, but maybe Stephen suggests something different. > > > > Reviewed-by: Abel Vesa > > Oups, wrong address here too. Reviewed-by: Abel Vesa > > > static const struct of_device_id imx93_clk_of_match[] = { > > > { .compatible = "fsl,imx93-ccm" }, > > > { /* Sentinel */ }, > > > }; > > > MODULE_DEVICE_TABLE(of, imx93_clk_of_match); > > > +#endif > > > > > > static struct platform_driver imx93_clk_driver = { > > > .probe = imx93_clocks_probe, > > > -- > > > 2.37.1 > > >