* [PATCH] ia64/pci/pci.c cosmetic cleanup
@ 2005-02-18 23:10 Bjorn Helgaas
2005-02-18 23:17 ` Matthew Wilcox
2005-02-18 23:37 ` Luck, Tony
0 siblings, 2 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2005-02-18 23:10 UTC (permalink / raw)
To: linux-ia64
Rewrap a few long lines, add KERN_* and "PCI: " prefixes, etc.
No functional changes.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
=== arch/ia64/pci/pci.c 1.65 vs edited ==--- 1.65/arch/ia64/pci/pci.c 2005-01-12 11:08:48 -07:00
+++ edited/arch/ia64/pci/pci.c 2005-02-18 15:52:27 -07:00
@@ -198,8 +198,8 @@
}
static int __devinit
-alloc_resource (char *name, struct resource *root, unsigned long start, unsigned long end,
- unsigned long flags)
+alloc_resource (char *name, struct resource *root, unsigned long start,
+ unsigned long end, unsigned long flags)
{
struct resource *res;
@@ -241,7 +241,7 @@
return IO_SPACE_BASE(i);
if (num_io_spaces = MAX_IO_SPACES) {
- printk("Too many IO port spaces\n");
+ printk(KERN_ERR "PCI: too many IO port spaces\n");
return ~0;
}
@@ -284,35 +284,38 @@
struct resource *root;
status = acpi_resource_to_address64(res, &addr);
- if (ACPI_SUCCESS(status)) {
- if (!addr.address_length)
- return AE_OK;
+ if (!ACPI_SUCCESS(status))
+ return AE_OK;
+
+ if (!addr.address_length)
+ return AE_OK;
- if (addr.resource_type = ACPI_MEMORY_RANGE) {
- flags = IORESOURCE_MEM;
- root = &iomem_resource;
- offset = addr.address_translation_offset;
- } else if (addr.resource_type = ACPI_IO_RANGE) {
- flags = IORESOURCE_IO;
- root = &ioport_resource;
- offset = add_io_space(&addr);
- if (offset = ~0)
- return AE_OK;
- } else
+ if (addr.resource_type = ACPI_MEMORY_RANGE) {
+ flags = IORESOURCE_MEM;
+ root = &iomem_resource;
+ offset = addr.address_translation_offset;
+ } else if (addr.resource_type = ACPI_IO_RANGE) {
+ flags = IORESOURCE_IO;
+ root = &ioport_resource;
+ offset = add_io_space(&addr);
+ if (offset = ~0)
return AE_OK;
+ } else
+ return AE_OK;
- window = &info->controller->window[info->controller->windows++];
- window->resource.flags = flags;
- window->resource.start = addr.min_address_range;
- window->resource.end = addr.max_address_range;
- window->offset = offset;
+ window = &info->controller->window[info->controller->windows++];
+ window->resource.flags = flags;
+ window->resource.start = addr.min_address_range;
+ window->resource.end = addr.max_address_range;
+ window->offset = offset;
- if (alloc_resource(info->name, root, addr.min_address_range + offset,
+ if (alloc_resource(info->name, root, addr.min_address_range + offset,
addr.max_address_range + offset, flags))
- printk(KERN_ERR "alloc 0x%lx-0x%lx from %s for %s failed\n",
- addr.min_address_range + offset, addr.max_address_range + offset,
- root->name, info->name);
- }
+ printk(KERN_ERR
+ "PCI: alloc 0x%lx-0x%lx from %s for %s failed\n",
+ addr.min_address_range + offset,
+ addr.max_address_range + offset,
+ root->name, info->name);
return AE_OK;
}
@@ -331,8 +334,10 @@
controller->acpi_handle = device->handle;
- acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window, &windows);
- controller->window = kmalloc(sizeof(*controller->window) * windows, GFP_KERNEL);
+ acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window,
+ &windows);
+ controller->window = kmalloc(sizeof(*controller->window) * windows,
+ GFP_KERNEL);
if (!controller->window)
goto out2;
@@ -343,7 +348,8 @@
sprintf(name, "PCI Bus %04x:%02x", domain, bus);
info.controller = controller;
info.name = name;
- acpi_walk_resources(device->handle, METHOD_NAME__CRS, add_window, &info);
+ acpi_walk_resources(device->handle, METHOD_NAME__CRS, add_window,
+ &info);
return pci_scan_bus(bus, &pci_root_ops, controller);
@@ -460,9 +466,8 @@
r = &dev->resource[idx];
if (!r->start && r->end) {
- printk(KERN_ERR
- "PCI: Device %s not available because of resource collisions\n",
- pci_name(dev));
+ printk(KERN_ERR "PCI: Device %s not available because "
+ "of resource collisions\n", pci_name(dev));
return -EINVAL;
}
if (r->flags & IORESOURCE_IO)
@@ -473,7 +478,8 @@
if (dev->resource[PCI_ROM_RESOURCE].start)
cmd |= PCI_COMMAND_MEMORY;
if (cmd != old_cmd) {
- printk("PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd);
+ printk(KERN_DEBUG "PCI: Enabling device %s (%04x -> %04x)\n",
+ pci_name(dev), old_cmd, cmd);
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
return 0;
@@ -686,16 +692,15 @@
status = ia64_pal_cache_summary(&levels, &unique_caches);
if (status != 0) {
- printk(KERN_ERR "%s: ia64_pal_cache_summary() failed (status=%ld)\n",
- __FUNCTION__, status);
+ printk(KERN_ERR "%s: ia64_pal_cache_summary() failed "
+ "(status=%ld)\n", __FUNCTION__, status);
return SMP_CACHE_BYTES;
}
- status = ia64_pal_cache_config_info(levels - 1, /* cache_type (data_or_unified)= */ 2,
- &cci);
+ status = ia64_pal_cache_config_info(levels - 1, 2, &cci);
if (status != 0) {
- printk(KERN_ERR "%s: ia64_pal_cache_config_info() failed (status=%ld)\n",
- __FUNCTION__, status);
+ printk(KERN_ERR "%s: ia64_pal_cache_config_info() failed "
+ "(status=%ld)\n", __FUNCTION__, status);
return SMP_CACHE_BYTES;
}
cacheline_size = 1 << cci.pcci_line_size;
@@ -722,14 +727,17 @@
pci_read_config_byte(dev, PCI_CACHE_LINE_SIZE, &pci_linesize);
current_linesize = 4 * pci_linesize;
if (desired_linesize != current_linesize) {
- printk(KERN_WARNING "PCI: slot %s has incorrect PCI cache line size of %lu bytes,",
- pci_name(dev), current_linesize);
+ printk(KERN_WARNING "PCI: slot %s has incorrect PCI cache "
+ "line size of %lu bytes,",
+ pci_name(dev),current_linesize);
if (current_linesize > desired_linesize) {
- printk(" expected %lu bytes instead\n", desired_linesize);
+ printk(" expected %lu bytes instead\n",
+ desired_linesize);
rc = -EINVAL;
} else {
printk(" correcting to %lu\n", desired_linesize);
- pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, desired_linesize / 4);
+ pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE,
+ desired_linesize / 4);
}
}
return rc;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ia64/pci/pci.c cosmetic cleanup
2005-02-18 23:10 [PATCH] ia64/pci/pci.c cosmetic cleanup Bjorn Helgaas
@ 2005-02-18 23:17 ` Matthew Wilcox
2005-02-18 23:37 ` Luck, Tony
1 sibling, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2005-02-18 23:17 UTC (permalink / raw)
To: linux-ia64
On Fri, Feb 18, 2005 at 04:10:27PM -0700, Bjorn Helgaas wrote:
> Rewrap a few long lines, add KERN_* and "PCI: " prefixes, etc.
> No functional changes.
Unfortunately, this clashes with
http://marc.theaimsgroup.com/?l=linux-ia64&m\x110614534704894&w=2
Tony, is this patch in your tree yet?
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] ia64/pci/pci.c cosmetic cleanup
2005-02-18 23:10 [PATCH] ia64/pci/pci.c cosmetic cleanup Bjorn Helgaas
2005-02-18 23:17 ` Matthew Wilcox
@ 2005-02-18 23:37 ` Luck, Tony
1 sibling, 0 replies; 3+ messages in thread
From: Luck, Tony @ 2005-02-18 23:37 UTC (permalink / raw)
To: linux-ia64
>On Fri, Feb 18, 2005 at 04:10:27PM -0700, Bjorn Helgaas wrote:
>> Rewrap a few long lines, add KERN_* and "PCI: " prefixes, etc.
>> No functional changes.
>
>Unfortunately, this clashes with
>http://marc.theaimsgroup.com/?l=linux-ia64&m\x110614534704894&w=2
>Tony, is this patch in your tree yet?
Not yet. I need to start moving on the backlog of patches that
is building up in my mailbox.
-Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-02-18 23:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-18 23:10 [PATCH] ia64/pci/pci.c cosmetic cleanup Bjorn Helgaas
2005-02-18 23:17 ` Matthew Wilcox
2005-02-18 23:37 ` Luck, Tony
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox