Commit d2a6eaee authored by Jeremy Sowden's avatar Jeremy Sowden Committed by Greg Kroah-Hartman

staging: kpc2000: inverted conditional in order to reduce indentation.

Changed:

  for (...) {
    ...
    if (expr) {
      ...
    }
  }

into:

  for (...) {
    ...
    if (!expr)
      continue;
    ...
  }

in order to reduce indentation of conditional block.  Fixed indentation
of cases blocks at the same time.
Signed-off-by: default avatarJeremy Sowden <jeremy@azazel.net>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d34141eb
...@@ -414,28 +414,33 @@ int kp2000_probe_cores(struct kp2000_device *pcard) ...@@ -414,28 +414,33 @@ int kp2000_probe_cores(struct kp2000_device *pcard)
read_val = readq(pcard->sysinfo_regs_base + ((pcard->core_table_offset + i) * 8)); read_val = readq(pcard->sysinfo_regs_base + ((pcard->core_table_offset + i) * 8));
parse_core_table_entry(&cte, read_val, pcard->core_table_rev); parse_core_table_entry(&cte, read_val, pcard->core_table_rev);
if (cte.type == current_type_id){ if (cte.type != current_type_id)
switch (cte.type){ continue;
switch (cte.type) {
case KP_CORE_ID_I2C: case KP_CORE_ID_I2C:
err = probe_core_basic(core_num, pcard, KP_DRIVER_NAME_I2C, cte); err = probe_core_basic(core_num, pcard,
KP_DRIVER_NAME_I2C, cte);
break; break;
case KP_CORE_ID_SPI: case KP_CORE_ID_SPI:
err = probe_core_basic(core_num, pcard, KP_DRIVER_NAME_SPI, cte); err = probe_core_basic(core_num, pcard,
KP_DRIVER_NAME_SPI, cte);
break; break;
default: default:
err = probe_core_uio(core_num, pcard, "kpc_uio", cte); err = probe_core_uio(core_num, pcard, "kpc_uio", cte);
break; break;
} }
if (err){ if (err) {
dev_err(&pcard->pdev->dev, "kp2000_probe_cores: failed to add core %d: %d\n", i, err); dev_err(&pcard->pdev->dev,
"kp2000_probe_cores: failed to add core %d: %d\n",
i, err);
return err; return err;
} }
core_num++; core_num++;
} }
} }
}
// Finally, instantiate a UIO device for the core_table. // Finally, instantiate a UIO device for the core_table.
cte.type = 0; // CORE_ID_BOARD_INFO cte.type = 0; // CORE_ID_BOARD_INFO
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment