[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 0/7] xen: xen-domid-restrict improvements
From: |
Ian Jackson |
Subject: |
Re: [Qemu-devel] [PATCH v2 0/7] xen: xen-domid-restrict improvements |
Date: |
Thu, 5 Oct 2017 12:09:21 +0100 |
address@hidden writes ("Re: [Qemu-devel] [PATCH v2 0/7] xen: xen-domid-restrict
improvements"):
> ERROR: consider using qemu_strtoul in preference to strtoul
> #42: FILE: os-posix.c:160:
> + lv = strtoul(optarg, &ep, 0); /* can't qemu_strtoul, want *ep=='.' */
>
> total: 1 errors, 0 warnings, 80 lines checked
>
> Your patch has style problems, please review. If any of these errors
> are false positives report them to the maintainer, see
> CHECKPATCH in MAINTAINERS.
As I said earlier, it is not clear to me what to do about this.
checkpatch's suggestion to use qemu_strtoul is appropriate. But,
qemu_strtoul isn't quite a 100% replacement for all strtoul use cases,
and this is one of the exceptions.
I have added this comment and you'll see in the patch that surrounding
that line there is attention paid to the error handling, overflows,
etc.
Maybe I should submit a patch to checkpatch that causes this
suggestion to go away if qemu_strtoul is mentioned "nearby" (maybe on
the same line or an adjacent line), so that the use of qemu_strtoul
rather thanraw strtoul has indeed been "considered" as the message
suggests ?
Regards,
Ian.
- [Qemu-devel] [PATCH v2 0/7] xen: xen-domid-restrict improvements, Ian Jackson, 2017/10/04
- [Qemu-devel] [PATCH 6/8] xen: destroy_hvm_domain: Try xendevicemodel_shutdown, Ian Jackson, 2017/10/04
- [Qemu-devel] [PATCH 3/8] xen: defer call to xen_restrict until after os_setup_post, Ian Jackson, 2017/10/04
- [Qemu-devel] [PATCH 2/8] xen: restrict: use xentoolcore_restrict_all, Ian Jackson, 2017/10/04
- [Qemu-devel] [PATCH 8/8] RFC configure: do_compiler: Dump some extra info under bash, Ian Jackson, 2017/10/04
- [Qemu-devel] [PATCH 1/8] xen: link against xentoolcore, Ian Jackson, 2017/10/04
- [Qemu-devel] [PATCH 5/8] xen: move xc_interface compatibility fallback further up the file, Ian Jackson, 2017/10/04
- [Qemu-devel] [PATCH 4/8] xen: destroy_hvm_domain: Move reason into a variable, Ian Jackson, 2017/10/04
- [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option, Ian Jackson, 2017/10/04
- Re: [Qemu-devel] [PATCH v2 0/7] xen: xen-domid-restrict improvements, no-reply, 2017/10/04
- Re: [Qemu-devel] [PATCH v2 0/7] xen: xen-domid-restrict improvements,
Ian Jackson <=