qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]