mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Pekka Enberg <penberg@gmail.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Tim Schmielau <tim@physik3.uni-rostock.de>,
	George Anzinger <george@mvista.com>,
	albert@users.sourceforge.net,
	Ulrich Windl <ulrich.windl@rz.uni-regensburg.de>,
	Christoph Lameter <clameter@sgi.com>,
	Dominik Brodowski <linux@dominikbrodowski.de>,
	David Mosberger <davidm@hpl.hp.com>, Andi Kleen <ak@suse.de>,
	paulus@samba.org, schwidefsky@de.ibm.com,
	keith maanthey <kmannth@us.ibm.com>,
	Chris McDermott <lcm@us.ibm.com>, Max Asbock <masbock@us.ibm.com>,
	mahuja@us.ibm.com, Nishanth Aravamudan <nacc@us.ibm.com>,
	Darren Hart <darren@dvhart.com>,
	"Darrick J. Wong" <djwong@us.ibm.com>,
	Anton Blanchard <anton@samba.org>,
	donf@us.ibm.com, mpm@selenic.com, benh@kernel.crashing.org,
	kernel-stuff@comcast.net, frank@tuxrocks.com,
	Pekka Enberg <penberg@cs.helsinki.fi>
Subject: Re: [PATCH 1/4] new timeofday core subsystem (v. B2)
Date: Mon, 13 Jun 2005 17:53:00 -0700	[thread overview]
Message-ID: <1118710380.27071.8.camel@cog.beaverton.ibm.com> (raw)
In-Reply-To: <84144f020506090615f6d67fc@mail.gmail.com>

On Thu, 2005-06-09 at 16:15 +0300, Pekka Enberg wrote:
> Hi John,
> 
> Some coding style comments below.

[snip]
> Please drop this redundant comment.
> 
> > +	interval_sum += interval;
> > +
> > +	write_seqlock_irqsave(&ntp_lock, flags);
> > +
> > +	/* decrement singleshot offset interval */
> 
> Ditto.
> 
> > +	ss_offset_len -= interval;
> > +	if(ss_offset_len < 0) /* make sure it doesn't go negative */
> 
> Ditto.
> 
> > +		ss_offset_len = 0;
> > +
> > +	/* Do second overflow code */
> 
> Drop redundant comment.
> 
> > +		ntp_maxerror += shiftR(ntp_tolerance, SHIFT_USEC);
> > +		if (ntp_maxerror > NTP_PHASE_LIMIT) {
> > +			ntp_maxerror = NTP_PHASE_LIMIT;
> > +			ntp_status |= STA_UNSYNC;
> > +		}
> > +
> > +		/* Calculate offset_adj for the next second */
> 
> Ditto.
> 
> > +		tmp = ntp_offset;
> 
> tmp could use a more descriptive name.
> 
> > +		if (!(ntp_status & STA_FLL))
> > +		    tmp = shiftR(tmp, SHIFT_KG + ntp_constant);
> > +
> > +		/* bound the adjustment to MAXPHASE/MINSEC */
> 
> Redundant comment.


Thanks for the uh, redundant redundant-comment comments ;)

Much is from the transition from psudo-code to actual code, so I
appreciate you pointing it out. There are a few spots where I feel there
is still value in the comments, so I've left them, but overall I think
you'll see an improvement.

thanks again for the feedback!
-john




  reply	other threads:[~2005-06-14  0:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-09  3:11 john stultz
2005-06-09  3:13 ` [PATCH 2/4] new timeofday i386 arch specific changes " john stultz
2005-06-09  3:14   ` [PATCH 3/4] new timeofday x86-64 " john stultz
2005-06-09  3:15     ` [PATCH 4/4] new timeofday i386/x86-64 timesources " john stultz
2005-06-09 13:15 ` [PATCH 1/4] new timeofday core subsystem " Pekka Enberg
2005-06-14  0:53   ` john stultz [this message]
2005-06-14  2:47 ` Frank Sorenson
2005-06-14  2:01   ` john stultz
2005-06-14  3:46 ` [PATCH 0/4] new timeofday-based soft-timer subsystem Nishanth Aravamudan
2005-06-14  3:48   ` [PATCH 1/4] convert soft-timer subsystem to timerintervals Nishanth Aravamudan
2005-06-14  3:49   ` [PATCH 2/4] Nishanth Aravamudan
2005-06-14  3:49   ` [PATCH 2/4] convert sys_nanosleep() to use new soft-timer subsystem Nishanth Aravamudan
2005-06-14 17:00   ` [PATCH 0/4] new timeofday-based " Nishanth Aravamudan
2005-06-14 18:11   ` Nishanth Aravamudan
2005-06-15  6:30     ` Ulrich Windl
2005-06-15 15:01       ` Nishanth Aravamudan
2005-06-14 22:13   ` Nishanth Aravamudan

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=1118710380.27071.8.camel@cog.beaverton.ibm.com \
    --to=johnstul@us.ibm.com \
    --cc=ak@suse.de \
    --cc=albert@users.sourceforge.net \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=clameter@sgi.com \
    --cc=darren@dvhart.com \
    --cc=davidm@hpl.hp.com \
    --cc=djwong@us.ibm.com \
    --cc=donf@us.ibm.com \
    --cc=frank@tuxrocks.com \
    --cc=george@mvista.com \
    --cc=kernel-stuff@comcast.net \
    --cc=kmannth@us.ibm.com \
    --cc=lcm@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.de \
    --cc=mahuja@us.ibm.com \
    --cc=masbock@us.ibm.com \
    --cc=mpm@selenic.com \
    --cc=nacc@us.ibm.com \
    --cc=paulus@samba.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=penberg@gmail.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=tim@physik3.uni-rostock.de \
    --cc=ulrich.windl@rz.uni-regensburg.de \
    /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

all inboxes | Powered by JetHome®