diff options
Diffstat (limited to 'drivers/pci/proc.c')
-rw-r--r-- | drivers/pci/proc.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 54b2ebc9c91a..99cf33379769 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c | |||
@@ -302,12 +302,6 @@ static struct file_operations proc_bus_pci_operations = { | |||
302 | #endif /* HAVE_PCI_MMAP */ | 302 | #endif /* HAVE_PCI_MMAP */ |
303 | }; | 303 | }; |
304 | 304 | ||
305 | #if BITS_PER_LONG == 32 | ||
306 | #define LONG_FORMAT "\t%08lx" | ||
307 | #else | ||
308 | #define LONG_FORMAT "\t%16lx" | ||
309 | #endif | ||
310 | |||
311 | /* iterator */ | 305 | /* iterator */ |
312 | static void *pci_seq_start(struct seq_file *m, loff_t *pos) | 306 | static void *pci_seq_start(struct seq_file *m, loff_t *pos) |
313 | { | 307 | { |
@@ -356,18 +350,18 @@ static int show_device(struct seq_file *m, void *v) | |||
356 | dev->irq); | 350 | dev->irq); |
357 | /* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */ | 351 | /* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */ |
358 | for (i=0; i<7; i++) { | 352 | for (i=0; i<7; i++) { |
359 | u64 start, end; | 353 | resource_size_t start, end; |
360 | pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); | 354 | pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); |
361 | seq_printf(m, LONG_FORMAT, | 355 | seq_printf(m, "\t%16llx", |
362 | ((unsigned long)start) | | 356 | (unsigned long long)(start | |
363 | (dev->resource[i].flags & PCI_REGION_FLAG_MASK)); | 357 | (dev->resource[i].flags & PCI_REGION_FLAG_MASK))); |
364 | } | 358 | } |
365 | for (i=0; i<7; i++) { | 359 | for (i=0; i<7; i++) { |
366 | u64 start, end; | 360 | resource_size_t start, end; |
367 | pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); | 361 | pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); |
368 | seq_printf(m, LONG_FORMAT, | 362 | seq_printf(m, "\t%16llx", |
369 | dev->resource[i].start < dev->resource[i].end ? | 363 | dev->resource[i].start < dev->resource[i].end ? |
370 | (unsigned long)(end - start) + 1 : 0); | 364 | (unsigned long long)(end - start) + 1 : 0); |
371 | } | 365 | } |
372 | seq_putc(m, '\t'); | 366 | seq_putc(m, '\t'); |
373 | if (drv) | 367 | if (drv) |