The pci_bus_for_each_resource() can hide the iterator loop since
it may be not used otherwise. With this, we may drop that iterator
variable definition.
Reviewed-by: Krzysztof WilczyĆski <kw@linux.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
static int nonstatic_autoadd_resources(struct pcmcia_socket *s)
{
struct resource *res;
- int i, done = 0;
+ int done = 0;
if (!s->cb_dev || !s->cb_dev->bus)
return -ENODEV;
if (s->cb_dev->bus->number == 0)
return -EINVAL;
- for (i = 0; i < PCI_BRIDGE_RESOURCE_NUM; i++) {
+ for (unsigned int i = 0; i < PCI_BRIDGE_RESOURCE_NUM; i++) {
res = s->cb_dev->bus->resource[i];
#else
- pci_bus_for_each_resource(s->cb_dev->bus, res, i) {
+ pci_bus_for_each_resource(s->cb_dev->bus, res) {
#endif
if (!res)
continue;
u32 min)
{
struct resource *root;
- int i;
- pci_bus_for_each_resource(socket->dev->bus, root, i) {
+ pci_bus_for_each_resource(socket->dev->bus, root) {
if (!root)
continue;