mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Matt Mackall <mpm@selenic.com>
Cc: john stultz <johnstul@us.ibm.com>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH] new timeofday core subsystem (v. A3)
Date: Sun, 13 Mar 2005 02:46:14 +0100	[thread overview]
Message-ID: <je3bv0qpw9.fsf@sykes.suse.de> (raw)
In-Reply-To: <20050313004902.GD3163@waste.org> (Matt Mackall's message of "Sat, 12 Mar 2005 16:49:02 -0800")

Matt Mackall <mpm@selenic.com> writes:

> On Fri, Mar 11, 2005 at 05:24:15PM -0800, john stultz wrote:
>> +struct timesource_t timesource_jiffies = {
>> +	.name = "jiffies",
>> +	.priority = 0, /* lowest priority*/
>> +	.type = TIMESOURCE_FUNCTION,
>> +	.read_fnct = jiffies_read,
>> +	.mask = (cycle_t)~0,
>
> Not sure this is right. The type of 0 is 'int' and the ~ will happen
> before the cast to a potentially longer type.

If you want an all-one value for any unsigned type then (type)-1 is the
most reliable way.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2005-03-13  1:46 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-12  1:24 john stultz
2005-03-12  1:25 ` [RFC][PATCH] new timeofday arch specific hooks " john stultz
2005-03-12  1:26   ` [RFC][PATCH] new timeofday arch specific timesource drivers " john stultz
2005-03-12  5:52   ` [RFC][PATCH] new timeofday arch specific hooks " Benjamin Herrenschmidt
2005-03-14 18:09     ` john stultz
2005-03-15 22:59   ` Pavel Machek
2005-03-15 23:42     ` john stultz
2005-03-15 23:44       ` Pavel Machek
2005-03-16  1:44         ` john stultz
2005-03-16 10:53           ` Pavel Machek
2005-03-13  0:49 ` [RFC][PATCH] new timeofday core subsystem " Matt Mackall
2005-03-13  1:46   ` Andreas Schwab [this message]
2005-03-14 18:42   ` john stultz
2005-03-14 19:29     ` Matt Mackall
2005-03-14 19:43       ` john stultz
2005-03-14 19:51         ` Matt Mackall
2005-03-14 20:04           ` john stultz
2005-03-14 20:27             ` Matt Mackall
2005-03-15  0:01               ` Christoph Lameter
2005-03-15  2:16               ` Albert Cahalan
2005-03-15  3:22                 ` Christoph Lameter
2005-03-15 15:23                   ` Albert Cahalan
2005-03-15 15:52                     ` Chris Friesen
2005-03-17 16:55                     ` Russell King
2005-03-17 19:44                       ` Albert Cahalan
2005-03-17 20:28                         ` Russell King
2005-03-15  0:28         ` Christoph Lameter
2005-03-15  0:43           ` john stultz
2005-03-14 23:40     ` George Anzinger
2005-03-15  1:11       ` [topic change] jiffies as a time value john stultz
2005-03-15 23:01         ` George Anzinger
2005-03-16  3:57           ` john stultz
2005-03-15  0:07 ` [RFC][PATCH] new timeofday core subsystem (v. A3) Christoph Lameter
2005-03-15  5:37 ` Christoph Lameter
2005-03-15 18:25   ` john stultz
2005-03-15 22:08     ` George Anzinger
2005-03-17  8:15     ` Ulrich Windl
2005-03-15  6:09 ` Christoph Lameter

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=je3bv0qpw9.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.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

all inboxes | Powered by JetHome®