Skip to contentSkip to conversation

powerpc/ps3: repair some kernel-doc comments

PATCH In review Randy Dunlap 1 participant 6 messages Oct 29

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover powerpc/ps3: repair some kernel-doc comments

Patches 1 and 2 eliminate all kernel-doc warnings in their respective files.
Patches 3 and 4 target certain classes of kernel-doc warnings but don't eliminate all kernel-doc warnings in those files.

[PATCH 1/4] powerpc/ps3: platform.h: fix enum ps3_spu_resource_type kernel-doc [PATCH 2/4] powerpc/ps3: htab.c: fix enum ps3_lpar_vas_id kernel-doc [PATCH 3/4] powerpc/ps3: mm.c: clean up kernel-doc issues
[PATCH 4/4] powerpc/ps3: os-area.c: fix some kernel-doc warnings

 arch/powerpc/platforms/ps3/htab.c     |    4 ++--
 arch/powerpc/platforms/ps3/mm.c       |   10 +++++-----
 arch/powerpc/platforms/ps3/os-area.c  |    5 +++--
 arch/powerpc/platforms/ps3/platform.h |    7 ++++---
 4 files changed, 14 insertions(+), 12 deletions(-)
Cc Geoff Levand <[email protected]>
Cc Madhavan Srinivasan <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Christophe Leroy (CS GROUP) <[email protected]>
#1 lore raw

PATCH 1/4 powerpc/ps3: platform.h: fix enum ps3_spu_resource_type kernel-doc

Use the correct enum name and member names to eliminate kernel-doc warnings:

Warning: arch/powerpc/platforms/ps3/platform.h:240 expecting prototype for
enum spu_resource_type. Prototype was for enum ps3_spu_resource_type instead
Warning: arch/powerpc/platforms/ps3/platform.h:240 Enum value
'PS3_SPU_RESOURCE_TYPE_SHARED' not described in enum 'ps3_spu_resource_type'
Warning: arch/powerpc/platforms/ps3/platform.h:240 Enum value
'PS3_SPU_RESOURCE_TYPE_EXCLUSIVE' not described in enum 'ps3_spu_resource_type'
Warning: arch/powerpc/platforms/ps3/platform.h:240 Excess enum value
'@spu_resource_type_shared' description in 'ps3_spu_resource_type'
Warning: arch/powerpc/platforms/ps3/platform.h:240 Excess enum value
'@spu_resource_type_exclusive' description in 'ps3_spu_resource_type'

Also fix misspellings of "partitions."

---
Cc: Geoff Levand <[email protected]>
Cc: Madhavan Srinivasan <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Nicholas Piggin <[email protected]>
Cc: Christophe Leroy (CS GROUP) <[email protected]>
Cc: [email protected]

 arch/powerpc/platforms/ps3/platform.h |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
