* Re: [PATCH v2 1/2] ASoC: fsl_mqs: Don't check clock is NULL before calling clk API
@ 2020-06-23 7:36 Markus Elfring
2020-06-23 8:32 ` Shengjiu Wang
0 siblings, 1 reply; 5+ messages in thread
From: Markus Elfring @ 2020-06-23 7:36 UTC (permalink / raw)
To: Shengjiu Wang, alsa-devel, linuxppc-dev
Cc: Timur Tabi, Xiubo Li, Takashi Iwai, kernel-janitors,
linux-kernel, Nicolin Chen, Mark Brown, Fabio Estevam
> In-Reply-To: <cover.1592888591.git.shengjiu.wang@nxp.com>
I guess that it should be sufficient to specify such a field once
for the header information.
> Because clk_prepare_enable and clk_disable_unprepare should
> check input clock parameter is NULL or not internally,
I find this change description unclear.
> then we don't need to check them before calling the function.
Please use an imperative wording for the commit message.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?idÝ0d718152e4c65b173070d48ea9dfc06894c3e5#n151
Regards,
Markus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] ASoC: fsl_mqs: Don't check clock is NULL before calling clk API
2020-06-23 7:36 [PATCH v2 1/2] ASoC: fsl_mqs: Don't check clock is NULL before calling clk API Markus Elfring
@ 2020-06-23 8:32 ` Shengjiu Wang
2020-06-23 8:55 ` Markus Elfring
0 siblings, 1 reply; 5+ messages in thread
From: Shengjiu Wang @ 2020-06-23 8:32 UTC (permalink / raw)
To: Markus Elfring
Cc: Linux-ALSA, Timur Tabi, Xiubo Li, Fabio Estevam, Shengjiu Wang,
kernel-janitors, Takashi Iwai, linux-kernel, Nicolin Chen,
Mark Brown, linuxppc-dev
On Tue, Jun 23, 2020 at 3:38 PM Markus Elfring <Markus.Elfring@web.de> wrote:
>
> > In-Reply-To: <cover.1592888591.git.shengjiu.wang@nxp.com>
>
> I guess that it should be sufficient to specify such a field once
> for the header information.
seems it's caused by my "git format-patch" command, I will update
it, hope it is better next time.
>
>
> > Because clk_prepare_enable and clk_disable_unprepare should
> > check input clock parameter is NULL or not internally,
>
> I find this change description unclear.
clk_prepare_enable and clk_disable_unprepare check the input
clock parameter in the beginning of the function, if the parameter
is NULL, clk_prepare_enable and clk_disable_unprepare will
return immediately.
So Don't need to check input clock parameters before calling clk
API.
Do you think this commit message is better?
best regards
wang shengjiu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] ASoC: fsl_mqs: Don't check clock is NULL before calling clk API
2020-06-23 8:32 ` Shengjiu Wang
@ 2020-06-23 8:55 ` Markus Elfring
2020-06-23 11:35 ` Shengjiu Wang
0 siblings, 1 reply; 5+ messages in thread
From: Markus Elfring @ 2020-06-23 8:55 UTC (permalink / raw)
To: Shengjiu Wang, alsa-devel, linuxppc-dev
Cc: Timur Tabi, Xiubo Li, Shengjiu Wang, kernel-janitors,
Takashi Iwai, linux-kernel, Nicolin Chen, Mark Brown,
Fabio Estevam
> clk_prepare_enable and clk_disable_unprepare check the input
> clock parameter in the beginning of the function,
These functions call further functions which perform null pointer checks.
> if the parameter
> is NULL, clk_prepare_enable and clk_disable_unprepare will
> return immediately.
The interpretation of these function implementations seems to be reasonable.
Would you like to achieve any improvements for the corresponding software documentation?
> So Don't need to check input clock parameters before calling clk API.
What do you find imperative in this wording?
Another wording alternative:
Thus omit extra null pointer checks before four function calls.
Regards,
Markus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] ASoC: fsl_mqs: Don't check clock is NULL before calling clk API
2020-06-23 8:55 ` Markus Elfring
@ 2020-06-23 11:35 ` Shengjiu Wang
2020-06-23 12:45 ` [v2 " Markus Elfring
0 siblings, 1 reply; 5+ messages in thread
From: Shengjiu Wang @ 2020-06-23 11:35 UTC (permalink / raw)
To: Markus Elfring
Cc: Linux-ALSA, Timur Tabi, Xiubo Li, Fabio Estevam, Shengjiu Wang,
kernel-janitors, Takashi Iwai, linux-kernel, Nicolin Chen,
Mark Brown, linuxppc-dev
On Tue, Jun 23, 2020 at 4:55 PM Markus Elfring <Markus.Elfring@web.de> wrote:
>
> > clk_prepare_enable and clk_disable_unprepare check the input
> > clock parameter in the beginning of the function,
>
> These functions call further functions which perform null pointer checks.
>
>
> > if the parameter
> > is NULL, clk_prepare_enable and clk_disable_unprepare will
> > return immediately.
>
> The interpretation of these function implementations seems to be reasonable.
> Would you like to achieve any improvements for the corresponding software documentation?
Which document do you mean?
>
>
> > So Don't need to check input clock parameters before calling clk API.
>
> What do you find imperative in this wording?
>
> Another wording alternative:
> Thus omit extra null pointer checks before four function calls.
>
> Regards,
> Markus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [v2 1/2] ASoC: fsl_mqs: Don't check clock is NULL before calling clk API
2020-06-23 11:35 ` Shengjiu Wang
@ 2020-06-23 12:45 ` Markus Elfring
0 siblings, 0 replies; 5+ messages in thread
From: Markus Elfring @ 2020-06-23 12:45 UTC (permalink / raw)
To: Shengjiu Wang, alsa-devel, linuxppc-dev
Cc: Timur Tabi, Xiubo Li, Shengjiu Wang, kernel-janitors,
Takashi Iwai, linux-kernel, Nicolin Chen, Mark Brown,
Fabio Estevam
>>> if the parameter
>>> is NULL, clk_prepare_enable and clk_disable_unprepare will
>>> return immediately.
>>
>> The interpretation of these function implementations seems to be reasonable.
>> Would you like to achieve any improvements for the corresponding software documentation?
>
> Which document do you mean?
Example:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/clk.h?id=dd0d718152e4c65b173070d48ea9dfc06894c3e5#n905
https://elixir.bootlin.com/linux/v5.7.2/source/include/linux/clk.h#L905
Regards,
Markus
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-06-23 12:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-23 7:36 [PATCH v2 1/2] ASoC: fsl_mqs: Don't check clock is NULL before calling clk API Markus Elfring
2020-06-23 8:32 ` Shengjiu Wang
2020-06-23 8:55 ` Markus Elfring
2020-06-23 11:35 ` Shengjiu Wang
2020-06-23 12:45 ` [v2 " Markus Elfring
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).