Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1209391ybt; Wed, 1 Jul 2020 22:55:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbFeZbTwBHCt63Xdi13nSKj3sCq9HLbCOuIz0CbCOUccRYN3M1tSrlp9Z71VtIS/+NcWH1 X-Received: by 2002:a50:f086:: with SMTP id v6mr33801625edl.199.1593669316217; Wed, 01 Jul 2020 22:55:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593669316; cv=none; d=google.com; s=arc-20160816; b=wCUpgEIIPxZLrJZyl3xnB1vDd0eYQJ6W56wsJtwMua8OHkgYM6MQtrbtXaUyXMGA/N /Kyfht1B52mew92o6QNnVVLZUfz5eYzfzLkO8Vx/yAl9tJUPu2KqVcRzKYL3P2XeH8Oe XN55OXtn2AbjC7qzUjjXTnTi/V4xw75svjv5Ru29h6l1N9T2aJ6WNvT9VomNcyHhjbt2 ord4xHeW3xna1iMv/8aKFLGk2Hl04GSCwM+2ZqONxoRrX3sxwReWWtPMnUiI0oUZiInZ nJCidD14eu+VAMs3ddtBwtwaHL3YXTbyt9iEFon785qwGHZtZCR4as4JctiZpt3Gt1pc lAJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=PTX8G0FukGDGojl6rKgvGA2fV/um1+DnSL6BGGF5rTk=; b=JH4+ZahB4VkvpfK/4j96oyEOpcJIYlo+OEzbqoCbG8u7MDwsp0Q8pbhXHO45KbPoZN jCMYlptt6XyPfmH8todS2sUmNZVx9I2mH3Qok0IbxMg6ZBPlCPBMsMW0/dzxL/1/RRwW 39VAS+goW06GIdTIS9Ux1ysl8rAW84TbOgpiXHxFt0xRuR4LfMvt8i44i725KGAQZra6 bGqpytbwL358m7cTiLVeSNSiOuXuLGbPZBPD8EtCZwHmEa99F55tSYq/Bh5/eILyIlGP +pDewDViuIHOcge09yAwlnn2edM3hRsk1h5XCyURHNHiJl3iQPNvwPRzU3mKdE/y2gsw VCfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FquHVBuq; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w18si5364790edx.276.2020.07.01.22.54.53; Wed, 01 Jul 2020 22:55:16 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=FquHVBuq; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726053AbgGBFwO (ORCPT + 99 others); Thu, 2 Jul 2020 01:52:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725774AbgGBFwN (ORCPT ); Thu, 2 Jul 2020 01:52:13 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B0B2C08C5C1; Wed, 1 Jul 2020 22:52:13 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id p20so27705728ejd.13; Wed, 01 Jul 2020 22:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PTX8G0FukGDGojl6rKgvGA2fV/um1+DnSL6BGGF5rTk=; b=FquHVBuq7KCtLoqPVvMm9HrqdlxcjXKcG1/+uFCoy9V2e1Xg3bw0d7tBmfSyFAGcha IgZIgf0l9wD2Joq5cTRKEesJYG7anNVjvVKeExREY9By5CJp7ImSJPFfaXLFBp2QG7kr GfcmsNQbJeTmwzK7RPOonHY0aEpzJ3oy+6PpCWlQR9tOE0gkA4aLefcJWAmtGN0DZ/p9 0iG9N+XmuuBpFtbWok3DgwEfuMNhasYWjk+6ke3z1OwZh2CFg14Uh0A50qN5upQsO04R JP6Kg95vi7KGsDdV02vBFfzdaqeQWMTYOb2EDR4Wx8hjOIP4w+GxVz5NKeacl1FmgeNQ x0Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PTX8G0FukGDGojl6rKgvGA2fV/um1+DnSL6BGGF5rTk=; b=sz3AADI5Fmk3DzlphFAqu6pgihT2DygZFOX/gIjpKlLVJ+WiNaWBJ0fg97XY2ZJT3w iBnMZolPnvXYFtCiIEzpd850a6KnnnpO5DeeqF+dP2pniOA6OxZK1tijWzrWKghYj612 DSLeHzOUveutbtVnxASlmTvfmFs5jmQjfLn+k6imlFnMnpr6fL7T2JDLH7IbI951QryI hxLZBMnT9GOU6xVcUmytgH14T+74ptZpWOYRmbWv5LuYbAYWMiurNqLAIG9RwAmROnGV hWI6cB2GyztX94Y3LuIkN7BsaOdYSNOt7wZdRxXAe6nU62BJU50ZIaezHgML13ar2t+X iokw== X-Gm-Message-State: AOAM530imByHfxBfe440ANoVuius4lZoEHebstJ3OGmBwGCxXYu3RsJT ovBI1VsZwIFRIojQTaZLM0Fi2ZB19hgK8p2WZZA= X-Received: by 2002:a17:906:e215:: with SMTP id gf21mr20475157ejb.310.1593669132029; Wed, 01 Jul 2020 22:52:12 -0700 (PDT) MIME-Version: 1.0 References: <1593656074-10092-1-git-send-email-Anson.Huang@nxp.com> <1593656074-10092-4-git-send-email-Anson.Huang@nxp.com> In-Reply-To: From: Dong Aisheng Date: Thu, 2 Jul 2020 13:38:10 +0800 Message-ID: Subject: Re: [PATCH V4 3/5] clk: imx: Support building i.MX common clock driver as module To: Anson Huang Cc: Michael Turquette , Stephen Boyd , Shawn Guo , Sascha Hauer , Sascha Hauer , Fabio Estevam , Peng Fan , Arnd Bergmann , Abel Vesa , Aisheng Dong , Andy Duan , Daniel Baluta , YueHaibing , Stephen Rothwell , linux-clk , open list , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , dl-linux-imx Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 2, 2020 at 11:26 AM Anson Huang wrote: [...] > > > @@ -143,16 +148,18 @@ void imx_cscmr1_fixup(u32 *val) > > > static int imx_keep_uart_clocks; > > > static struct clk ** const *imx_uart_clocks; > > > > > > -static int __init imx_keep_uart_clocks_param(char *str) > > > +static int __maybe_unused imx_keep_uart_clocks_param(char *str) > > > { > > > imx_keep_uart_clocks = 1; > > > > > > return 0; > > > } > > > +#ifndef MODULE > > > __setup_param("earlycon", imx_keep_uart_earlycon, > > > imx_keep_uart_clocks_param, 0); > > > __setup_param("earlyprintk", imx_keep_uart_earlyprintk, > > > imx_keep_uart_clocks_param, 0); > > > > I feel not only the __setup_param, the whole logic of keep_uart_clocks > > are not needed for Module case. Is it true? > > Yes, but the 'keep_uart_clocks' is false by default and the function imx_keep_uart_clocks_param() > already has '__maybe_unused', it does NOT impact anything if it is for module build, so I did NOT > add the #ifndef check for them, just to keep code easy and clean. > IMHO do not compile them is a more easy and clean way. Then users don't have to look into the code logic which is meaingless for Module case. BTW, it really does not make any sense to only condionally compile __setup_parm() but left the param functions definition to be handled by __maybe_unnused. They're together part of code, aren't they? Regards Aisheng Regards Aisheng > Thanks, > Anson >