All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viktor Mitin <viktor.mitin.19@gmail.com>
To: Julien Grall <julien.grall@arm.com>,
	Lars Kurth <lars.kurth.xen@gmail.com>,
	Artem Mygaiev <Artem_Mygaiev@epam.com>
Cc: Tamas K Lengyel <tamas@tklengyel.com>, Wei Liu <wl@xen.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Jan Beulich <jbeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] [RFC] xen: Add .astylerc for automated style-formatting
Date: Mon, 29 Jul 2019 10:20:56 +0300	[thread overview]
Message-ID: <CAOcoXZbtYtTHMjmz7H1V6WmTAhX3UmdLP3M1dTF8hgrPMpvpww@mail.gmail.com> (raw)
In-Reply-To: <6b2e18cb-d02a-be2a-74b3-bf9443d9d0eb@arm.com>

On Fri, Jul 26, 2019 at 6:54 PM Julien Grall <julien.grall@arm.com> wrote:
>
>
>
> On 26/07/2019 16:48, Viktor Mitin wrote:
> > Hi All,
> >
> > On Thu, Jul 18, 2019 at 5:45 PM Tamas K Lengyel <tamas@tklengyel.com> wrote:
> >
> >> Checking the comment styles are not included in the automation.
> >
> > The same about clang-format. Checking the comment styles is not supported.
> > It seems this is not code format checker task to parse and modify the
> > code comments...
>
> Are you sure about your statement? Looking at the diff you provided [1],
> clang-format is clearly trying to alter the comments.
>
> But comments flow are equally important as the code. This is part of the coding
> style afterall.
>
> [1]
> https://raw.githubusercontent.com/viktor-mitin/xen-clang-format-example/master/0001-clang-format-checkpatch-output-example.patch

Clang-format supports only basic indentation of C89 comments.

--- a/xen/arch/arm/arm64/livepatch.c
+++ b/xen/arch/arm/arm64/livepatch.c
@@ -51,15 +51,15 @@ void arch_livepatch_apply(struct livepatch_func *func)
         *(new_ptr + i) = insn;

     /*
-    * When we upload the payload, it will go through the data cache
-    * (the region is cacheable). Until the data cache is cleaned, the data
-    * may not reach the memory. And in the case the data and instruction cache
-    * are separated, we may read invalid instruction from the memory because
-    * the data cache have not yet synced with the memory. Hence sync it.
-    */
+     * When we upload the payload, it will go through the data cache
+     * (the region is cacheable). Until the data cache is cleaned, the data
+     * may not reach the memory. And in the case the data and instruction cache
+     * are separated, we may read invalid instruction from the memory because
+     * the data cache have not yet synced with the memory. Hence sync it.
+     */

So it addresses Xen Coding Style requirements partially:

From CODING_STYLE:
"
Multi-line comment blocks should start and end with comment markers on
separate lines and each line should begin with a leading '*'.

/*
 * Example, multi-line comment block.
 *
 * Note beginning and end markers on separate lines and leading '*'.
 */
"

However, the next comments rules are not supported for now and can be
added into implementation later.

From CODING_STYLE:
"
Only C style /* ... */ comments are to be used.  C++ style // comments
should not be used.  Multi-word comments should begin with a capital
letter.  Comments containing a single sentence may end with a full
stop; comments containing several sentences must have a full stop
after each sentence.
"

BTW, is there an actual reason not to support C99 comments ( // ) ?

Thanks

>
> >
> > Thanks
> >
>
> --
> Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

      reply	other threads:[~2019-07-29  7:21 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-18 14:43 [Xen-devel] [RFC] xen: Add .astylerc for automated style-formatting Tamas K Lengyel
2019-07-18 15:02 ` Julien Grall
2019-07-18 15:14   ` Tamas K Lengyel
2019-07-18 15:42     ` Julien Grall
2019-07-18 17:18       ` Tamas K Lengyel
2019-07-19  8:26         ` Julien Grall
2019-07-18 17:22       ` Tamas K Lengyel
2019-07-19  8:35         ` Julien Grall
2019-07-26 14:58           ` Viktor Mitin
2019-07-26 15:12             ` Julien Grall
2019-07-26 15:23               ` Tamas K Lengyel
2019-07-29  7:31               ` Lars Kurth
2019-07-19  9:00         ` Jan Beulich
2019-07-19 13:10           ` Tamas K Lengyel
2019-07-26 14:52         ` Viktor Mitin
2019-07-18 17:25       ` Tamas K Lengyel
2019-07-18 17:32       ` Tamas K Lengyel
2019-07-18 17:38       ` Tamas K Lengyel
2019-07-18 17:48       ` Tamas K Lengyel
2019-07-19  8:43         ` Julien Grall
2019-07-19 13:00           ` Tamas K Lengyel
2019-07-19 13:11             ` Julien Grall
2019-07-19 13:14               ` Tamas K Lengyel
2019-07-19 13:24                 ` Julien Grall
2019-07-19 13:31                   ` Julien Grall
2019-07-19 13:50                     ` Rich Persaud
2019-07-19 14:47                       ` Julien Grall
2019-07-24 12:53                       ` Lars Kurth
2019-07-19 13:52                     ` Tamas K Lengyel
2019-07-26 14:54         ` Viktor Mitin
2019-07-26 14:49       ` Viktor Mitin
2019-07-26 14:57         ` Julien Grall
2019-07-29 12:19         ` Jan Beulich
2019-07-29 12:49           ` Julien Grall
2019-07-29 13:02             ` Jan Beulich
2019-07-31 16:20               ` Viktor Mitin
2019-08-01  7:37                 ` Jan Beulich
2019-08-01 12:16                   ` Viktor Mitin
2019-08-01 12:43                     ` Jan Beulich
2019-08-01 12:50                     ` Juergen Gross
2019-08-02  8:38                       ` Viktor Mitin
2019-08-02  9:23                         ` Juergen Gross
2019-08-02 11:44                           ` Viktor Mitin
2019-08-02 12:57                             ` Jan Beulich
2019-07-18 15:13 ` Jan Beulich
2019-07-18 15:16   ` Tamas K Lengyel
2019-07-26 14:42   ` Viktor Mitin
2019-07-26 14:50     ` Tamas K Lengyel
2019-07-18 17:58 ` Andrew Cooper
2019-07-18 18:34   ` Tamas K Lengyel
2019-07-19  9:03     ` Julien Grall
2019-07-19 13:05       ` Tamas K Lengyel
2019-07-19 13:34         ` Julien Grall
2019-07-19 13:36           ` Tamas K Lengyel
2019-07-19 13:26 ` Rich Persaud
2019-07-26 15:48 ` Viktor Mitin
2019-07-26 15:54   ` Julien Grall
2019-07-29  7:20     ` Viktor Mitin [this message]

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=CAOcoXZbtYtTHMjmz7H1V6WmTAhX3UmdLP3M1dTF8hgrPMpvpww@mail.gmail.com \
    --to=viktor.mitin.19@gmail.com \
    --cc=Artem_Mygaiev@epam.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=lars.kurth.xen@gmail.com \
    --cc=sstabellini@kernel.org \
    --cc=tamas@tklengyel.com \
    --cc=tim@xen.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.