diff mbox series

[kvm-unit-tests,v1,02/10] powerpc: properly format non-kernel-doc comments

Message ID 20231106125352.859992-3-nrb@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series RFC: Add clang-format and kerneldoc check | expand

Commit Message

Nico Boehr Nov. 6, 2023, 12:50 p.m. UTC
These comments do not follow the kernel-doc style, hence they should not
start with /**.

Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
---
 powerpc/emulator.c    | 2 +-
 powerpc/spapr_hcall.c | 6 +++---
 powerpc/spapr_vpa.c   | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

Comments

Claudio Imbrenda Nov. 6, 2023, 4:53 p.m. UTC | #1
On Mon,  6 Nov 2023 13:50:58 +0100
Nico Boehr <nrb@linux.ibm.com> wrote:

> These comments do not follow the kernel-doc style, hence they should not
> start with /**.
> 
> Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
> ---
>  powerpc/emulator.c    | 2 +-
>  powerpc/spapr_hcall.c | 6 +++---
>  powerpc/spapr_vpa.c   | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/powerpc/emulator.c b/powerpc/emulator.c
> index 65ae4b65e655..39dd59645368 100644
> --- a/powerpc/emulator.c
> +++ b/powerpc/emulator.c
> @@ -71,7 +71,7 @@ static void test_64bit(void)
>  	report_prefix_pop();
>  }
>  
> -/**
> +/*
>   * Test 'Load String Word Immediate' instruction
>   */

this should have the name of the function first: 
 * test_lswi() - Test 'Load String ... 

(same for all the other functions here)

>  static void test_lswi(void)
> diff --git a/powerpc/spapr_hcall.c b/powerpc/spapr_hcall.c
> index 0d0f25afe9f6..e9b5300a3912 100644
> --- a/powerpc/spapr_hcall.c
> +++ b/powerpc/spapr_hcall.c
> @@ -16,7 +16,7 @@
>  #define H_ZERO_PAGE	(1UL << (63-48))
>  #define H_COPY_PAGE	(1UL << (63-49))
>  
> -/**
> +/*
>   * Test the H_SET_SPRG0 h-call by setting some values and checking whether
>   * the SPRG0 register contains the correct values afterwards
>   */
> @@ -46,7 +46,7 @@ static void test_h_set_sprg0(int argc, char **argv)
>  	       sprg0_orig);
>  }
>  
> -/**
> +/*
>   * Test the H_PAGE_INIT h-call by using it to clear and to copy a page, and
>   * by checking for the correct values in the destination page afterwards
>   */
> @@ -97,7 +97,7 @@ static int h_random(uint64_t *val)
>  	return r3;
>  }
>  
> -/**
> +/*
>   * Test H_RANDOM by calling it a couple of times to check whether all bit
>   * positions really toggle (there should be no "stuck" bits in the output)
>   */
> diff --git a/powerpc/spapr_vpa.c b/powerpc/spapr_vpa.c
> index 5586eb8d3341..6a3fe5e3f974 100644
> --- a/powerpc/spapr_vpa.c
> +++ b/powerpc/spapr_vpa.c
> @@ -53,7 +53,7 @@ static void print_vpa(struct vpa *vpa)
>  #define SUBFUNC_REGISTER	(1ULL << 45)
>  #define SUBFUNC_DEREGISTER	(5ULL << 45)
>  
> -/**
> +/*
>   * Test the H_REGISTER_VPA h-call register/deregister calls.
>   */
>  static void test_register_vpa(void)
> @@ -111,7 +111,7 @@ static void test_register_vpa(void)
>  	report_prefix_pop();
>  }
>  
> -/**
> +/*
>   * Test some VPA fields.
>   */
>  static void test_vpa(void)
Nico Boehr Nov. 6, 2023, 5:13 p.m. UTC | #2
Quoting Claudio Imbrenda (2023-11-06 17:53:16)
> On Mon,  6 Nov 2023 13:50:58 +0100
> Nico Boehr <nrb@linux.ibm.com> wrote:
> 
> > These comments do not follow the kernel-doc style, hence they should not
> > start with /**.
> > 
> > Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
> > ---
> >  powerpc/emulator.c    | 2 +-
> >  powerpc/spapr_hcall.c | 6 +++---
> >  powerpc/spapr_vpa.c   | 4 ++--
> >  3 files changed, 6 insertions(+), 6 deletions(-)
> > 
> > diff --git a/powerpc/emulator.c b/powerpc/emulator.c
> > index 65ae4b65e655..39dd59645368 100644
> > --- a/powerpc/emulator.c
> > +++ b/powerpc/emulator.c
> > @@ -71,7 +71,7 @@ static void test_64bit(void)
> >       report_prefix_pop();
> >  }
> >  
> > -/**
> > +/*
> >   * Test 'Load String Word Immediate' instruction
> >   */
> 
> this should have the name of the function first: 
>  * test_lswi() - Test 'Load String ... 
> 
> (same for all the other functions here)

Since none of these comments really follow kerneldoc style and are mostly
static anyways, the idea was to convert them to non-kerneldoc style, by
changing the comment from:
/**

to:
/*

But I am just as fine to make the comments proper kerneldoc style, if we
see value in that.
Thomas Huth Nov. 7, 2023, 8:37 a.m. UTC | #3
On 06/11/2023 18.13, Nico Boehr wrote:
> Quoting Claudio Imbrenda (2023-11-06 17:53:16)
>> On Mon,  6 Nov 2023 13:50:58 +0100
>> Nico Boehr <nrb@linux.ibm.com> wrote:
>>
>>> These comments do not follow the kernel-doc style, hence they should not
>>> start with /**.
>>>
>>> Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
>>> ---
>>>   powerpc/emulator.c    | 2 +-
>>>   powerpc/spapr_hcall.c | 6 +++---
>>>   powerpc/spapr_vpa.c   | 4 ++--
>>>   3 files changed, 6 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/powerpc/emulator.c b/powerpc/emulator.c
>>> index 65ae4b65e655..39dd59645368 100644
>>> --- a/powerpc/emulator.c
>>> +++ b/powerpc/emulator.c
>>> @@ -71,7 +71,7 @@ static void test_64bit(void)
>>>        report_prefix_pop();
>>>   }
>>>   
>>> -/**
>>> +/*
>>>    * Test 'Load String Word Immediate' instruction
>>>    */
>>
>> this should have the name of the function first:
>>   * test_lswi() - Test 'Load String ...
>>
>> (same for all the other functions here)
> 
> Since none of these comments really follow kerneldoc style and are mostly
> static anyways, the idea was to convert them to non-kerneldoc style, by
> changing the comment from:
> /**
> 
> to:
> /*
> 
> But I am just as fine to make the comments proper kerneldoc style, if we
> see value in that.

I think it makes sense to do that for the files in the lib/ folder ... for 
the other ones, I think it is not really necessary (but it wouldn't hurt 
either).

  Thomas
Claudio Imbrenda Nov. 7, 2023, 6:42 p.m. UTC | #4
On Mon, 06 Nov 2023 18:13:37 +0100
Nico Boehr <nrb@linux.ibm.com> wrote:

> Quoting Claudio Imbrenda (2023-11-06 17:53:16)
> > On Mon,  6 Nov 2023 13:50:58 +0100
> > Nico Boehr <nrb@linux.ibm.com> wrote:
> >   
> > > These comments do not follow the kernel-doc style, hence they should not
> > > start with /**.
> > > 
> > > Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
> > > ---
> > >  powerpc/emulator.c    | 2 +-
> > >  powerpc/spapr_hcall.c | 6 +++---
> > >  powerpc/spapr_vpa.c   | 4 ++--
> > >  3 files changed, 6 insertions(+), 6 deletions(-)
> > > 
> > > diff --git a/powerpc/emulator.c b/powerpc/emulator.c
> > > index 65ae4b65e655..39dd59645368 100644
> > > --- a/powerpc/emulator.c
> > > +++ b/powerpc/emulator.c
> > > @@ -71,7 +71,7 @@ static void test_64bit(void)
> > >       report_prefix_pop();
> > >  }
> > >  
> > > -/**
> > > +/*
> > >   * Test 'Load String Word Immediate' instruction
> > >   */  
> > 
> > this should have the name of the function first: 
> >  * test_lswi() - Test 'Load String ... 
> > 
> > (same for all the other functions here)  
> 
> Since none of these comments really follow kerneldoc style and are mostly
> static anyways, the idea was to convert them to non-kerneldoc style, by
> changing the comment from:
> /**
> 
> to:
> /*
> 
> But I am just as fine to make the comments proper kerneldoc style, if we
> see value in that.

oufff yes sorry I had totally misread that
Thomas Huth Nov. 22, 2023, 12:28 p.m. UTC | #5
On 06/11/2023 13.50, Nico Boehr wrote:
> These comments do not follow the kernel-doc style, hence they should not
> start with /**.
> 
> Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
> ---
>   powerpc/emulator.c    | 2 +-
>   powerpc/spapr_hcall.c | 6 +++---
>   powerpc/spapr_vpa.c   | 4 ++--
>   3 files changed, 6 insertions(+), 6 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/powerpc/emulator.c b/powerpc/emulator.c
index 65ae4b65e655..39dd59645368 100644
--- a/powerpc/emulator.c
+++ b/powerpc/emulator.c
@@ -71,7 +71,7 @@  static void test_64bit(void)
 	report_prefix_pop();
 }
 
-/**
+/*
  * Test 'Load String Word Immediate' instruction
  */
 static void test_lswi(void)
