linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Greg KH <greg@kroah.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	lkml <linux-kernel@vger.kernel.org>, Dave Jones <davej@suse.de>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	george anzinger <george@mvista.com>
Subject: Re: [PATCH] linux-2.5.40_timer-changes_A3 (3/3 - integration)
Date: 03 Oct 2002 00:13:54 -0700	[thread overview]
Message-ID: <1033629234.13095.81.camel@cog> (raw)
In-Reply-To: <20021003065900.GB18481@kroah.com>

On Wed, 2002-10-02 at 23:59, Greg KH wrote:
> > +/* fwd declarations */
> 
> These don't have to be forward declarations, do they?
> And can they be static?

Ummm. I could just be wrong, but since I'm setting structure elements to
equal the functions before they are declared, I need the fwds (unless,
of course I put the "struct timer_opts timer_pit" section below all the
functions, which is doable).  Also, since external functions are going
to be calling these functions via the structure's function pointers, I
believe they can't be static. Although, maybe they can, as long as the
timer_pit value isn't static. I'm not that much of a C guru, so I'm
really sure.

> 
> > +int init_pit(void);
> > +void mark_offset_pit(void);
> > +unsigned long get_offset_pit(void);
> > +
> > +/* tsc timer_opts struct */
> > +struct timer_opts timer_pit = {
> > +	init: init_pit, 
> > +	mark_offset: mark_offset_pit, 
> > +	get_offset: get_offset_pit
> > +};
> > +
> > +
> > +extern spinlock_t i8259A_lock;
> > +extern spinlock_t i8253_lock;
> > +#include "do_timer.h"
> 
> Shouldn't these 3 lines be above the "/* fwd declarations */" line?

They could be, but I'm not sure about the necessity. Is this a coding
style sorta' thing, or a C properness sort of thing? Either way is fine,
I just don't follow the logic. 


> Same minor comments for timer_tsc.c

Thanks for the feedback, I'll probably go ahead and apply your
suggestions, although, I'm still quite ignorant as to the reasons for
doing so. If you could, please fill me in.

thanks
-john



  reply	other threads:[~2002-10-03  7:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-03  6:09 [PATCH] linux-2.5.40_timer-changes_A3 (1/3 - infrastructure) john stultz
2002-10-03  6:11 ` [PATCH] linux-2.5.40_timer-changes_A3 (2/3 - bulk move) john stultz
2002-10-03  6:12   ` [PATCH] linux-2.5.40_timer-changes_A3 (3/3 - integration) john stultz
2002-10-03  6:59     ` Greg KH
2002-10-03  7:13       ` john stultz [this message]
2002-10-03  7:28         ` Greg KH
2002-10-03  7:33           ` john stultz
2002-10-03  6:13 ` [RFC][PATCH] linux-2.5.40_cyclone-timer_B2 john stultz
2002-10-03 16:28 ` [PATCH] linux-2.5.40_timer-changes_A3 (1/3 - infrastructure) Patrick Mochel
2002-10-03 17:48   ` john stultz

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=1033629234.13095.81.camel@cog \
    --to=johnstul@us.ibm.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=davej@suse.de \
    --cc=george@mvista.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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;
as well as URLs for NNTP newsgroup(s).