arch/powerpc/platforms/ps3/platform.h +4 -3
@@ -228,9 +228,10 @@ int ps3_repository_read_boot_dat_info(u6
 /* repository spu info */
 
 /**
- * enum spu_resource_type - Type of spu resource.
- * @spu_resource_type_shared: Logical spu is shared with other partions.
- * @spu_resource_type_exclusive: Logical spu is not shared with other partions.
+ * enum ps3_spu_resource_type - Type of spu resource.
+ * @PS3_SPU_RESOURCE_TYPE_SHARED: Logical spu is shared with other partitions.
+ * @PS3_SPU_RESOURCE_TYPE_EXCLUSIVE: Logical spu is not shared with other
+ * partitions.
  *
  * Returned by ps3_repository_read_spu_resource_id().
  */
#2 lore raw

PATCH 2/4 powerpc/ps3: htab.c: fix enum ps3_lpar_vas_id kernel-doc

In reply to Randy Dunlap

Use the correct enum name and member name to avoid kernel-doc warnings:

Warning: arch/powerpc/platforms/ps3/htab.c:28 expecting prototype for
enum lpar_vas_id. Prototype was for enum ps3_lpar_vas_id instead
Warning: arch/powerpc/platforms/ps3/htab.c:28 Enum value
'PS3_LPAR_VAS_ID_CURRENT' not described in enum 'ps3_lpar_vas_id'
Warning: arch/powerpc/platforms/ps3/htab.c:28 Excess enum value
'@lpar_vas_id_current' description in 'ps3_lpar_vas_id'

---
Cc: Geoff Levand <[email protected]>
Cc: Madhavan Srinivasan <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Nicholas Piggin <[email protected]>
Cc: Christophe Leroy (CS GROUP) <[email protected]>
Cc: [email protected]

 arch/powerpc/platforms/ps3/htab.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/platforms/ps3/htab.c +2 -2
@@ -18,8 +18,8 @@
 #include "platform.h"
 
 /**
- * enum lpar_vas_id - id of LPAR virtual address space.
- * @lpar_vas_id_current: Current selected virtual address space
+ * enum ps3_lpar_vas_id - id of LPAR virtual address space.
+ * @PS3_LPAR_VAS_ID_CURRENT: Current selected virtual address space
  *
  * Identify the target LPAR address space.
  */
#3 lore raw

PATCH 3/4 powerpc/ps3: mm.c: clean up kernel-doc issues

In reply to Randy Dunlap

Use the correct format for struct members and function parameters. Use the correct function names in kernel-doc comments. Use the correct format for function descriptions.

This eliminates these kernel-doc warnings:

Warning: arch/powerpc/platforms/ps3/mm.c:102 struct member 'vas_id' not
described in 'map'
Warning: arch/powerpc/platforms/ps3/mm.c:195 missing initial short
description on line: * ps3_mm_vas_destroy -
Warning: arch/powerpc/platforms/ps3/mm.c:514 function parameter 'c_out'
not described in 'dma_sb_map_pages'
Warning: arch/powerpc/platforms/ps3/mm.c:708 expecting prototype for
dma_region_free(). Prototype was for dma_sb_region_free() instead
Warning: arch/powerpc/platforms/ps3/mm.c:1092 expecting prototype for
dma_unmap_area_linear(). Prototype was for dma_sb_unmap_area_linear() instead

This leaves around 15 unrepaired kernel-doc warnings.

---
Cc: Geoff Levand <[email protected]>
Cc: Madhavan Srinivasan <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Nicholas Piggin <[email protected]>
Cc: Christophe Leroy (CS GROUP) <[email protected]>
Cc: [email protected]

 arch/powerpc/platforms/ps3/mm.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
arch/powerpc/platforms/ps3/mm.c +5 -5
@@ -79,7 +79,7 @@ struct mem_region {
 /**
  * struct map - address space state variables holder
  * @total: total memory available as reported by HV
- * @vas_id - HV virtual address space id
+ * @vas_id: HV virtual address space id
  * @htab_size: htab size in bytes
  *
  * The HV virtual address space (vas) allows for hotplug memory regions.
@@ -193,7 +193,7 @@ fail:
 }
 
 /**
- * ps3_mm_vas_destroy -
+ * ps3_mm_vas_destroy - destroy the virtual address space
  *
  * called during kexec sequence with MMU off.
  */
@@ -504,7 +504,7 @@ static int dma_ioc0_free_chunk(struct dm
  * @r: Pointer to a struct ps3_dma_region.
  * @phys_addr: Starting physical address of the area to map.
  * @len: Length in bytes of the area to map.
- * c_out: A pointer to receive an allocated struct dma_chunk for this area.
+ * @c_out: A pointer to receive an allocated struct dma_chunk for this area.
  *
  * This is the lowest level dma mapping routine, and is the one that will
  * make the HV call to add the pages into the io controller address space.
@@ -699,7 +699,7 @@ static int dma_ioc0_region_create(struct
 }
 
 /**
- * dma_region_free - Free a device dma region.
+ * dma_sb_region_free - Free a device dma region.
  * @r: Pointer to a struct ps3_dma_region.
  *
  * This is the lowest level dma region free routine, and is the one that
@@ -1081,7 +1081,7 @@ static int dma_sb_map_area_linear(struct
 }
 
 /**
- * dma_unmap_area_linear - Unmap an area of memory from a device dma region.
+ * dma_sb_unmap_area_linear - Unmap an area of memory from a device dma region.
  * @r: Pointer to a struct ps3_dma_region.
  * @bus_addr: The starting ioc bus address of the area to unmap.
  * @len: Length in bytes of the area to unmap.
#4 lore raw

PATCH 4/4 powerpc/ps3: os-area.c: fix some kernel-doc warnings

In reply to Randy Dunlap

Add one struct member kernel-doc description.
Convert an enum and a struct to common C comments instead of kernel-doc comments to avoid warnings.

Warning: arch/powerpc/platforms/ps3/os-area.c:139 struct member '_db_data'
not described in 'os_area_db'
Warning: arch/powerpc/platforms/ps3/os-area.c:152 Enum value
'OS_AREA_DB_OWNER_ANY' not described in enum 'os_area_db_owner'
Warning: arch/powerpc/platforms/ps3/os-area.c:152 Enum value
'OS_AREA_DB_OWNER_NONE' not described in enum 'os_area_db_owner'
Warning: arch/powerpc/platforms/ps3/os-area.c:152 Enum value
'OS_AREA_DB_OWNER_PROTOTYPE' not described in enum 'os_area_db_owner'
Warning: arch/powerpc/platforms/ps3/os-area.c:152 Enum value
'OS_AREA_DB_OWNER_LINUX' not described in enum 'os_area_db_owner'
Warning: arch/powerpc/platforms/ps3/os-area.c:152 Enum value
'OS_AREA_DB_OWNER_PETITBOOT' not described in enum 'os_area_db_owner'
Warning: arch/powerpc/platforms/ps3/os-area.c:152 Enum value
'OS_AREA_DB_OWNER_MAX' not described in enum 'os_area_db_owner'
Warning: arch/powerpc/platforms/ps3/os-area.c:197 struct member 'valid'
not described in 'saved_params'
Warning: arch/powerpc/platforms/ps3/os-area.c:197 struct member 'rtc_diff'
not described in 'saved_params'
Warning: arch/powerpc/platforms/ps3/os-area.c:197 struct member
'av_multi_out' not described in 'saved_params'

This leaves around 20 unrepaired kernel-doc warnings.

---
Cc: Geoff Levand <[email protected]>
Cc: Madhavan Srinivasan <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Nicholas Piggin <[email protected]>
Cc: Christophe Leroy (CS GROUP) <[email protected]>
Cc: [email protected]

 arch/powerpc/platforms/ps3/os-area.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/powerpc/platforms/ps3/os-area.c +3 -2
@@ -119,6 +119,7 @@ struct os_area_params {
  * @count_32: number of usable 32 bit index entries
  * @index_16: byte offset of the database id index for 16 bit variables.
  * @count_16: number of usable 16 bit index entries
+ * @_db_data: 1000 bytes of shared flash memory database
  *
  * Flash rom storage for exclusive use by guests running in the other os lpar.
  * The current system configuration allocates 1K (two segments) for other os
@@ -139,7 +140,7 @@ struct os_area_db {
 	u8 _db_data[1000];
 };
 
-/**
+/*
  * enum os_area_db_owner - Data owners.
  */
 
@@ -182,7 +183,7 @@ static const struct os_area_db_id os_are
 
 #define SECONDS_FROM_1970_TO_2000 946684800LL
 
-/**
+/*
  * struct saved_params - Static working copies of data from the PS3 'os area'.
  *
  * The order of preference we use for the rtc_diff source:
#5 lore raw
In reply to Randy Dunlap

Hi,

Quoted 18 lines · Randy Dunlap

Patches 1 and 2 eliminate all kernel-doc warnings in their respective files.
Patches 3 and 4 target certain classes of kernel-doc warnings but don't eliminate all kernel-doc warnings in those files.

[PATCH 1/4] powerpc/ps3: platform.h: fix enum ps3_spu_resource_type kernel-doc [PATCH 2/4] powerpc/ps3: htab.c: fix enum ps3_lpar_vas_id kernel-doc [PATCH 3/4] powerpc/ps3: mm.c: clean up kernel-doc issues
[PATCH 4/4] powerpc/ps3: os-area.c: fix some kernel-doc warnings

 arch/powerpc/platforms/ps3/htab.c     |    4 ++--
 arch/powerpc/platforms/ps3/mm.c       |   10 +++++-----
 arch/powerpc/platforms/ps3/os-area.c  |    5 +++--
 arch/powerpc/platforms/ps3/platform.h |    7 ++++---
 4 files changed, 14 insertions(+), 12 deletions(-)
Quoted 6 lines
Cc Geoff Levand <[email protected]>
Cc Madhavan Srinivasan <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Christophe Leroy (CS GROUP) <[email protected]>

This should have been labeled with "RESEND" since I also sent this patch series on 2026-08-31.

Signature · 1 line
~Randy