aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-01-01 11:40:49 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-02-22 19:16:56 -0500
commitb26b2d494b659f988b4d75eb394dfa0ddac415c9 (patch)
treed262f333e529a21017dc072e604a626b38520515 /arch/parisc
parent93da6202264ce1256b04db8008a43882ae62d060 (diff)
resource/PCI: align functions now return start of resource
As suggested by Linus, align functions should return the start of a resource, not void. An update of "res->start" is no longer necessary. Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/pci.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c
index f7064abc3bb6..4463a31973ba 100644
--- a/arch/parisc/kernel/pci.c
+++ b/arch/parisc/kernel/pci.c
@@ -254,10 +254,10 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
254 * Since we are just checking candidates, don't use any fields other 254 * Since we are just checking candidates, don't use any fields other
255 * than res->start. 255 * than res->start.
256 */ 256 */
257void pcibios_align_resource(void *data, struct resource *res, 257resource_size_t pcibios_align_resource(void *data, struct resource *res,
258 resource_size_t size, resource_size_t alignment) 258 resource_size_t size, resource_size_t alignment)
259{ 259{
260 resource_size_t mask, align; 260 resource_size_t mask, align, start = res->start;
261 261
262 DBG_RES("pcibios_align_resource(%s, (%p) [%lx,%lx]/%x, 0x%lx, 0x%lx)\n", 262 DBG_RES("pcibios_align_resource(%s, (%p) [%lx,%lx]/%x, 0x%lx, 0x%lx)\n",
263 pci_name(((struct pci_dev *) data)), 263 pci_name(((struct pci_dev *) data)),
@@ -269,10 +269,10 @@ void pcibios_align_resource(void *data, struct resource *res,
269 269
270 /* Align to largest of MIN or input size */ 270 /* Align to largest of MIN or input size */
271 mask = max(alignment, align) - 1; 271 mask = max(alignment, align) - 1;
272 res->start += mask; 272 start += mask;
273 res->start &= ~mask; 273 start &= ~mask;
274 274
275 /* The caller updates the end field, we don't. */ 275 return start;
276} 276}
277 277
278 278