Cosmetic only: just use "i" instead of "tmp".
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-By: Rene Herman <rene.herman@gmail.com>
Index: work10/drivers/pnp/resource.c
===================================================================
--- work10.orig/drivers/pnp/resource.c 2008-04-28 16:09:26.000000000 -0600
+++ work10/drivers/pnp/resource.c 2008-04-28 16:09:31.000000000 -0600
@@ -241,7 +241,7 @@
int pnp_check_port(struct pnp_dev *dev, int idx)
{
- int tmp;
+ int i;
struct pnp_dev *tdev;
resource_size_t *port, *end, *tport, *tend;
@@ -260,18 +260,18 @@
}
/* check if the resource is reserved */
- for (tmp = 0; tmp < 8; tmp++) {
- int rport = pnp_reserve_io[tmp << 1];
- int rend = pnp_reserve_io[(tmp << 1) + 1] + rport - 1;
+ for (i = 0; i < 8; i++) {
+ int rport = pnp_reserve_io[i << 1];
+ int rend = pnp_reserve_io[(i << 1) + 1] + rport - 1;
if (ranged_conflict(port, end, &rport, &rend))
return 0;
}
/* check for internal conflicts */
- for (tmp = 0; tmp < PNP_MAX_PORT && tmp != idx; tmp++) {
- if (dev->res.port_resource[tmp].flags & IORESOURCE_IO) {
- tport = &dev->res.port_resource[tmp].start;
- tend = &dev->res.port_resource[tmp].end;
+ for (i = 0; i < PNP_MAX_PORT && i != idx; i++) {
+ if (dev->res.port_resource[i].flags & IORESOURCE_IO) {
+ tport = &dev->res.port_resource[i].start;
+ tend = &dev->res.port_resource[i].end;
if (ranged_conflict(port, end, tport, tend))
return 0;
}
@@ -281,13 +281,13 @@
pnp_for_each_dev(tdev) {
if (tdev == dev)
continue;
- for (tmp = 0; tmp < PNP_MAX_PORT; tmp++) {
- if (tdev->res.port_resource[tmp].flags & IORESOURCE_IO) {
+ for (i = 0; i < PNP_MAX_PORT; i++) {
+ if (tdev->res.port_resource[i].flags & IORESOURCE_IO) {
if (cannot_compare
- (tdev->res.port_resource[tmp].flags))
+ (tdev->res.port_resource[i].flags))
continue;
- tport = &tdev->res.port_resource[tmp].start;
- tend = &tdev->res.port_resource[tmp].end;
+ tport = &tdev->res.port_resource[i].start;
+ tend = &tdev->res.port_resource[i].end;
if (ranged_conflict(port, end, tport, tend))
return 0;
}
@@ -299,7 +299,7 @@
int pnp_check_mem(struct pnp_dev *dev, int idx)
{
- int tmp;
+ int i;
struct pnp_dev *tdev;
resource_size_t *addr, *end, *taddr, *tend;
@@ -318,18 +318,18 @@
}
/* check if the resource is reserved */
- for (tmp = 0; tmp < 8; tmp++) {
- int raddr = pnp_reserve_mem[tmp << 1];
- int rend = pnp_reserve_mem[(tmp << 1) + 1] + raddr - 1;
+ for (i = 0; i < 8; i++) {
+ int raddr = pnp_reserve_mem[i << 1];
+ int rend = pnp_reserve_mem[(i << 1) + 1] + raddr - 1;
if (ranged_conflict(addr, end, &raddr, &rend))
return 0;
}
/* check for internal conflicts */
- for (tmp = 0; tmp < PNP_MAX_MEM && tmp != idx; tmp++) {
- if (dev->res.mem_resource[tmp].flags & IORESOURCE_MEM) {
- taddr = &dev->res.mem_resource[tmp].start;
- tend = &dev->res.mem_resource[tmp].end;
+ for (i = 0; i < PNP_MAX_MEM && i != idx; i++) {
+ if (dev->res.mem_resource[i].flags & IORESOURCE_MEM) {
+ taddr = &dev->res.mem_resource[i].start;
+ tend = &dev->res.mem_resource[i].end;
if (ranged_conflict(addr, end, taddr, tend))
return 0;
}
@@ -339,13 +339,13 @@
pnp_for_each_dev(tdev) {
if (tdev == dev)
continue;
- for (tmp = 0; tmp < PNP_MAX_MEM; tmp++) {
- if (tdev->res.mem_resource[tmp].flags & IORESOURCE_MEM) {
+ for (i = 0; i < PNP_MAX_MEM; i++) {
+ if (tdev->res.mem_resource[i].flags & IORESOURCE_MEM) {
if (cannot_compare
- (tdev->res.mem_resource[tmp].flags))
+ (tdev->res.mem_resource[i].flags))
continue;
- taddr = &tdev->res.mem_resource[tmp].start;
- tend = &tdev->res.mem_resource[tmp].end;
+ taddr = &tdev->res.mem_resource[i].start;
+ tend = &tdev->res.mem_resource[i].end;
if (ranged_conflict(addr, end, taddr, tend))
return 0;
}
@@ -362,7 +362,7 @@
int pnp_check_irq(struct pnp_dev *dev, int idx)
{
- int tmp;
+ int i;
struct pnp_dev *tdev;
resource_size_t *irq = &dev->res.irq_resource[idx].start;
@@ -375,15 +375,15 @@
return 0;
/* check if the resource is reserved */
- for (tmp = 0; tmp < 16; tmp++) {
- if (pnp_reserve_irq[tmp] == *irq)
+ for (i = 0; i < 16; i++) {
+ if (pnp_reserve_irq[i] == *irq)
return 0;
}
/* check for internal conflicts */
- for (tmp = 0; tmp < PNP_MAX_IRQ && tmp != idx; tmp++) {
- if (dev->res.irq_resource[tmp].flags & IORESOURCE_IRQ) {
- if (dev->res.irq_resource[tmp].start == *irq)
+ for (i = 0; i < PNP_MAX_IRQ && i != idx; i++) {
+ if (dev->res.irq_resource[i].flags & IORESOURCE_IRQ) {
+ if (dev->res.irq_resource[i].start == *irq)
return 0;
}
}
@@ -414,12 +414,12 @@
pnp_for_each_dev(tdev) {
if (tdev == dev)
continue;
- for (tmp = 0; tmp < PNP_MAX_IRQ; tmp++) {
- if (tdev->res.irq_resource[tmp].flags & IORESOURCE_IRQ) {
+ for (i = 0; i < PNP_MAX_IRQ; i++) {
+ if (tdev->res.irq_resource[i].flags & IORESOURCE_IRQ) {
if (cannot_compare
- (tdev->res.irq_resource[tmp].flags))
+ (tdev->res.irq_resource[i].flags))
continue;
- if ((tdev->res.irq_resource[tmp].start == *irq))
+ if ((tdev->res.irq_resource[i].start == *irq))
return 0;
}
}
@@ -431,7 +431,7 @@
int pnp_check_dma(struct pnp_dev *dev, int idx)
{
#ifndef CONFIG_IA64
- int tmp;
+ int i;
struct pnp_dev *tdev;
resource_size_t *dma = &dev->res.dma_resource[idx].start;
@@ -444,15 +444,15 @@
return 0;
/* check if the resource is reserved */
- for (tmp = 0; tmp < 8; tmp++) {
- if (pnp_reserve_dma[tmp] == *dma)
+ for (i = 0; i < 8; i++) {
+ if (pnp_reserve_dma[i] == *dma)
return 0;
}
/* check for internal conflicts */
- for (tmp = 0; tmp < PNP_MAX_DMA && tmp != idx; tmp++) {
- if (dev->res.dma_resource[tmp].flags & IORESOURCE_DMA) {
- if (dev->res.dma_resource[tmp].start == *dma)
+ for (i = 0; i < PNP_MAX_DMA && i != idx; i++) {
+ if (dev->res.dma_resource[i].flags & IORESOURCE_DMA) {
+ if (dev->res.dma_resource[i].start == *dma)
return 0;
}
}
@@ -469,12 +469,12 @@
pnp_for_each_dev(tdev) {
if (tdev == dev)
continue;
- for (tmp = 0; tmp < PNP_MAX_DMA; tmp++) {
- if (tdev->res.dma_resource[tmp].flags & IORESOURCE_DMA) {
+ for (i = 0; i < PNP_MAX_DMA; i++) {
+ if (tdev->res.dma_resource[i].flags & IORESOURCE_DMA) {
if (cannot_compare
- (tdev->res.dma_resource[tmp].flags))
+ (tdev->res.dma_resource[i].flags))
continue;
- if ((tdev->res.dma_resource[tmp].start == *dma))
+ if ((tdev->res.dma_resource[i].start == *dma))
return 0;
}
}
--
--
| Linus Torvalds | Linux 2.6.27 |
| Mel Gorman | Re: 2.6.21-rc7-mm2 -- x86_64 VDSO compile error |
| Eric W. Biederman | Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels on boot cpu |
| David Woodhouse | [GIT *] Allow request_firmware() to be satisfied from in-kernel, use it in more dr... |
git: | |
| Kyle Moffett | Using GIT to store /etc (Or: How to make GIT store all file permission bits) |
| Jakub Narebski | Re: VCS comparison table |
| Theodore Tso | Re: warning: no common commits - slow pull |
| Wincent Colaiuta | Re: [ANNOUNCE] GIT 1.5.4 |
| Richard Stallman | Real men don't attack straw men |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Alexey Suslikov | OT: OpenBSD on Asus eeePC |
| Khalid Schofield | Configuring sendmail openbsd 4.2 |
| David Woodhouse | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Alexey Dobriyan | [PATCH 07/33] netns ct: pass netns pointer to nf_conntrack_in() |
| Templin, Fred L | [PATCH 03/05] ipv6: RFC4214 Support (5) |
| Herbert Xu | Re: Kernel oops with 2.6.26, padlock and ipsec: probably problem with fpu state ch... |
| Shared swap partition | 6 hours ago | Linux general |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 2 days ago | Applications and Utilities |
| the kernel how to power off the machine | 2 days ago | Linux kernel |
| Easter Eggs in windows XP | 2 days ago | Windows |
| Root password | 2 days ago | Linux general |
| Where/when DNOTIFY is used? | 2 days ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 2 days ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 2 days ago | Linux kernel |
| USB Driver -- Interrupt Polling -- A Little Help Please | 2 days ago | Linux general |
