[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 45/59] 9pfs/9p.c: remove unneeded labels
From: |
Christian Schoenebeck |
Subject: |
Re: [PATCH v1 45/59] 9pfs/9p.c: remove unneeded labels |
Date: |
Tue, 07 Jan 2020 13:14:20 +0100 |
On Montag, 6. Januar 2020 19:24:11 CET Daniel Henrique Barboza wrote:
> 'out' label in v9fs_xattr_write() and 'out_nofid' label in
> v9fs_complete_rename() can be replaced by appropriate return
> calls.
>
> CC: Greg Kurz <address@hidden>
> Signed-off-by: Daniel Henrique Barboza <address@hidden>
> ---
> hw/9pfs/9p.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
> index 520177f40c..be2beba4cd 100644
> --- a/hw/9pfs/9p.c
> +++ b/hw/9pfs/9p.c
> @@ -2464,8 +2464,7 @@ static int v9fs_xattr_write(V9fsState *s, V9fsPDU
> *pdu, V9fsFidState *fidp,
>
>
> if (fidp->fs.xattr.len < off) {
> - err = -ENOSPC;
> - goto out;
> + return -ENOSPC;
> }
> write_count = fidp->fs.xattr.len - off;
> if (write_count > count) {
> @@ -2491,7 +2490,7 @@ static int v9fs_xattr_write(V9fsState *s, V9fsPDU
> *pdu, V9fsFidState *fidp, off += to_copy;
> write_count -= to_copy;
> }
> -out:
> +
> return err;
> }
>
> @@ -3056,8 +3055,7 @@ static int coroutine_fn v9fs_complete_rename(V9fsPDU
> *pdu, V9fsFidState *fidp, if (newdirfid != -1) {
> dirfidp = get_fid(pdu, newdirfid);
> if (dirfidp == NULL) {
> - err = -ENOENT;
> - goto out_nofid;
> + return -ENOENT;
> }
> if (fidp->fid_type != P9_FID_NONE) {
> err = -EINVAL;
> @@ -3100,7 +3098,6 @@ out:
> put_fid(pdu, dirfidp);
> }
> v9fs_path_free(&new_path);
> -out_nofid:
> return err;
> }
Same as with patch 44: IMO not any improvement, but also not any behaviour
change at least. So it's up to you Greg.
Best regards,
Christian Schoenebeck
- Re: [PATCH v1 41/59] intc/s390_flic_kvm.c: remove unneeded label in kvm_flic_load(), (continued)
- [PATCH v1 42/59] i386/intel_iommu.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 43/59] i386/amd_iommu.c: remove unneeded label in amdvi_int_remap_msi(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 44/59] 9p-local.c: remove unneeded label in local_unlinkat_common(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 45/59] 9pfs/9p.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- Re: [PATCH v1 45/59] 9pfs/9p.c: remove unneeded labels,
Christian Schoenebeck <=
- [PATCH v1 46/59] alpha/typhoon.c: remove unneeded label in typhoon_translate_iommu(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 47/59] pvrdma_main.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 48/59] pvrdma_dev_ring.c: remove unneeded label in pvrdma_ring_init(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 49/59] rdma/rdma_rm.c: remove unneeded label in rdma_rm_alloc_pd(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 50/59] rdma/rdma_backend.c: remove unneeded label in rdma_backend_init(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 51/59] virtio/vhost.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 52/59] net/vhost_net.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 53/59] net/net_tx_pkt.c: remove unneeded label in net_tx_pkt_get_gso_type(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 54/59] ivshmem-server/main.c: remove unneeded label in main(), Daniel Henrique Barboza, 2020/01/06