mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-26 15:54:18 +08:00
vme: remove unneeded break
A break is not needed if it is preceded by a return or goto Signed-off-by: Tom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20201019165112.29091-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b61fe3b596
commit
6a80467a21
@ -506,7 +506,6 @@ static int tsi148_slave_set(struct vme_slave_resource *image, int enabled,
|
||||
default:
|
||||
dev_err(tsi148_bridge->parent, "Invalid address space\n");
|
||||
return -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Convert 64-bit variables to 2x 32-bit variables */
|
||||
@ -995,7 +994,6 @@ static int tsi148_master_set(struct vme_master_resource *image, int enabled,
|
||||
dev_err(tsi148_bridge->parent, "Invalid address space\n");
|
||||
retval = -EINVAL;
|
||||
goto err_aspace;
|
||||
break;
|
||||
}
|
||||
|
||||
temp_ctl &= ~(3<<4);
|
||||
@ -1503,7 +1501,6 @@ static int tsi148_dma_set_vme_src_attributes(struct device *dev, __be32 *attr,
|
||||
default:
|
||||
dev_err(dev, "Invalid address space\n");
|
||||
return -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (cycle & VME_SUPER)
|
||||
@ -1603,7 +1600,6 @@ static int tsi148_dma_set_vme_dest_attributes(struct device *dev, __be32 *attr,
|
||||
default:
|
||||
dev_err(dev, "Invalid address space\n");
|
||||
return -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (cycle & VME_SUPER)
|
||||
@ -1701,7 +1697,6 @@ static int tsi148_dma_list_add(struct vme_dma_list *list,
|
||||
dev_err(tsi148_bridge->parent, "Invalid source type\n");
|
||||
retval = -EINVAL;
|
||||
goto err_source;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Assume last link - this will be over-written by adding another */
|
||||
@ -1738,7 +1733,6 @@ static int tsi148_dma_list_add(struct vme_dma_list *list,
|
||||
dev_err(tsi148_bridge->parent, "Invalid destination type\n");
|
||||
retval = -EINVAL;
|
||||
goto err_dest;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Fill out count */
|
||||
@ -1964,7 +1958,6 @@ static int tsi148_lm_set(struct vme_lm_resource *lm, unsigned long long lm_base,
|
||||
mutex_unlock(&lm->mtx);
|
||||
dev_err(tsi148_bridge->parent, "Invalid address space\n");
|
||||
return -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (cycle & VME_SUPER)
|
||||
|
@ -52,23 +52,18 @@ static struct vme_bridge *find_bridge(struct vme_resource *resource)
|
||||
case VME_MASTER:
|
||||
return list_entry(resource->entry, struct vme_master_resource,
|
||||
list)->parent;
|
||||
break;
|
||||
case VME_SLAVE:
|
||||
return list_entry(resource->entry, struct vme_slave_resource,
|
||||
list)->parent;
|
||||
break;
|
||||
case VME_DMA:
|
||||
return list_entry(resource->entry, struct vme_dma_resource,
|
||||
list)->parent;
|
||||
break;
|
||||
case VME_LM:
|
||||
return list_entry(resource->entry, struct vme_lm_resource,
|
||||
list)->parent;
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR "Unknown resource type\n");
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -179,7 +174,6 @@ size_t vme_get_size(struct vme_resource *resource)
|
||||
return 0;
|
||||
|
||||
return size;
|
||||
break;
|
||||
case VME_SLAVE:
|
||||
retval = vme_slave_get(resource, &enabled, &base, &size,
|
||||
&buf_base, &aspace, &cycle);
|
||||
@ -187,14 +181,11 @@ size_t vme_get_size(struct vme_resource *resource)
|
||||
return 0;
|
||||
|
||||
return size;
|
||||
break;
|
||||
case VME_DMA:
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR "Unknown resource type\n");
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(vme_get_size);
|
||||
|
Loading…
Reference in New Issue
Block a user