mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: davidsen@tmr.com (bill davidsen)
To: jdthood@mail.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.4.10-ac11 parport_pc.c bugfix
Date: Thu, 11 Oct 2001 18:41:32 -0400	[thread overview]
Message-ID: <200110112241.f9BMfWM27107@deathstar.prodigy.com> (raw)
In-Reply-To: <1002808349.10317.7.camel@thanatos>

In article <1002808349.10317.7.camel@thanatos> you write:
| I guess the question is: Which way is more portable?  Is
| "(unsigned long)-1" liable to turn out as something other than
| ~0U?
| 
| If your way of expressing it is more portable then we should
| make the change ... BOTH in pnp_bios.c and in parport_pc.c .
| 
| Opinions?

Does this address any bug present without the cast? If the expression
left of == is unsigned long, ~0U will work, as will (unsigned)~0. But
more to the point, do you mean "minus one" or "all ones" here? While
Linux does not currently run on any machine which is not 2's complement,
I think if you want all ones you should use (unsigned long)~0 as most
portable.

Yes, I have programmed 1's complement machines :-(

-- 
bill davidsen <davidsen@tmr.com>
 "If I were a diplomat, in the best case I'd go hungry.  In the worst
  case, people would die."
		-- Robert Lipe

  parent reply	other threads:[~2001-10-11 22:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-11  2:20 Thomas Hood
2001-10-11 13:40 ` J . A . Magallon
2001-10-11 13:52 ` Thomas Hood
2001-10-11 14:52   ` Bob McElrath
2001-10-11 22:41   ` bill davidsen [this message]
2001-10-12  1:45     ` Thomas Hood
2001-10-11 18:35 J.D. Hood

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=200110112241.f9BMfWM27107@deathstar.prodigy.com \
    --to=davidsen@tmr.com \
    --cc=jdthood@mail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®