qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Daniel Henrique Barboza <danielhb413@gmail.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Riku Voipio <riku.voipio@iki.fi>,
	Laurent Vivier <laurent@vivier.eu>
Subject: Re: [PATCH v1 57/59] linux-user/syscall.c: fix trailing whitespaces and style
Date: Tue, 7 Jan 2020 07:57:39 +0100	[thread overview]
Message-ID: <bb5a46dc-d19f-85a7-05b7-d6e4931affb2@redhat.com> (raw)
In-Reply-To: <20200106182425.20312-58-danielhb413@gmail.com>

On 1/6/20 7:24 PM, Daniel Henrique Barboza wrote:
> There are trailing whitespaces in this file that, if removed
> by a text editor that refuses to let the traiing whitespace

typo "trailing"

> 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.

Maybe you can use 'git add -p' to only add the lines with relevant changes.

> 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.
> 
> CC: Riku Voipio <riku.voipio@iki.fi>
> CC: Laurent Vivier <laurent@vivier.eu>
> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> ---
>   linux-user/syscall.c | 30 +++++++++++++++++-------------
>   1 file changed, 17 insertions(+), 13 deletions(-)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 171c0caef3..49c6151c2d 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -1062,7 +1062,7 @@ static inline rlim_t target_to_host_rlim(abi_ulong target_rlim)
>   {
>       abi_ulong target_rlim_swap;
>       rlim_t result;
> -
> +
>       target_rlim_swap = tswapal(target_rlim);
>       if (target_rlim_swap == TARGET_RLIM_INFINITY)
>           return RLIM_INFINITY;
> @@ -1070,7 +1070,7 @@ static inline rlim_t target_to_host_rlim(abi_ulong target_rlim)
>       result = target_rlim_swap;
>       if (target_rlim_swap != (rlim_t)result)
>           return RLIM_INFINITY;
> -
> +
>       return result;
>   }
>   
> @@ -1078,13 +1078,13 @@ static inline abi_ulong host_to_target_rlim(rlim_t rlim)
>   {
>       abi_ulong target_rlim_swap;
>       abi_ulong result;
> -
> +
>       if (rlim == RLIM_INFINITY || rlim != (abi_long)rlim)
>           target_rlim_swap = TARGET_RLIM_INFINITY;
>       else
>           target_rlim_swap = rlim;
>       result = tswapal(target_rlim_swap);
> -
> +
>       return result;
>   }
>   
> @@ -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;
> @@ -5670,7 +5672,7 @@ static abi_long do_get_thread_area(CPUX86State *env, abi_ulong ptr)
>       lp = (uint32_t *)(gdt_table + idx);
>       entry_1 = tswap32(lp[0]);
>       entry_2 = tswap32(lp[1]);
> -
> +
>       read_exec_only = ((entry_2 >> 9) & 1) ^ 1;
>       contents = (entry_2 >> 10) & 3;
>       seg_not_present = ((entry_2 >> 15) & 1) ^ 1;
> @@ -5686,8 +5688,8 @@ static abi_long do_get_thread_area(CPUX86State *env, abi_ulong ptr)
>           (read_exec_only << 3) | (limit_in_pages << 4) |
>           (seg_not_present << 5) | (useable << 6) | (lm << 7);
>       limit = (entry_1 & 0xffff) | (entry_2  & 0xf0000);
> -    base_addr = (entry_1 >> 16) |
> -        (entry_2 & 0xff000000) |
> +    base_addr = (entry_1 >> 16) |
> +        (entry_2 & 0xff000000) |
>           ((entry_2 & 0xff) << 16);
>       target_ldt_info->base_addr = tswapal(base_addr);
>       target_ldt_info->limit = tswap32(limit);
> @@ -10554,8 +10556,10 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
>           return get_errno(fchown(arg1, low2highuid(arg2), low2highgid(arg3)));
>   #if defined(TARGET_NR_fchownat)
>       case TARGET_NR_fchownat:
> -        if (!(p = lock_user_string(arg2)))
> +        p = lock_user_string(arg2);
> +        if (!p) {
>               return -TARGET_EFAULT;
> +        }
>           ret = get_errno(fchownat(arg1, p, low2highuid(arg3),
>                                    low2highgid(arg4), arg5));
>           unlock_user(p, arg2, 0);
> 



  reply	other threads:[~2020-01-07  7:09 UTC|newest]

