public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@fs.tum.de>
To: ipslinux@adaptec.com
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	trivial@rustcorp.com.au
Subject: [2.5 patch] postfix two constants in ips.c with ULL
Date: Wed, 25 Jun 2003 03:21:42 +0200	[thread overview]
Message-ID: <20030625012142.GF3710@fs.tum.de> (raw)

The patch below postfixes two constants in ips.c with ULL, on 32 bit
archs this constant is too big for an int.
  
The cast doesn't do the right thing, 0xffffffffffffffff is in C an int
and the cast casts 0xffffffffffffffff interpreted as an int to an u64.
  
cu
Adrian

--- linux-2.5.73-not-full/drivers/scsi/ips.c.old	2003-06-24 20:07:48.000000000 +0200
+++ linux-2.5.73-not-full/drivers/scsi/ips.c	2003-06-24 20:08:34.000000000 +0200
@@ -7009,10 +7009,10 @@
      * are guaranteed to be < 4G.
      */
     if ( IPS_ENABLE_DMA64 && IPS_HAS_ENH_SGLIST(ha) &&
-         !pci_set_dma_mask(ha->pcidev, (u64)0xffffffffffffffff)) {
+         !pci_set_dma_mask(ha->pcidev, 0xffffffffffffffffULL)) {
        (ha)->flags |= IPS_HA_ENH_SG;
     } else {
-       if ( pci_set_dma_mask(ha->pcidev, (u64)0xffffffff) != 0 ) { 
+       if ( pci_set_dma_mask(ha->pcidev, 0xffffffffULL) != 0 ) { 
           printk(KERN_WARNING "Unable to set DMA Mask\n");
           return ips_abort_init(ha, index);
        }

                 reply	other threads:[~2003-06-25  1:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20030625012142.GF3710@fs.tum.de \
    --to=bunk@fs.tum.de \
    --cc=ipslinux@adaptec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox