[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 57/59] linux-user/syscall.c: fix trailing whitespaces and
From: |
Peter Maydell |
Subject: |
Re: [PATCH v1 57/59] linux-user/syscall.c: fix trailing whitespaces and style |
Date: |
Tue, 7 Jan 2020 10:37:20 +0000 |
On Mon, 6 Jan 2020 at 19:19, Daniel Henrique Barboza
<address@hidden> wrote:
>
> There are trailing whitespaces in this file that, if removed
> by a text editor that refuses to let the traiing whitespace
> alone, which happens to be the editor I am using, will cause
> checkpatch.pl to warn about styling problems in the resulting
> patch. This happens because the trailing whitespace lines
> are using a deprecated style.
You should fix your editor to not do this kind of uncommanded edit
(otherwise you'll be spending forever trying to sort out
unasked for changes from patches you write) but the style cleanup
here is reasonable.
> To keep the intended change I wanted to do (remove unneeded
> labels in do_ioctl_blkpg() and do_sendrecvmsg_locked())
> trivial, this patch is another trivial change to fix the
> trailing whitespaces and the code style errors that
> checkpatch.pl warns about. Doing this change beforehand will
> keep the next patch focused just on the label removal changes.
> @@ -1526,10 +1526,11 @@ static inline abi_long target_to_host_cmsg(struct
> msghdr *msgh,
> abi_ulong target_cmsg_addr;
> struct target_cmsghdr *target_cmsg, *target_cmsg_start;
> socklen_t space = 0;
> -
> +
> msg_controllen = tswapal(target_msgh->msg_controllen);
> - if (msg_controllen < sizeof (struct target_cmsghdr))
> + if (msg_controllen < sizeof(struct target_cmsghdr)) {
> goto the_end;
> + }
> target_cmsg_addr = tswapal(target_msgh->msg_control);
> target_cmsg = lock_user(VERIFY_READ, target_cmsg_addr, msg_controllen,
> 1);
> target_cmsg_start = target_cmsg;
> @@ -1610,8 +1611,9 @@ static inline abi_long host_to_target_cmsg(struct
> target_msghdr *target_msgh,
> socklen_t space = 0;
>
> msg_controllen = tswapal(target_msgh->msg_controllen);
> - if (msg_controllen < sizeof (struct target_cmsghdr))
> + if (msg_controllen < sizeof(struct target_cmsghdr)) {
> goto the_end;
> + }
> target_cmsg_addr = tswapal(target_msgh->msg_control);
> target_cmsg = lock_user(VERIFY_WRITE, target_cmsg_addr, msg_controllen,
> 0);
> target_cmsg_start = target_cmsg;
> @@ -5592,9 +5594,9 @@ abi_long do_set_thread_area(CPUX86State *env, abi_ulong
> ptr)
> }
> unlock_user_struct(target_ldt_info, ptr, 1);
>
> - if (ldt_info.entry_number < TARGET_GDT_ENTRY_TLS_MIN ||
> + if (ldt_info.entry_number < TARGET_GDT_ENTRY_TLS_MIN ||
> ldt_info.entry_number > TARGET_GDT_ENTRY_TLS_MAX)
> - return -TARGET_EINVAL;
> + return -TARGET_EINVAL;
> seg_32bit = ldt_info.flags & 1;
> contents = (ldt_info.flags >> 1) & 3;
> read_exec_only = (ldt_info.flags >> 3) & 1;
Doesn't checkpatch complain about not having braces on this if ?
Either way
Reviewed-by: Peter Maydell <address@hidden>
-- PMM
- [PATCH v1 54/59] ivshmem-server/main.c: remove unneeded label in main(), (continued)
- [PATCH v1 54/59] ivshmem-server/main.c: remove unneeded label in main(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 55/59] linux-user/flatload.c: remove unused 'out' label, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 32/59] qemu-img.c: remove 'out4' label in img_compare, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 36/59] ipmi/ipmi_kcs.c: remove unneeded label in ipmi_kcs_handle_event, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 42/59] i386/intel_iommu.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 46/59] alpha/typhoon.c: remove unneeded label in typhoon_translate_iommu(), 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 56/59] linux-user/signal.c: remove unneeded label in do_sigaltstack(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 57/59] linux-user/syscall.c: fix trailing whitespaces and style, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 58/59] linux-user/syscall.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 59/59] linux-user/vm86.c: remove unneeded label in do_vm86(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 05/59] ram.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 14/59] block/file-posix.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 25/59] block/vhdx.c: remove unneeded 'exit' labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 29/59] cryptodev-vhost.c: remove unneeded 'err' label in cryptodev_vhost_start, Daniel Henrique Barboza, 2020/01/06