Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6919985rwl; Wed, 22 Mar 2023 18:28:49 -0700 (PDT) X-Google-Smtp-Source: AK7set9Q4QxAeVyER4sc7ZzFh3qz+qqEKhUalEk5Eu29nOCv70sl9UzOd8A/RdiMNL+2gzSdqB7B X-Received: by 2002:a17:906:39da:b0:92c:a80e:225f with SMTP id i26-20020a17090639da00b0092ca80e225fmr9183680eje.52.1679534929763; Wed, 22 Mar 2023 18:28:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679534929; cv=none; d=google.com; s=arc-20160816; b=d2rafXEEqoKI/B3sZ3OEoIwebYdbKVropxYNy4OH4OIgwmVgMy+vzlvO+znnWbAbIo 2wG6G58pVE7TluWcCZXqk0T8irP92HuM4IlKyKRqo8zfYy5uMwsfvAc5UHRE58sixdmi Gpc2GcSSldQhhVWIP9uSXI5qzE6VpUjMt/a/9IQiSE2gw6YNKqfcbyUxz9uASonvsYT6 NGsYzUGV+TwumAndmvWoHIiZcgl92hqnR5hjobHQRbNxVybHkwlClPsCEjQ5bBp2DrV/ 6Qv3Af64V7p0MsCWNPwEjzRrcP7wn7cidLdXK6eBbkLUxGEH7IgoX4JIYcfDmIymbpe6 wAyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=yJGUZbljaxKSG8OZMdrqt6Vfagd8CVqdxXdBpDySSHg=; b=cyXpToiept/Q0k7/pFbYyfjJ+jzxhlM/3Nz/PnjDY2nZA3RCiaILAUqsZGMEveCoDy cjhlyV9vQb9Bj8289X76RG/S7nb9235jnsf5FwTmAXU9Q/DtKSGHaMYgGBdYyMmiA6kk lCh1M9G5iaC95cWazAp78c3XxFGsbIsmd0Xm4Z251SodLpf1cGu1wQ3s4cTvRuomTGkD G13q6Z20h27YDDPXz4dqV4rJc6A1DMIEx3hjiOSJ+e8NiSufmb/RTQAsRoIsHizPjiv0 yAwL9Xhtx74+1NUupiwiMY6V0JnTLFtTgdv1T6kKi4XkXBfRsJlGBA6iBV89iYNI+nh/ DdJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he31-20020a1709073d9f00b0093a6b7c4e9csi6634663ejc.914.2023.03.22.18.28.25; Wed, 22 Mar 2023 18:28:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229877AbjCWBYh (ORCPT + 99 others); Wed, 22 Mar 2023 21:24:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbjCWBYh (ORCPT ); Wed, 22 Mar 2023 21:24:37 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 041662F06E; Wed, 22 Mar 2023 18:24:34 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.35]) by gateway (Coremail) with SMTP id _____8BxPNpRqhtk5CcQAA--.12948S3; Thu, 23 Mar 2023 09:24:33 +0800 (CST) Received: from [10.20.42.35] (unknown [10.20.42.35]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxAeVOqhtkoQcKAA--.39350S3; Thu, 23 Mar 2023 09:24:33 +0800 (CST) Subject: Re: [PATCH v15 2/2] clk: clk-loongson2: add clock controller driver support To: Stephen Boyd , Krzysztof Kozlowski , Michael Turquette , Rob Herring , devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jianmin Lv , wanghongliang@loongson.cn, Liu Peibao , loongson-kernel@lists.loongnix.cn, zhuyinbo@loongson.cn References: <20230321130710.20236-1-zhuyinbo@loongson.cn> <20230321130710.20236-2-zhuyinbo@loongson.cn> <26c4712672de6c4f70f88c6846bc892f.sboyd@kernel.org> <79ceb9c5-2657-ca9b-e017-5ec14acfcda1@loongson.cn> <55bea6244a6d41e3d7d38d6cb6d379e9.sboyd@kernel.org> From: zhuyinbo Message-ID: Date: Thu, 23 Mar 2023 09:24:30 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <55bea6244a6d41e3d7d38d6cb6d379e9.sboyd@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID: AQAAf8DxAeVOqhtkoQcKAA--.39350S3 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoWrKF4kKw4rZr15WF43CFy8Krg_yoW8JrWrpa 43AFW5CF4kJFnFvr93tw4rWF1SvrWftFy3Gr12gryUu398J347WF18tFWYk3yxArs5AF10 vayqqr4FkFn8ArJanT9S1TB71UUUUUJqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bTkFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUXVWUAwA2ocxC64 kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r4j6ryUM28E F7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Cr0_Gr1UM2 8EF7xvwVC2z280aVCY1x0267AKxVW8JVW8Jr1ln4kS14v26r1Y6r17M2AIxVAIcxkEcVAq 07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I8CrVACY4xI64kE6c02F40Ex7 xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Y z7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07AlzVAYIcxG8wCF04k20xvY0x0EwI xGrwCF04k20xvE74AGY7Cv6cx26rWl4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxYO2xFxVAF wI0_Jrv_JF1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zV AF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4l IxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCw CI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVF xhVjvjDU0xZFpf9x07j1jgxUUUUU= X-Spam-Status: No, score=3.6 required=5.0 tests=NICE_REPLY_A,RCVD_IN_SBL_CSS, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2023/3/22 下午11:16, Stephen Boyd 写道: > Quoting zhuyinbo (2023-03-21 19:07:26) >> 在 2023/3/22 上午7:42, Stephen Boyd 写道: >>> Quoting Yinbo Zhu (2023-03-21 06:07:10) >>>> diff --git a/drivers/clk/clk-loongson2.c b/drivers/clk/clk-loongson2.c >>>> new file mode 100644 >>>> index 000000000000..090810655511 >>>> --- /dev/null >>>> +++ b/drivers/clk/clk-loongson2.c >>>> @@ -0,0 +1,344 @@ > [....] >>>> + >>>> +static void __iomem *loongson2_pll_base; >>> Why is this a global? >> Normally, this should be an element in the structure, but since there is >> only one >> >> element, It is directly defined as a global variable for use by other >> function. >> > Ok. Globals are frowned upon but it's just a single pointers so I guess > it's Ok. > >>>> + return PTR_ERR(loongson2_pll_base); >>>> + >>>> + loongson2_clocks_init(dev); >>> Please inline this function here. >> The loongson2_clocks_init had inline in this version, or do you mean something else ? Need to inline the probe? > I mean get rid of the function loongson2_clocks_init() and move the code > in that function into this probe function. With this patch the probe is > split to two functions when it should be one function. okay, I got it. Thanks.