lkml.org 
[lkml]   [2000]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[minor patch] pci.h

Hi Martin
this patch makes computing of pci_resource_len a bit more
straightforward and hopefully still correct.Plus an aesthetic change in a
struct declaration :)

--- /usr/src/clean/linux/include/linux/pci.h Mon Dec 11 16:49:19 2000
+++ pci.h Mon Dec 11 17:54:24 2000
@@ -432,8 +432,7 @@
int (*write_dword)(struct pci_dev *, int where, u32 val);
};

-struct pbus_set_ranges_data
-{
+struct pbus_set_ranges_data {
int found_vga;
unsigned long io_start, io_end;
unsigned long mem_start, mem_end;
@@ -636,9 +635,8 @@
#define pci_resource_end(dev,bar) ((dev)->resource[(bar)].end)
#define pci_resource_flags(dev,bar) ((dev)->resource[(bar)].flags)
#define pci_resource_len(dev,bar) \
- ((pci_resource_start((dev),(bar)) == 0 && \
- pci_resource_end((dev),(bar)) == \
- pci_resource_start((dev),(bar))) ? 0 : \
+ (!(pci_resource_start((dev),(bar)) || \
+ pci_resource_end((dev),(bar))) ? 0 : \
\
(pci_resource_end((dev),(bar)) - \
pci_resource_start((dev),(bar)) + 1))

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.024 / U:2.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site