linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org, zhuyinbo <zhuyinbo@loongson.cn>
Cc: Jianmin Lv <lvjianmin@loongson.cn>,
	wanghongliang@loongson.cn, Liu Peibao <liupeibao@loongson.cn>,
	loongson-kernel@lists.loongnix.cn, zhuyinbo@loongson.cn
Subject: Re: [PATCH v15 2/2] clk: clk-loongson2: add clock controller driver support
Date: Wed, 22 Mar 2023 08:16:13 -0700	[thread overview]
Message-ID: <55bea6244a6d41e3d7d38d6cb6d379e9.sboyd@kernel.org> (raw)
In-Reply-To: <79ceb9c5-2657-ca9b-e017-5ec14acfcda1@loongson.cn>

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.

  reply	other threads:[~2023-03-22 15:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-21 13:07 [PATCH v15 1/2] dt-bindings: clock: add loongson-2 boot clock index Yinbo Zhu
2023-03-21 13:07 ` [PATCH v15 2/2] clk: clk-loongson2: add clock controller driver support Yinbo Zhu
2023-03-21 23:42   ` Stephen Boyd
2023-03-22  2:07     ` zhuyinbo
2023-03-22 15:16       ` Stephen Boyd [this message]
2023-03-23  1:24         ` zhuyinbo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55bea6244a6d41e3d7d38d6cb6d379e9.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liupeibao@loongson.cn \
    --cc=loongson-kernel@lists.loongnix.cn \
    --cc=lvjianmin@loongson.cn \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=wanghongliang@loongson.cn \
    --cc=zhuyinbo@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).