public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: William Lee Irwin III <wli@holomorphy.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, suparna@in.ibm.com,
	linux-aio@kvack.org
Subject: Re: [1/2] use const in time.h unit conversion functions
Date: Wed, 2 Jun 2004 13:43:35 -0500	[thread overview]
Message-ID: <20040602184335.GC5414@waste.org> (raw)
In-Reply-To: <20040602012429.GV2093@holomorphy.com>

On Tue, Jun 01, 2004 at 06:24:29PM -0700, William Lee Irwin III wrote:
> On Tue, Jun 01, 2004 at 02:15:39AM -0700, Andrew Morton wrote:
> > - NFS server udpates
> > - md updates
> > - big x86 dmi_scan.c cleanup
> > - merged perfctr.  No documentation though :(
> > - cris architecture update
> 
> The time conversion functions may have const args, which is in fact
> useful for when they are passed const variables as arguments so as
> to avoid discarding qualifiers from pointer types warnings. This is
> a preparatory cleanup for a minor aio bugfix.
> 
> Index: timer-2.6.7-rc2/include/linux/time.h
> ===================================================================
> +++ timer-2.6.7-rc2/include/linux/time.h	2004-06-01 16:02:01.000000000 -0700
> @@ -184,7 +184,7 @@
>   * Avoid unnecessary multiplications/divisions in the
>   * two most common HZ cases:
>   */
> -static inline unsigned int jiffies_to_msecs(unsigned long j)
> +static inline unsigned int jiffies_to_msecs(const unsigned long j)

Does this actually do something meaningful? This stuff gets passed by value.

This is the second const-correctness patch I've seen in a couple days,
and I'd like to point out that while it's a noble cause, retrofitting
const decls onto interfaces is notorious for causing ripple effects in
APIs.

-- 
Mathematics is the supreme nostalgia of our time.

  parent reply	other threads:[~2004-06-02 18:45 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-01  9:15 2.6.7-rc2-mm1 Andrew Morton
2004-06-01  9:59 ` 2.6.7-rc2-mm1 Alexander Gran
2004-06-01 11:28   ` 2.6.7-rc2-mm1 AKIYAMA Nobuyuki
2004-06-01 11:39     ` 2.6.7-rc2-mm1 Alexander Gran
2004-06-01 16:07     ` 2.6.7-rc2-mm1 Ari Pollak
2004-06-01 16:22     ` 2.6.7-rc2-mm1 Ari Pollak
2004-06-01 10:00 ` 2.6.7-rc2-mm1 Gabriel Ebner
2004-06-01 11:05   ` 2.6.7-rc2-mm1 Andrey Panin
2004-06-01 13:58     ` 2.6.7-rc2-mm1 Gabriel Ebner
2004-06-01 14:05     ` 2.6.7-rc2-mm1 Jan Killius
2004-06-01 10:29 ` 2.6.7-rc2-mm1 Christoph Hellwig
2004-06-01 13:43   ` 2.6.7-rc2-mm1 Mikael Pettersson
2004-06-01 13:57     ` 2.6.7-rc2-mm1 Christoph Hellwig
2004-06-01 14:14       ` 2.6.7-rc2-mm1 Mikael Pettersson
2004-06-01 10:48 ` 2.6.7-rc2-mm1 Dominik Karall
2004-06-01 11:24   ` 2.6.7-rc2-mm1 William Lee Irwin III
2004-06-01 11:37     ` 2.6.7-rc2-mm1 William Lee Irwin III
2004-06-02 10:18     ` 2.6.7-rc2-mm1 Paul Jackson
2004-06-02 10:23       ` 2.6.7-rc2-mm1 Andrew Morton
2004-06-05 11:07       ` 2.6.7-rc2-mm1 Matthias Urlichs
2004-06-06  8:02         ` 2.6.7-rc2-mm1 Paul Jackson
2004-06-01 11:26 ` 2.6.7-rc2-mm1 William Lee Irwin III
2004-06-01 11:36   ` 2.6.7-rc2-mm1 Keith Owens
2004-06-01 11:26 ` 2.6.7-rc2-mm1 Andy Lutomirski
2004-06-01 11:29 ` 2.6.7-rc2-mm1 William Lee Irwin III
2004-06-01 16:24   ` 2.6.7-rc2-mm1 Mikael Pettersson
2004-06-01 11:51 ` 2.6.7-rc2-mm1 Alexander Gran
2004-06-01 12:19   ` 2.6.7-rc2-mm1 Eric BEGOT
2004-06-01 16:19     ` 2.6.7-rc2-mm1 Adrian Bunk
2004-06-01 21:18       ` 2.6.7-rc2-mm1 Chris Wedgwood
2004-06-01 21:36   ` 2.6.7-rc2-mm1 Andrew Morton
2004-06-01 21:36     ` 2.6.7-rc2-mm1 David S. Miller
2004-06-01 22:21       ` 2.6.7-rc2-mm1 Alexander Gran
2004-06-01 21:45   ` 2.6.7-rc2-mm1 Alex Romosan
2004-06-01 14:55 ` 2.6.7-rc2-mm1: gcc 2.95 uaccess.h warnings Adrian Bunk
2004-06-01 15:03   ` Linus Torvalds
2004-06-01 16:10     ` Adrian Bunk
2004-06-01 16:07 ` 2.6.7-rc2-mm1 Norberto Bensa
2004-06-01 16:07 ` 2.6.7-rc2-mm1: e1000_ethtool.c compile error Adrian Bunk
2004-06-01 19:09 ` 2.6.7-rc2-mm1 Dominik Karall
2004-06-01 19:47   ` 2.6.7-rc2-mm1 Luiz Fernando N. Capitulino
2004-06-01 21:06     ` 2.6.7-rc2-mm1 Dominik Karall
2004-06-01 19:35 ` 2.6.7-rc2-mm1: compile error in kernel/exit.c Peter Lundkvist
2004-06-01 21:24   ` Mikael Pettersson
2004-06-01 23:12 ` 2.6.7-rc2-mm1 (compile stats) John Cherry
2004-06-02  0:39 ` [patch] 2.6.7-rc2-mm1: let SERIAL_8250_ACPI depend on ACPI_PCI Adrian Bunk
2004-06-02 11:27   ` [ACPI] " Matthew Wilcox
2004-06-02 16:51   ` Bjorn Helgaas
2004-06-02  1:24 ` [1/2] use const in time.h unit conversion functions William Lee Irwin III
2004-06-02  1:26   ` [2/2] fix io_getevents() timer expiry setting William Lee Irwin III
2004-06-02 18:43   ` Matt Mackall [this message]
2004-06-02 18:52     ` [1/2] use const in time.h unit conversion functions William Lee Irwin III
2004-06-03  8:17       ` Denis Vlasenko
2004-06-02  9:21 ` 2.6.7-rc2-mm1 - bk-netdev.patch e1000_ethtool.c doesn't build Paul Jackson
2004-06-02  9:41   ` Paul Jackson
2004-06-02 13:26 ` 2.6.7-rc2-mm1 William Lee Irwin III
2004-06-03 23:38   ` 2.6.7-rc2-mm1 Greg KH
2004-06-04  0:07     ` 2.6.7-rc2-mm1 William Lee Irwin III
2004-06-04  5:18       ` 2.6.7-rc2-mm1 Vojtech Pavlik
2004-06-03  0:51 ` 2.6.7-rc2-mm1 Joshua Kwan
2004-06-03 13:24   ` 2.6.7-rc2-mm1 Mikael Pettersson

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=20040602184335.GC5414@waste.org \
    --to=mpm@selenic.com \
    --cc=akpm@osdl.org \
    --cc=linux-aio@kvack.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suparna@in.ibm.com \
    --cc=wli@holomorphy.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