Commit 8579e8f9 authored by Alessandro Rubini's avatar Alessandro Rubini

trivial: svec-drv.c: whitespace/checkpatch cleanup

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent ba112abe
......@@ -138,7 +138,7 @@ int svec_bootloader_unlock(struct svec_dev *svec)
SVEC_BASE_LOADER + XLDR_REG_BTRIGR;
/* Magic sequence: unlock bootloader mode, disable application FPGA */
for (i=0; i<8; i++)
for (i = 0; i < 8; i++)
iowrite32(cpu_to_be32(boot_seq[i]), addr);
dev_info(dev, "Wrote unlock sequence at %lx\n", (unsigned long)addr);
......@@ -229,7 +229,7 @@ int svec_load_fpga(struct svec_dev *svec, const void *blob, int size)
u64 timeout;
/* Check if we have something to do... */
if ((data == NULL) || (size == 0)){
if ((data == NULL) || (size == 0)) {
dev_err(dev, "%s: data to be load is NULL\n", __func__);
return -EINVAL;
}
......@@ -254,10 +254,10 @@ int svec_load_fpga(struct svec_dev *svec, const void *blob, int size)
loader_addr + XLDR_REG_CSR);
i = 0;
while(i < size) {
while (i < size) {
rval = be32_to_cpu(ioread32(loader_addr + XLDR_REG_FIFO_CSR));
if (!(rval & XLDR_FIFO_CSR_FULL)) {
n = (size-i>4?4:size-i);
n = (size - i > 4 ? 4 : size - i);
xldr_fifo_r0 = (n - 1) |
((n<4) ? XLDR_FIFO_R0_XLAST : 0);
xldr_fifo_r1 = htonl(data[i>>2]);
......@@ -266,7 +266,7 @@ int svec_load_fpga(struct svec_dev *svec, const void *blob, int size)
loader_addr + XLDR_REG_FIFO_R0);
iowrite32(cpu_to_be32(xldr_fifo_r1),
loader_addr + XLDR_REG_FIFO_R1);
i+=n;
i += n;
}
}
......@@ -381,7 +381,7 @@ static int __devinit svec_probe(struct device *pdev, unsigned int ndev)
if (lun[ndev] >= SVEC_MAX_DEVICES) {
dev_err(pdev, "Card lun %d out of range [0..%d]\n",
lun[ndev], SVEC_MAX_DEVICES -1);
lun[ndev], SVEC_MAX_DEVICES - 1);
return -EINVAL;
}
......@@ -414,8 +414,7 @@ static int __devinit svec_probe(struct device *pdev, unsigned int ndev)
if (error)
goto failed;
if (!svec_is_present(svec))
{
if (!svec_is_present(svec)) {
error = -EINVAL;
goto failed_unmap_crcsr;
}
......@@ -488,7 +487,8 @@ static int __init svec_init(void)
/* Check that all insmod argument vectors are the same length */
if (lun_num != slot_num || lun_num != vmebase_num ||
lun_num != vector_num) {
pr_err("%s: The number of parameters doesn't match\n", __func__);
pr_err("%s: The number of parameters doesn't match\n",
__func__);
return -EINVAL;
}
......
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