Thread overview: 113+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 18:23 [PATCH v1 00/59] trivial unneeded labels cleanup Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 01/59] spapr.c: remove 'out' label in spapr_dt_cas_updates() Daniel Henrique Barboza
2020-01-06 23:44   ` David Gibson
2020-01-06 18:23 ` [PATCH v1 02/59] ppc440_bamboo.c: remove label from bamboo_load_device_tree() Daniel Henrique Barboza
2020-01-06 23:45   ` David Gibson
2020-01-06 18:23 ` [PATCH v1 03/59] kvm-all.c: remove unneeded labels Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 04/59] paaudio.c: " Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 05/59] ram.c: " Daniel Henrique Barboza
2020-01-06 18:57   ` Dr. David Alan Gilbert
2020-01-06 23:38   ` Juan Quintela
2020-01-08 12:41   ` Juan Quintela
2020-01-06 18:23 ` [PATCH v1 06/59] mips-semi.c: remove 'uhi_done' label in helper_do_semihosting() Daniel Henrique Barboza
2020-01-09 20:41   ` Aleksandar Markovic
2020-01-24 17:22   ` Aleksandar Markovic
2020-01-06 18:23 ` [PATCH v1 07/59] unicore32/softmmu.c: remove 'do_fault' label in get_phys_addr_ucv2() Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 08/59] chardev/char-mux.c: remove 'send_char' label Daniel Henrique Barboza
2020-01-06 19:02   ` Marc-André Lureau
2020-01-06 18:23 ` [PATCH v1 09/59] chardev/char-pipe.c: remove 'fail' label in win_chr_pipe_init() Daniel Henrique Barboza
2020-01-06 19:01   ` Marc-André Lureau
2020-01-06 18:23 ` [PATCH v1 10/59] chardev/char-win.c: remove 'fail' label in win_chr_serial_init() Daniel Henrique Barboza
2020-01-06 19:01   ` Marc-André Lureau
2020-01-07  6:52   ` Philippe Mathieu-Daudé
2020-01-06 18:23 ` [PATCH v1 11/59] exec.c: remove 'err' label in ram_block_discard_range() Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 12/59] virtfs-proxy-helper.c: remove 'err_out' label in setugid() Daniel Henrique Barboza
2020-01-07  9:51   ` Greg Kurz
2020-01-13 15:15     ` Markus Armbruster
2020-01-13 16:32       ` Laurent Vivier
2020-01-13 19:56         ` Greg Kurz
2020-01-14  7:55         ` Markus Armbruster
2020-01-06 18:23 ` [PATCH v1 13/59] block/vdi.c: remove 'fail' label in vdi_open() Daniel Henrique Barboza
2020-01-06 21:04   ` Stefan Weil
2020-01-06 18:23 ` [PATCH v1 14/59] block/file-posix.c: remove unneeded labels Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 15/59] block/blkreplay.c: remove unneeded 'fail' label in blkreplay_open() Daniel Henrique Barboza
2020-01-10  6:07   ` Pavel Dovgalyuk
2020-01-06 18:23 ` [PATCH v1 16/59] block/gluster.c: remove unneeded 'exit' label Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 17/59] block/dmg.c: remove unneeded 'fail' label in dmg_read_mish_block() Daniel Henrique Barboza
2020-01-07 16:54   ` Stefan Hajnoczi
2020-01-06 18:23 ` [PATCH v1 18/59] qcow2-refcount.c: remove unneeded 'fail' label in qcow2_refcount_init() Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 19/59] block/ssh.c: remove unneeded labels Daniel Henrique Barboza
2020-01-06 18:37   ` Richard W.M. Jones
2020-01-06 18:23 ` [PATCH v1 20/59] block/vpc.c: remove unneeded 'fail' label in create_dynamic_disk() Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 21/59] block/backup.c remove unneeded 'out' label in backup_run() Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 22/59] block/vmdk.c: remove unneeded labels Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 23/59] block/vxhs.c: remove unneeded 'out' label in vxhs_iio_callback() Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 24/59] block/vhdx-log.c: remove unneeded labels Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 25/59] block/vhdx.c: remove unneeded 'exit' labels Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 26/59] block/replication.c: remove unneeded label in replication_co_writev Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 27/59] crypto/block-luks.c: remove unneeded label in qcrypto_block_luks_find_key Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 28/59] qga/commands-win32.c: remove 'out' label in get_pci_info Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 29/59] cryptodev-vhost.c: remove unneeded 'err' label in cryptodev_vhost_start Daniel Henrique Barboza
2020-01-07  6:53   ` Philippe Mathieu-Daudé
2020-01-07  8:18   ` Gonglei (Arei)
2020-01-06 18:23 ` [PATCH v1 30/59] util/module.c: remove unneeded label in module_load_file() Daniel Henrique Barboza
2020-01-07 11:26   ` Thomas Huth
2020-01-06 18:23 ` [PATCH v1 31/59] util/aio-posix.c: remove unneeded 'out' label in aio_epoll Daniel Henrique Barboza
2020-01-07 13:34   ` Thomas Huth
2020-01-06 18:23 ` [PATCH v1 32/59] qemu-img.c: remove 'out4' label in img_compare Daniel Henrique Barboza
2020-01-06 18:23 ` [PATCH v1 33/59] ipmi/ipmi_bmc_sim.c: remove unneeded labels Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 34/59] ipmi/ipmi_bt.c: remove unneeded label in ipmi_bt_handle_event Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 35/59] ipmi_bmc_extern.c: remove unneeded label in ipmi_bmc_extern_handle_command Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 36/59] ipmi/ipmi_kcs.c: remove unneeded label in ipmi_kcs_handle_event Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 37/59] s390x/event-facility.c: remove unneeded labels Daniel Henrique Barboza
2020-01-07 13:36   ` Thomas Huth
2020-01-08 12:46   ` Cornelia Huck
2020-01-08 14:15     ` Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 38/59] s390x/sclp.c: remove unneeded label in sclp_service_call() Daniel Henrique Barboza
2020-01-07 13:37   ` Thomas Huth
2020-01-08 13:16   ` Cornelia Huck
2020-01-06 18:24 ` [PATCH v1 39/59] usb/dev-mtp.c: remove unneeded label in write_retry() Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 40/59] hsb/hcd-ehci.c: remove unneeded labels Daniel Henrique Barboza
2020-01-13 15:17   ` Markus Armbruster
2020-01-06 18:24 ` [PATCH v1 41/59] intc/s390_flic_kvm.c: remove unneeded label in kvm_flic_load() Daniel Henrique Barboza
2020-01-08 13:00   ` Cornelia Huck
2020-01-13 16:51     ` Cornelia Huck
2020-01-13 16:06   ` Thomas Huth
2020-01-06 18:24 ` [PATCH v1 42/59] i386/intel_iommu.c: remove unneeded labels Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 43/59] i386/amd_iommu.c: remove unneeded label in amdvi_int_remap_msi() Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 44/59] 9p-local.c: remove unneeded label in local_unlinkat_common() Daniel Henrique Barboza
2020-01-07 12:04   ` Christian Schoenebeck
2020-01-07 13:58     ` Greg Kurz
2020-01-07 13:53   ` Greg Kurz
2020-01-07 14:16     ` Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 45/59] 9pfs/9p.c: remove unneeded labels Daniel Henrique Barboza
2020-01-07 12:14   ` Christian Schoenebeck
2020-01-08 14:08     ` Greg Kurz
2020-01-06 18:24 ` [PATCH v1 46/59] alpha/typhoon.c: remove unneeded label in typhoon_translate_iommu() Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 47/59] pvrdma_main.c: remove unneeded labels Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 48/59] pvrdma_dev_ring.c: remove unneeded label in pvrdma_ring_init() Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 49/59] rdma/rdma_rm.c: remove unneeded label in rdma_rm_alloc_pd() Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 50/59] rdma/rdma_backend.c: remove unneeded label in rdma_backend_init() Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 51/59] virtio/vhost.c: remove unneeded labels Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 52/59] net/vhost_net.c: " Daniel Henrique Barboza
2020-01-06 18:24 ` [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 18:24 ` [PATCH v1 54/59] ivshmem-server/main.c: remove unneeded label in main() Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 55/59] linux-user/flatload.c: remove unused 'out' label Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 56/59] linux-user/signal.c: remove unneeded label in do_sigaltstack() Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 57/59] linux-user/syscall.c: fix trailing whitespaces and style Daniel Henrique Barboza
2020-01-07  6:57   ` Philippe Mathieu-Daudé [this message]
2020-01-07 10:37   ` Peter Maydell
2020-01-06 18:24 ` [PATCH v1 58/59] linux-user/syscall.c: remove unneeded labels Daniel Henrique Barboza
2020-01-06 18:24 ` [PATCH v1 59/59] linux-user/vm86.c: remove unneeded label in do_vm86() Daniel Henrique Barboza
2020-01-06 19:54 ` [PATCH v1 00/59] trivial unneeded labels cleanup Corey Minyard
2020-01-06 20:35   ` Daniel Henrique Barboza
2020-01-07  6:16     ` Kevin Wolf
2020-01-07  7:06       ` Philippe Mathieu-Daudé
2020-01-09 19:19         ` Daniel Henrique Barboza
2020-01-07 11:52       ` Daniel Henrique Barboza
2020-01-07 12:21         ` Kevin Wolf
2020-01-13 15:26   ` Markus Armbruster
2020-01-07  9:43 ` Max Reitz
2020-01-09 20:16   ` Daniel Henrique Barboza
2020-01-10 19:05 ` Eric Blake
2020-01-10 20:31   ` Daniel Henrique Barboza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb5a46dc-d19f-85a7-05b7-d6e4931affb2@redhat.com \
    --to=philmd@redhat.com \
    --cc=danielhb413@gmail.com \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).