aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/hpilo.c
diff options
context:
space:
mode:
authorPrarit Bhargava <prarit@redhat.com>2010-08-09 20:20:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-09 23:45:05 -0400
commitcdf8afca2417c5ae2a940a2ff2d36af986a3cf1d (patch)
tree872d838052885087b633b2e40778c6a26606332b /drivers/misc/hpilo.c
parent7efe15f2a4cd9d40826d31d7d5ef56094f8b65f5 (diff)
hpilo: fix pointer warning in ilo_ccb_setup
Fix i386 PAE compile warning: drivers/misc/hpilo.c: In function `ilo_ccb_setup': drivers/misc/hpilo.c:274: warning: cast to pointer from integer of different size dma_addr_t is 64 on i386 PAE which causes a size mismatch. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Acked-by: David Altobelli <david.altobelli@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/hpilo.c')
-rw-r--r--drivers/misc/hpilo.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c
index 98ad0120aa9b..557a8c2a7336 100644
--- a/drivers/misc/hpilo.c
+++ b/drivers/misc/hpilo.c
@@ -256,7 +256,8 @@ static void ilo_ccb_close(struct pci_dev *pdev, struct ccb_data *data)
256 256
257static int ilo_ccb_setup(struct ilo_hwinfo *hw, struct ccb_data *data, int slot) 257static int ilo_ccb_setup(struct ilo_hwinfo *hw, struct ccb_data *data, int slot)
258{ 258{
259 char *dma_va, *dma_pa; 259 char *dma_va;
260 dma_addr_t dma_pa;
260 struct ccb *driver_ccb, *ilo_ccb; 261 struct ccb *driver_ccb, *ilo_ccb;
261 262
262 driver_ccb = &data->driver_ccb; 263 driver_ccb = &data->driver_ccb;
@@ -272,12 +273,12 @@ static int ilo_ccb_setup(struct ilo_hwinfo *hw, struct ccb_data *data, int slot)
272 return -ENOMEM; 273 return -ENOMEM;
273 274
274 dma_va = (char *)data->dma_va; 275 dma_va = (char *)data->dma_va;
275 dma_pa = (char *)data->dma_pa; 276 dma_pa = data->dma_pa;
276 277
277 memset(dma_va, 0, data->dma_size); 278 memset(dma_va, 0, data->dma_size);
278 279
279 dma_va = (char *)roundup((unsigned long)dma_va, ILO_START_ALIGN); 280 dma_va = (char *)roundup((unsigned long)dma_va, ILO_START_ALIGN);
280 dma_pa = (char *)roundup((unsigned long)dma_pa, ILO_START_ALIGN); 281 dma_pa = roundup(dma_pa, ILO_START_ALIGN);
281 282
282 /* 283 /*
283 * Create two ccb's, one with virt addrs, one with phys addrs. 284 * Create two ccb's, one with virt addrs, one with phys addrs.
@@ -288,26 +289,26 @@ static int ilo_ccb_setup(struct ilo_hwinfo *hw, struct ccb_data *data, int slot)
288 289
289 fifo_setup(dma_va, NR_QENTRY); 290 fifo_setup(dma_va, NR_QENTRY);
290 driver_ccb->ccb_u1.send_fifobar = dma_va + FIFOHANDLESIZE; 291 driver_ccb->ccb_u1.send_fifobar = dma_va + FIFOHANDLESIZE;
291 ilo_ccb->ccb_u1.send_fifobar = dma_pa + FIFOHANDLESIZE; 292 ilo_ccb->ccb_u1.send_fifobar_pa = dma_pa + FIFOHANDLESIZE;
292 dma_va += fifo_sz(NR_QENTRY); 293 dma_va += fifo_sz(NR_QENTRY);
293 dma_pa += fifo_sz(NR_QENTRY); 294 dma_pa += fifo_sz(NR_QENTRY);
294 295
295 dma_va = (char *)roundup((unsigned long)dma_va, ILO_CACHE_SZ); 296 dma_va = (char *)roundup((unsigned long)dma_va, ILO_CACHE_SZ);
296 dma_pa = (char *)roundup((unsigned long)dma_pa, ILO_CACHE_SZ); 297 dma_pa = roundup(dma_pa, ILO_CACHE_SZ);
297 298
298 fifo_setup(dma_va, NR_QENTRY); 299 fifo_setup(dma_va, NR_QENTRY);
299 driver_ccb->ccb_u3.recv_fifobar = dma_va + FIFOHANDLESIZE; 300 driver_ccb->ccb_u3.recv_fifobar = dma_va + FIFOHANDLESIZE;
300 ilo_ccb->ccb_u3.recv_fifobar = dma_pa + FIFOHANDLESIZE; 301 ilo_ccb->ccb_u3.recv_fifobar_pa = dma_pa + FIFOHANDLESIZE;
301 dma_va += fifo_sz(NR_QENTRY); 302 dma_va += fifo_sz(NR_QENTRY);
302 dma_pa += fifo_sz(NR_QENTRY); 303 dma_pa += fifo_sz(NR_QENTRY);
303 304
304 driver_ccb->ccb_u2.send_desc = dma_va; 305 driver_ccb->ccb_u2.send_desc = dma_va;
305 ilo_ccb->ccb_u2.send_desc = dma_pa; 306 ilo_ccb->ccb_u2.send_desc_pa = dma_pa;
306 dma_pa += desc_mem_sz(NR_QENTRY); 307 dma_pa += desc_mem_sz(NR_QENTRY);
307 dma_va += desc_mem_sz(NR_QENTRY); 308 dma_va += desc_mem_sz(NR_QENTRY);
308 309
309 driver_ccb->ccb_u4.recv_desc = dma_va; 310 driver_ccb->ccb_u4.recv_desc = dma_va;
310 ilo_ccb->ccb_u4.recv_desc = dma_pa; 311 ilo_ccb->ccb_u4.recv_desc_pa = dma_pa;
311 312
312 driver_ccb->channel = slot; 313 driver_ccb->channel = slot;
313 ilo_ccb->channel = slot; 314 ilo_ccb->channel = slot;