diff --git a/powerpc/spapr_hcall.c b/powerpc/spapr_hcall.c
index 0d0f25afe9f6..e9b5300a3912 100644
--- a/powerpc/spapr_hcall.c
+++ b/powerpc/spapr_hcall.c
@@ -16,7 +16,7 @@ 
 #define H_ZERO_PAGE	(1UL << (63-48))
 #define H_COPY_PAGE	(1UL << (63-49))
 
-/**
+/*
  * Test the H_SET_SPRG0 h-call by setting some values and checking whether
  * the SPRG0 register contains the correct values afterwards
  */
@@ -46,7 +46,7 @@  static void test_h_set_sprg0(int argc, char **argv)
 	       sprg0_orig);
 }
 
-/**
+/*
  * Test the H_PAGE_INIT h-call by using it to clear and to copy a page, and
  * by checking for the correct values in the destination page afterwards
  */
@@ -97,7 +97,7 @@  static int h_random(uint64_t *val)
 	return r3;
 }
 
-/**
+/*
  * Test H_RANDOM by calling it a couple of times to check whether all bit
  * positions really toggle (there should be no "stuck" bits in the output)
  */
diff --git a/powerpc/spapr_vpa.c b/powerpc/spapr_vpa.c
index 5586eb8d3341..6a3fe5e3f974 100644
--- a/powerpc/spapr_vpa.c
+++ b/powerpc/spapr_vpa.c
@@ -53,7 +53,7 @@  static void print_vpa(struct vpa *vpa)
 #define SUBFUNC_REGISTER	(1ULL << 45)
 #define SUBFUNC_DEREGISTER	(5ULL << 45)
 
-/**
+/*
  * Test the H_REGISTER_VPA h-call register/deregister calls.
  */
 static void test_register_vpa(void)
@@ -111,7 +111,7 @@  static void test_register_vpa(void)
 	report_prefix_pop();
 }
 
-/**
+/*
  * Test some VPA fields.
  */
 static void test_vpa(void)