All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: David Weinehall <tao@acc.umu.se>
Cc: Pavel Machek <pavel@ucw.cz>,
	kernel list <linux-kernel@vger.kernel.org>,
	Rusty trivial patch monkey Russell  <trivial@rustcorp.com.au>
Subject: Re: save_flags() should take unsigned long
Date: Tue, 26 Mar 2002 16:54:35 +0000	[thread overview]
Message-ID: <20020326165435.D14744@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20020304184653.GA8646@elf.ucw.cz> <20020326142955.E16636@khan.acc.umu.se>

On Tue, Mar 26, 2002 at 02:29:55PM +0100, David Weinehall wrote:
> The correct way to fix this would be:
> 
> <in suitable header-file; suggestions welcome>
> typedef flags_t unsigned long;

You mean typedef unsigned long flags_t;

However, people will still write:

{
	int flags;

	save_flags(flags);

because 'int' is faster to type than 'flags_t'.  About the only way
you're going to stop it dead is to do:

   typedef struct { unsigned long val; } flags_t;

and then save_flags(x)/restore_flags(x) use (x).val

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


      parent reply	other threads:[~2002-03-26 16:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-04 18:46 save_flags() should take unsigned long Pavel Machek
2002-03-26 13:29 ` David Weinehall
2002-03-26 13:46   ` Pavel Machek
2002-03-26 13:47   ` Richard B. Johnson
2002-03-26 16:54   ` Russell King [this message]

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=20020326165435.D14744@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=tao@acc.umu.se \
    --cc=trivial@rustcorp.com.au \
    /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.