[PATCH] pc: comment stule fixup

Michael S. Tsirkin posted 1 patch 3 years, 6 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201102100948.1101121-1-mst@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <rth@twiddle.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
hw/i386/pc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[PATCH] pc: comment stule fixup
Posted by Michael S. Tsirkin 3 years, 6 months ago
Fix up checkpatch comment style warnings.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/i386/pc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 416fb0e0f6..5872ae6095 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1150,9 +1150,9 @@ void pc_basic_device_init(struct PCMachineState *pcms,
             exit(1);
         }
         /* For pc-piix-*, hpet's intcap is always IRQ2. For pc-q35-1.7
-            * and earlier, use IRQ2 for compat. Otherwise, use IRQ16~23,
-            * IRQ8 and IRQ2.
-            */
+         * and earlier, use IRQ2 for compat. Otherwise, use IRQ16~23,
+         * IRQ8 and IRQ2.
+         */
         uint8_t compat = object_property_get_uint(OBJECT(hpet),
                 HPET_INTCAP, NULL);
         if (!compat) {
-- 
MST


Re: [PATCH] pc: comment stule fixup
Posted by Philippe Mathieu-Daudé 3 years, 6 months ago
On 11/2/20 11:09 AM, Michael S. Tsirkin wrote:
> Fix up checkpatch comment style warnings.

Typo stule -> style in subject ;)

> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  hw/i386/pc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 416fb0e0f6..5872ae6095 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1150,9 +1150,9 @@ void pc_basic_device_init(struct PCMachineState *pcms,
>              exit(1);
>          }
>          /* For pc-piix-*, hpet's intcap is always IRQ2. For pc-q35-1.7

Since it needs a respin, maybe convert the 1st line too?

> -            * and earlier, use IRQ2 for compat. Otherwise, use IRQ16~23,
> -            * IRQ8 and IRQ2.
> -            */
> +         * and earlier, use IRQ2 for compat. Otherwise, use IRQ16~23,
> +         * IRQ8 and IRQ2.
> +         */
>          uint8_t compat = object_property_get_uint(OBJECT(hpet),
>                  HPET_INTCAP, NULL);
>          if (!compat) {
> 


Re: [PATCH] pc: comment stule fixup
Posted by Markus Armbruster 3 years, 6 months ago
"Michael S. Tsirkin" <mst@redhat.com> writes:

> Fix up checkpatch comment style warnings.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  hw/i386/pc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 416fb0e0f6..5872ae6095 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1150,9 +1150,9 @@ void pc_basic_device_init(struct PCMachineState *pcms,
>              exit(1);
>          }
>          /* For pc-piix-*, hpet's intcap is always IRQ2. For pc-q35-1.7
> -            * and earlier, use IRQ2 for compat. Otherwise, use IRQ16~23,
> -            * IRQ8 and IRQ2.
> -            */
> +         * and earlier, use IRQ2 for compat. Otherwise, use IRQ16~23,
> +         * IRQ8 and IRQ2.
> +         */
>          uint8_t compat = object_property_get_uint(OBJECT(hpet),
>                  HPET_INTCAP, NULL);
>          if (!compat) {

Since you're touching this already...

CODING_STYLE.rst:

    Multiline comment blocks should have a row of stars on the left,
    and the initial /``*`` and terminating ``*``/ both on their own lines:

    .. code-block:: c

        /*
         * like
         * this
         */