All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] rtc01: add space to beginning of comments
Date: Fri, 10 Sep 2021 11:14:15 +0200	[thread overview]
Message-ID: <YTsh5wcAbNDjJQpi@yuki> (raw)
In-Reply-To: <20210909163326.42598-1-krzysztof.kozlowski@canonical.com>

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.

-- 
Cyril Hrubis
chrubis@suse.cz

WARNING: multiple messages have this Message-ID (diff)
From: Cyril Hrubis <chrubis@suse.cz>
To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] rtc01: add space to beginning of comments
Date: Fri, 10 Sep 2021 11:14:15 +0200	[thread overview]
Message-ID: <YTsh5wcAbNDjJQpi@yuki> (raw)
Message-ID: <20210910091415._zt2iA5ymDgzxBCmnmWkkUjtalqNiSbp_AOu2IeJS1g@z> (raw)
In-Reply-To: <20210909163326.42598-1-krzysztof.kozlowski@canonical.com>

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.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2021-09-10  9:14 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 ` Cyril Hrubis [this message]
2021-09-10  9:14   ` [LTP] [PATCH 1/2] rtc01: add space to beginning of comments Cyril Hrubis
2021-09-10 12:46   ` Krzysztof Kozlowski
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=YTsh5wcAbNDjJQpi@yuki \
    --to=chrubis@suse.cz \
    --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.