Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp469028ybt; Wed, 1 Jul 2020 02:55:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1VygKPYWuCQnLVHJYAohFe/LvQzfqWBLq+MOyw3AtfO2GeBityjh0VQshWk93MsjKPYY3 X-Received: by 2002:a17:906:7d86:: with SMTP id v6mr21626384ejo.542.1593597335832; Wed, 01 Jul 2020 02:55:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593597335; cv=none; d=google.com; s=arc-20160816; b=Pd7qAcmuxPPMlTmyodAcEBIaRK88GxRCYsL4QxV01+A6G63SNh1sCcx3N5SLsXdRHV hKzDChxJiVgpW1DPwUNshLTe2h19ziSx4p4iEdE8NVo1HUaWvyEaY0LwDczNmdtTxbmd 066gnQrNJ0J5Eh1dzZzInan7qM/qL1PzhRGVNMsOFglGFMqoy2T4Z2X/y95kjpxm9Lrn BV309p0kt0wU0eoFiKb/DvNNaxdPBNhsY7MXosI2dd06Cjoh3e6BnnxN3tNWJuzDz3yN 3pFEVA889HgC4ElvfO1G3uHCKxewNE1ovHrCplnB7XBf5ozk6EgpHIHRPpMs9NFyXYuJ fFLQ== 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; bh=caVIOte9WG8C65cKHAqT2WyuxiznoNTMeLif521JlSw=; b=w8Dx+duKAOtHbqAzxIxjgenSGTyic1EQs+Zh+GDvllE5zFW6v58F3OCGYibw2jnhBj 5X6R+oIPTH31OOXKfwkoa7dAc100rx5A2k9CHt4Q98yELi4KTwt+pONPZ2ABG0EB0z0h NbvHnx/8msAUCoZLNx/8zuQ3qzQ4oZ3cXOqrFAPmwRCBBt6Lc8Q7OXigSbi6NDXiH0t+ 8xm8Oa9Ma0wTOwUZA4aQHb3+I0c62cieB5oHs50JdVPRDIPT+6wa9d2sLW9BiZZc+ef6 lNOfjmg/CNfv5qAj5Uaa55XcReikuwUaX+rvBYtzTvEcfuuERzA+N58mGBgM8zh7kynD JszA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k22si3716617ejv.685.2020.07.01.02.55.12; Wed, 01 Jul 2020 02:55:35 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729832AbgGAJxp (ORCPT + 99 others); Wed, 1 Jul 2020 05:53:45 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:35417 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729415AbgGAJxo (ORCPT ); Wed, 1 Jul 2020 05:53:44 -0400 Received: from mail-lj1-f177.google.com ([209.85.208.177]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPSA (Nemesis) id 1N7yz7-1inUHd0d9f-0151pi; Wed, 01 Jul 2020 11:53:42 +0200 Received: by mail-lj1-f177.google.com with SMTP id f5so10290608ljj.10; Wed, 01 Jul 2020 02:53:42 -0700 (PDT) X-Gm-Message-State: AOAM531QBmlciIkvRWE3CvxcvubCt2z7sACFt/+V8NTZgo8jeNomrBLI QtccpMioVo+cah9J0Wi1WPQIEWpAiU3GYW2VrUw= X-Received: by 2002:a2e:9d87:: with SMTP id c7mr5814766ljj.168.1593597221597; Wed, 01 Jul 2020 02:53:41 -0700 (PDT) MIME-Version: 1.0 References: <1593410042-10598-1-git-send-email-Anson.Huang@nxp.com> <1593410042-10598-3-git-send-email-Anson.Huang@nxp.com> In-Reply-To: From: Arnd Bergmann Date: Wed, 1 Jul 2020 11:53:25 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V3 02/10] init.h: Fix the __setup_param() macro for module build To: Anson Huang Cc: Russell King - ARM Linux , Shawn Guo , Sascha Hauer , Sascha Hauer , Fabio Estevam , Michael Turquette , Stephen Boyd , "oleksandr.suvorov@toradex.com" , Stefan Agner , Peng Fan , Abel Vesa , Aisheng Dong , Andy Duan , Daniel Baluta , YueHaibing , Stephen Rothwell , Al Viro , Linux ARM , "linux-kernel@vger.kernel.org" , linux-clk , dl-linux-imx Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:s/nBx8LPIaFnpCo7zScRj0f1v40/+zvoPK+6/sgBGubInyRd66P U5nSMmiYJgml+S009e9bIg92fIthh9VBVVOj8Hx26GpPggyQdbUc26R3slQDHW9fT5soIEc zUUgNN29R2mxWTr+9X8e/4jyyikuUqOv28z/q+cRe7ZOwf/6wk5yYSzXutPSGwBD6uz2N/H /8OklkUTKhX1gM28Bqm8Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:58vuynDe5R0=:qkPbF9lEoyv6WIfnRemzqQ UJiAeSqilD6uqeMZi3TUb26jEPTL0UI+gyKx6raxPYM4Xvlml8bBJqNNBeNYqD5ZloJzOXmvB r6YRWFh0ABHo4K8AGQR/o6ZrJHZQ4Yqe4HJSXVomNUtap4V0BYiAQCP+MOUI/BLGjSXIRZTNX 7P7pp/qJIg9dw0aRyn/0vqnP7D26t4QGF9RnGBvLjVY/uN2jmXt2q6mXbMZ5rriUKEmzYoFyS 5q51sXr9uRGgjvZzw2UYsW18O1PENbYL4fu8CaF0u+e+CmAqQqm9FR1Msihu6/NkzbeYiS1qi WOJeIq41EJgzWP6ST5GqXxWwEVLO6npYMChdKdz70b6R4YA1c5QsWqCoiYLwpgmyanGlAIWFk IopBMq/KDM3PDoC5axBojSOv4sBMbJlhG/eiqQ49lGOH6xnV8NGaqW2F6GqgRRb+JYr78klcW uc2vH04UUpcUfWgjfFLadx2qboaTa+4qIqr+51YVm/Gw83IpKntPmFqu9APi5MdXNUXOSDa3L SwkO4tS2Wbr9OjEg9y2pd91Z4vT6hdbYvufoHQE7bN2+Pu0/hMHTctU3xlwtDfMKzrWtitw5T ie4VWxp4YVap7I5/iZl57IEdv56ppT3hO6MuRKMzcbXAhnPQ8Q3ZioJzQFyuQyDzdUtPKqwYf mTQENg04jAaJ2OogN3nvqtI0s40pcA0ZA0w3QVnvzmcuRTLXbsxGhwDg5eZzOWQRHz/gkmEyS PFqyRdEXJsaC3Im9TntmfXCwMVDbj8TeZetJAmbc6BM551chTBVff+jNYmdYLWIoGCfmNzmNm rJAV70SnfjmHWyqbAa2m9UQVOcAgl3zI4Uh7jzshmGvlfo9DzZr5KjxWSPpoUTGoEPBfmMiuK iNMkZ6xcBqNfSmV5v/Ak+VotJZDzZ1hIpbsf1+4yWrbrBctw/5a2GNRDysoY+w4SS8eWAmNLZ tt4AuD0ZYQkzqLE1NwpTMjl/JNN0q2uwdK49XDjG3Tfsx31Uu/Z0s Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 1, 2020 at 11:27 AM Anson Huang wrote: > > Subject: Re: [PATCH V3 02/10] init.h: Fix the __setup_param() macro for > > module build > > > > On Wed, Jul 1, 2020 at 7:14 AM Anson Huang > > wrote: > > > > I don't understand what your plan is here. Do you mean you will leave that > > part of the clk driver as built-in? > > I meant I will leave the #else block of __setup_param() defined as nothing as below to > make module build passed. > > #define __setup_param(str, unique_id, fn, early) /* nothing */ No, I think that is mistake. It will mean that other drivers with the same bug as the imx-clk driver will appear to build fine, but not work correctly. A build error is better than silently dropping the command line parsing in my opinion. > > This error just means you can't have a __setup_param() call in a loadable > > module, which we already knew. If you need to do something with the clocks > > early on, that has to be in built-in code and cannot be in a module. If you don't > > need that code, then you should just remove it from both the modular version > > and the built-in version. > > > > What is the purpose of that __setup_param() argument parsing in the clock > > driver? > > We need the code for proper uart clock management of earlycon, from the code, it > is trying to keep console uart clock enabled during kernel boot up. Why not move this all to a separate file then and only build it when CONFIG_CLK_IMX=y? It seems that you don't need the imx_keep_uart_clocks_param() if the clk driver is loaded as a module, but then you also don't need the imx_clk_disable_uart() and imx_register_uart_clocks() functions or the associated variables. Arnd