[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 15/24] bsd-user: Fix commentary issues
From: |
Peter Maydell |
Subject: |
Re: [PULL 15/24] bsd-user: Fix commentary issues |
Date: |
Mon, 26 Apr 2021 10:12:42 +0100 |
On Mon, 26 Apr 2021 at 10:01, Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Fri, Apr 23, 2021 at 02:39:50PM -0600, imp@bsdimp.com wrote:
> > -#define TARGET_FREEBSD_MAP_RESERVED0080 0x0080 /* previously
> > misimplemented MAP_INHERIT */
> > -#define TARGET_FREEBSD_MAP_RESERVED0100 0x0100 /* previously
> > unimplemented MAP_NOEXTEND */
> > -#define TARGET_FREEBSD_MAP_STACK 0x0400 /* region grows down, like
> > a stack */
> > -#define TARGET_FREEBSD_MAP_NOSYNC 0x0800 /* page to but do not sync
> > underlying file */
> > +#define TARGET_FREEBSD_MAP_RESERVED0080 0x0080
> > + /* previously misimplemented MAP_INHERIT
> > */
> > +#define TARGET_FREEBSD_MAP_RESERVED0100 0x0100
> > + /* previously unimplemented MAP_NOEXTEND
> > */
> > +#define TARGET_FREEBSD_MAP_STACK 0x0400
> > + /* region grows down, like a stack */
> > +#define TARGET_FREEBSD_MAP_NOSYNC 0x0800
> > + /* page to but do not sync underlying
> > file */
>
> I find this indented following comment style more ambiguous as to
> what constant the comment applies to. IMHO would be clearer as
>
> /* previously misimplemented MAP_INHERIT */
> #define TARGET_FREEBSD_MAP_RESERVED0080 0x0080
>
> /* previously unimplemented MAP_NOEXTEND */
> #define TARGET_FREEBSD_MAP_RESERVED0100 0x0100
>
> /* region grows down, like a stack */
> #define TARGET_FREEBSD_MAP_STACK 0x0400
>
> /* page to but do not sync underlying file */
> #define TARGET_FREEBSD_MAP_NOSYNC 0x0800
Or alternatively decide that this is one of those cases where the coding
style's "If wrapping the line at 80 columns is obviously less readable and
more awkward, prefer not to wrap it" advice applies. The lines as they stand
are only 95 characters or so long.
thanks
-- PMM
- Re: [PULL 11/24] bsd-user: style tweak: if 0 -> ifdef notyet for code needed in future, (continued)
[PULL 12/24] bsd-user: style tweak: if 0 -> ifdef notyet for code needed in future, imp, 2021/04/23
[PULL 20/24] bsd-user: introduce host_os.h for bsd-specific code and defaults, imp, 2021/04/23
[PULL 13/24] bsd-user: style tweak: if 0 -> ifdef notyet for code needed in future, imp, 2021/04/23
[PULL 14/24] bsd-user: style tweak: if 0 -> ifdef notyet for code needed in future, imp, 2021/04/23
[PULL 15/24] bsd-user: Fix commentary issues, imp, 2021/04/23
[PULL 19/24] bsd-user: use qemu_strtol in preference to strtol, imp, 2021/04/23
[PULL 16/24] bsd-user: Use preferred block comments, imp, 2021/04/23
[PULL 18/24] bsd-user: style changes for {}, imp, 2021/04/23
[PULL 22/24] bsd-user: create target_arch_cpu.h, imp, 2021/04/23