public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: <Claudiu.Beznea@microchip.com>
To: <windhl@126.com>
Cc: <mturquette@baylibre.com>, <sboyd@kernel.org>,
	<Nicolas.Ferre@microchip.com>, <alexandre.belloni@bootlin.com>,
	<linux-clk@vger.kernel.org>
Subject: Re: [PATCH v2] clk: at91: dt-compat: Hold reference returned by of_get_parent()
Date: Thu, 30 Jun 2022 14:19:45 +0000	[thread overview]
Message-ID: <11362da4-69d2-0ba0-594a-a1ce1025c572@microchip.com> (raw)
In-Reply-To: <2bd293a2.7c0d.181b4b15961.Coremail.windhl@126.com>

On 30.06.2022 15:58, Liang He wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> At 2022-06-30 18:20:36, Claudiu.Beznea@microchip.com wrote:
>> On 30.06.2022 11:59, Liang He wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> Hi,  Claudiu.Beznea,
>>>
>>> At 2022-06-30 16:39:26, Claudiu.Beznea@microchip.com wrote:
>>>> On 28.06.2022 16:22, Liang He wrote:
>>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>>> [...]
>>>>> @@ -694,8 +732,8 @@ of_at91_clk_prog_setup(struct device_node *np,
>>>>>         unsigned int num_parents;
>>>>>         const char *parent_names[PROG_SOURCE_MAX];
>>>>>         const char *name;
>>>>> -       struct device_node *progclknp;
>>>>>         struct regmap *regmap;
>>>>> +       struct device_node *progclknp, *parent_np;
>>>>
>>>> Is there a reason you chosed to move this on a new line?
>>>
>>>>
>>>
>>> In fact, I just want to keep long declaration on bottom.
>>>
>>> However, this modification maybe useless.
>>>
>>>
>>>>> [...]
>>>>>         struct clk_hw *hw;
>>>>>         const char *name;
>>>>> -       struct device_node *sysclknp;
>>>>>         const char *parent_name;
>>>>>         struct regmap *regmap;
>>>>> +       struct device_node *sysclknp, *parent_np;
>>>>
>>>> Same here.
>>>
>>>>
>>>
>>>
>>> Same reason as above.
>>>
>>>>>
>>>>>         num = of_get_child_count(np);
>>>>>         if (num > (SYSTEM_MAX_ID + 1))
>>>
>>>>> @@ -885,9 +936,10 @@ CLK_OF_DECLARE(at91sam9x5_clk_usb, "atmel,at91sam9x5-clk-usb",
>>>>>  static void __init of_at91sam9n12_clk_usb_setup(struct device_node *np)
>>>>>  {
>>>>>         struct clk_hw *hw;
>>>>> +       struct regmap *regmap;
>>>>>         const char *parent_name;
>>>>>         const char *name = np->name;
>>>>> -       struct regmap *regmap;
>>>>> +       struct device_node *parent_np;
>>>>
>>>> You moved around the declarations.
>>>
>>>>
>>>
>>>
>>> Sorry, I have been told to keep reverse christmas tree.
>>
>> I thought this rule is only for networking subsystem.
>>
> 
> OK, thanks, I will keep the rule only when I fix bugs in networking subsystem.
> 
> So  it needs to send a v3 to restore the order of the declarations?

Yes, please.

> 
> If yes, I will resend it soon.
> 
> Thanks.
> 
> Liang
> 
> 
>>>
>>>
>>> So this look like a normal christmas tree?
>>>
>>>
>>>>>>>         parent_name = of_clk_get_parent_name(np, 0);
>>> [...]
>>>>> +       struct regmap *regmap;
>>>>>         const char *parent_name;
>>>>>         const char *name = np->name;
>>>>> +       struct device_node *parent_np;
>>>>>         u32 divisors[4] = {0, 0, 0, 0};
>>>>> -       struct regmap *regmap;
>>>>
>>>> Same here.
>>>
>>>>
>>>
>>>
>>> Same reason as above.
>>>
>>>>>
>>>>>         parent_name = of_clk_get_parent_name(np, 0);
>>>>>         if (!parent_name)
>>>>> @@ -926,7 +981,9 @@ static void __init of_at91rm9200_clk_usb_setup(struct device_node *np)
>>>
>>>>>
>>>
>>>
>>> If these declaration chages are not needed, I can resend a new patch keeping the original order of declarations.
>>>
>>>
>>> Thanks.
>>>
>>>
>>> Liang
>>


  reply	other threads:[~2022-06-30 14:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28 13:22 [PATCH v2] clk: at91: dt-compat: Hold reference returned by of_get_parent() Liang He
2022-06-30  8:39 ` Claudiu.Beznea
2022-06-30  8:59   ` Liang He
2022-06-30 10:20     ` Claudiu.Beznea
2022-06-30 12:58       ` Liang He
2022-06-30 14:19         ` Claudiu.Beznea [this message]
2022-06-30 14:27           ` Liang He

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=11362da4-69d2-0ba0-594a-a1ce1025c572@microchip.com \
    --to=claudiu.beznea@microchip.com \
    --cc=Nicolas.Ferre@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=windhl@126.com \
    /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