From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] rtc01: add space to beginning of comments
Date: Fri, 10 Sep 2021 14:46:39 +0200 [thread overview]
Message-ID: <345237df-e2f6-fb46-213b-656e11622eb0@canonical.com> (raw)
In-Reply-To: <YTsh5wcAbNDjJQpi@yuki>
On 10/09/2021 11:14, Cyril Hrubis wrote:
> Hi!
>> Improve readability of comments - no functional change.
>
> Actually some of the comments are really commenting the obvious so it
> would be better just to remove most.
>
> For instance this:
>
> /* Read and alarm tests */
> read_alarm_test();
>
> How does the comment here add any value?
>
> And I would say that it's mostly the same for the ioclt() calls as well,
> the constants do have reasonable names so I guess that in cases like
> this:
>
> /* Read current alarm time */
> ret = ioctl(rtc_fd, RTC_ALM_READ, &rtc_tm);
>
> it's kind of obvious that we do read the alarm even without the comment.
Good point but also I am not sure if removing these comments is worth
patch on its own (without patch 2/2).
Best regards,
Krzysztof
WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] rtc01: add space to beginning of comments
Date: Fri, 10 Sep 2021 14:46:39 +0200 [thread overview]
Message-ID: <345237df-e2f6-fb46-213b-656e11622eb0@canonical.com> (raw)
Message-ID: <20210910124639.YswNHJId8IEVoBO9PIVvxEzo8GXU9_qhtbfj_-DKN6E@z> (raw)
In-Reply-To: <YTsh5wcAbNDjJQpi@yuki>
On 10/09/2021 11:14, Cyril Hrubis wrote:
> Hi!
>> Improve readability of comments - no functional change.
>
> Actually some of the comments are really commenting the obvious so it
> would be better just to remove most.
>
> For instance this:
>
> /* Read and alarm tests */
> read_alarm_test();
>
> How does the comment here add any value?
>
> And I would say that it's mostly the same for the ioclt() calls as well,
> the constants do have reasonable names so I guess that in cases like
> this:
>
> /* Read current alarm time */
> ret = ioctl(rtc_fd, RTC_ALM_READ, &rtc_tm);
>
> it's kind of obvious that we do read the alarm even without the comment.
Good point but also I am not sure if removing these comments is worth
patch on its own (without patch 2/2).
Best regards,
Krzysztof
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2021-09-10 12:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-09 16:33 [LTP] [PATCH 1/2] rtc01: add space to beginning of comments Krzysztof Kozlowski
2021-09-09 16:33 ` Krzysztof Kozlowski
2021-09-09 16:33 ` [LTP] [PATCH 2/2] rtc01: add workaround for broken CMOS RTC on Microsoft Hyper-V cloud Krzysztof Kozlowski
2021-09-09 16:33 ` Krzysztof Kozlowski
2021-09-10 8:34 ` Cyril Hrubis
2021-09-10 8:34 ` Cyril Hrubis
2021-09-10 8:35 ` Krzysztof Kozlowski
2021-09-10 8:35 ` Krzysztof Kozlowski
2021-09-10 11:03 ` Thadeu Lima de Souza Cascardo
2021-09-10 11:03 ` Thadeu Lima de Souza Cascardo
2021-09-10 9:14 ` [LTP] [PATCH 1/2] rtc01: add space to beginning of comments Cyril Hrubis
2021-09-10 9:14 ` Cyril Hrubis
2021-09-10 12:46 ` Krzysztof Kozlowski [this message]
2021-09-10 12:46 ` Krzysztof Kozlowski
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=345237df-e2f6-fb46-213b-656e11622eb0@canonical.com \
--to=krzysztof.kozlowski@canonical.com \
--cc=ltp@lists.linux.it \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.