public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: achim_leubner@adaptec.com
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: [PATCH] fix gcc warning on 64 bit compile of gdth
Date: Mon, 03 Jan 2005 15:45:04 -0600	[thread overview]
Message-ID: <1104788704.5506.67.camel@mulgrave> (raw)

This warning:

drivers/scsi/gdth.c: In function `gdth_fill_raw_cmd':
drivers/scsi/gdth.c:2948: warning: cast to pointer from integer of
different size
drivers/scsi/gdth.c:2950: warning: cast to pointer from integer of
different size
drivers/scsi/gdth.c: In function `gdth_sync_event':
drivers/scsi/gdth.c:3644: warning: cast from pointer to integer of
different size
drivers/scsi/gdth.c:3646: warning: cast from pointer to integer of
different size

can be fixed with the following patch.

James

===== drivers/scsi/gdth.c 1.47 vs edited =====
--- 1.47/drivers/scsi/gdth.c	2005-01-03 10:53:29 -06:00
+++ edited/drivers/scsi/gdth.c	2005-01-03 11:09:32 -06:00
@@ -2945,9 +2945,9 @@
         offset = (ulong)scp->sense_buffer & ~PAGE_MASK;
         sense_paddr = pci_map_page(ha->pdev,page,offset,
                                    16,PCI_DMA_FROMDEVICE);
-        scp->SCp.buffer = (struct scatterlist *)((ulong32)sense_paddr);
+        scp->SCp.buffer = (struct scatterlist *)((unsigned long)sense_paddr);
         /* high part, if 64bit */
-        scp->host_scribble = (char *)(ulong32)((ulong64)sense_paddr >> 32);
+        scp->host_scribble = (char *)(unsigned long)((ulong64)sense_paddr >> 32);
         cmdp->OpCode           = GDT_WRITE;             /* always */
         cmdp->BoardNode        = LOCALBOARD;
         if (mode64) { 
@@ -3641,9 +3641,9 @@
                            scp->request_bufflen,scp->SCp.Message);
         if (scp->SCp.buffer) {
             dma_addr_t addr;
-            addr = (dma_addr_t)(ulong32)scp->SCp.buffer;
+            addr = (dma_addr_t)(unsigned long)scp->SCp.buffer;
             if (scp->host_scribble)
-                addr += (dma_addr_t)((ulong64)(ulong32)scp->host_scribble << 32);               
+                addr += (dma_addr_t)((ulong64)(unsigned long)scp->host_scribble << 32);               
             pci_unmap_page(ha->pdev,addr,16,PCI_DMA_FROMDEVICE);
         }
 



             reply	other threads:[~2005-01-03 21:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-03 21:45 James Bottomley [this message]
2005-01-03 22:43 ` [PATCH] fix gcc warning on 64 bit compile of gdth Al Viro
2005-01-03 22:49   ` James Bottomley
2005-01-03 22:54     ` Al Viro
2005-01-03 23:53       ` James Bottomley
2005-01-04  4:52         ` Al Viro
2005-01-04  8:27       ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2005-01-04  9:29 Leubner, Achim
2005-01-04  9:32 ` Arjan van de Ven
2005-01-04 10:29   ` Al Viro
2005-01-05 11:19   ` Christoph Hellwig
2005-01-04 14:55 ` James Bottomley
2005-01-05 11:19 ` Christoph Hellwig
2005-01-04 10:57 Leubner, Achim
2005-01-04 11:53 ` Al Viro
2005-01-04 12:08 Leubner, Achim

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=1104788704.5506.67.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=achim_leubner@adaptec.com \
    --cc=linux-scsi@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