Skip to contentSkip to conversation

W=1 compilation fixes leftovers

PATCH Applied Leon Romanovsky 3 participants 10 messages Mar 2, 2021 – Mar 3, 2021

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

cover W=1 compilation fixes leftovers

From: Leon Romanovsky <[email protected]>

Two extra fixes that were missed in Lee's W=1 cleanup.

Leon Romanovsky (2):
RDMA/mlx5: Set correct kernel-doc identifier RDMA/uverbs: Fix kernel-doc warning of _uverbs_alloc

 drivers/infiniband/core/uverbs_ioctl.c | 4 ++--
 drivers/infiniband/hw/mlx5/odp.c       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

--
2.29.2

#1 lore raw

PATCH 1/2 RDMA/mlx5: Set correct kernel-doc identifier

From: Leon Romanovsky <[email protected]>

The W=1 allmodconfig build produces the following warning:
drivers/infiniband/hw/mlx5/odp.c:1086: warning: wrong kernel-doc identifier on line:
* Parse a series of data segments for page fault handling.

Fix it by changing /** to be /* as it is written in kernel-doc documentation.

Fixes 5e769e444d26 ("RDMA/hw/mlx5/odp: Fix formatting and add missing descriptions in 'pagefault_data_segments()'")
---
 drivers/infiniband/hw/mlx5/odp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/odp.c +1 -1
index 374698186662..b103555b1f5d 100644
@@ -1082,7 +1082,7 @@ static int pagefault_single_data_segment(struct mlx5_ib_dev *dev,
 	return ret ? ret : npages;
 }
 
-/**
+/*
  * Parse a series of data segments for page fault handling.
  *
  * @dev:  Pointer to mlx5 IB device

--
2.29.2

#2 lore raw

Re: [PATCH rdma-rc 1/2] RDMA/mlx5: Set correct kernel-doc identifier

Quoted 19 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

The W=1 allmodconfig build produces the following warning:
drivers/infiniband/hw/mlx5/odp.c:1086: warning: wrong kernel-doc identifier on line:
* Parse a series of data segments for page fault handling.

Fix it by changing /** to be /* as it is written in kernel-doc documentation.

Fixes 5e769e444d26 ("RDMA/hw/mlx5/odp: Fix formatting and add missing descriptions in 'pagefault_data_segments()'")
---
 drivers/infiniband/hw/mlx5/odp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/odp.c +0 -0
index 374698186662..b103555b1f5d 100644

drivers/infiniband/hw/mlx5/odp.c static int pagefault_single_data_segment(struct mlx5_ib_dev *dev, · line 1085

Quoted 5 lines
drivers/infiniband/hw/mlx5/odp.c +1 -1
@@ -1082,7 +1082,7 @@ static int pagefault_single_data_segment(struct mlx5_ib_dev *dev,
 	return ret ? ret : npages;
 }
 
-/**
+/*

This is not the correct fix.

Kernel-doc is asking for the function name.

Quoted 3 lines
drivers/infiniband/hw/mlx5/odp.c +0 -0
  * Parse a series of data segments for page fault handling.
  *
  * @dev:  Pointer to mlx5 IB device
Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#3 lore raw

Re: [PATCH rdma-rc 1/2] RDMA/mlx5: Set correct kernel-doc identifier

Quoted 24 lines · Lee Jones
Quoted 22 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

The W=1 allmodconfig build produces the following warning:
drivers/infiniband/hw/mlx5/odp.c:1086: warning: wrong kernel-doc identifier on line:
* Parse a series of data segments for page fault handling.

Fix it by changing /** to be /* as it is written in kernel-doc documentation.

Fixes 5e769e444d26 ("RDMA/hw/mlx5/odp: Fix formatting and add missing descriptions in 'pagefault_data_segments()'")
---
 drivers/infiniband/hw/mlx5/odp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/odp.c +0 -0
index 374698186662..b103555b1f5d 100644
@@ -1082,7 +1082,7 @@ static int pagefault_single_data_segment(struct mlx5_ib_dev *dev,
 	return ret ? ret : npages;
 }
 
Quoted 4 lines

drivers/infiniband/hw/mlx5/odp.c static int pagefault_single_data_segment(struct mlx5_ib_dev *dev, · line 1085

Quoted 2 lines
drivers/infiniband/hw/mlx5/odp.c +1 -1
-/**
+/*

This is not the correct fix.

I don't want kernel-doc comments on static function. It is local to this file, so change from /** to /* was to mark that this is not kernel-doc.

Quoted 2 lines

Kernel-doc is asking for the function name.

The thing is that I don't want it to be kernel-doc.

Thanks

#4 lore raw

Re: [PATCH rdma-rc 1/2] RDMA/mlx5: Set correct kernel-doc identifier

Quoted 30 lines · Leon Romanovsky
Quoted 24 lines · Lee Jones
Quoted 22 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

The W=1 allmodconfig build produces the following warning:
drivers/infiniband/hw/mlx5/odp.c:1086: warning: wrong kernel-doc identifier on line:
* Parse a series of data segments for page fault handling.

Fix it by changing /** to be /* as it is written in kernel-doc documentation.

Fixes 5e769e444d26 ("RDMA/hw/mlx5/odp: Fix formatting and add missing descriptions in 'pagefault_data_segments()'")
---
 drivers/infiniband/hw/mlx5/odp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/odp.c +0 -0
index 374698186662..b103555b1f5d 100644
@@ -1082,7 +1082,7 @@ static int pagefault_single_data_segment(struct mlx5_ib_dev *dev,
 	return ret ? ret : npages;
 }
 
Quoted 4 lines

drivers/infiniband/hw/mlx5/odp.c static int pagefault_single_data_segment(struct mlx5_ib_dev *dev, · line 1085

Quoted 2 lines
drivers/infiniband/hw/mlx5/odp.c +1 -1
-/**
+/*

This is not the correct fix.

Quoted 7 lines

I don't want kernel-doc comments on static function. It is local to this file, so change from /** to /* was to mark that this is not kernel-doc.

Quoted 2 lines

Kernel-doc is asking for the function name.

The thing is that I don't want it to be kernel-doc.

In the past, if the authors have made a good effort to document the function, I have left the kernel-doc formatting in place. It looks odd / non-consistent to demote some, but not others. Especially considering there are 100's if not 1000's of other static functions documented in the kernel with kernel-doc formatting.

There are also 1000's of uses that are left referenced by kernel-doc::
tags. See: scripts/find-unused-docs.sh for more details.

If you're going to go through with this, you should at least say what you're doing and why in the commit message. Since demoting an otherwise full and complete kernel-doc header seems a little harsh to say the least.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#5 lore raw

Re: [PATCH rdma-rc 1/2] RDMA/mlx5: Set correct kernel-doc identifier

Quoted 38 lines · Lee Jones
Quoted 36 lines · Leon Romanovsky
Quoted 24 lines · Lee Jones
Quoted 22 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

The W=1 allmodconfig build produces the following warning:
drivers/infiniband/hw/mlx5/odp.c:1086: warning: wrong kernel-doc identifier on line:
* Parse a series of data segments for page fault handling.

Fix it by changing /** to be /* as it is written in kernel-doc documentation.

Fixes 5e769e444d26 ("RDMA/hw/mlx5/odp: Fix formatting and add missing descriptions in 'pagefault_data_segments()'")
---
 drivers/infiniband/hw/mlx5/odp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/odp.c +0 -0
index 374698186662..b103555b1f5d 100644
@@ -1082,7 +1082,7 @@ static int pagefault_single_data_segment(struct mlx5_ib_dev *dev,
 	return ret ? ret : npages;
 }
 
Quoted 4 lines

drivers/infiniband/hw/mlx5/odp.c static int pagefault_single_data_segment(struct mlx5_ib_dev *dev, · line 1085

Quoted 2 lines
drivers/infiniband/hw/mlx5/odp.c +1 -1
-/**
+/*

This is not the correct fix.

I don't want kernel-doc comments on static function. It is local to this file, so change from /** to /* was to mark that this is not kernel-doc.

Quoted 2 lines

Kernel-doc is asking for the function name.

Quoted 7 lines
Quoted 1 line

The thing is that I don't want it to be kernel-doc.

In the past, if the authors have made a good effort to document the function, I have left the kernel-doc formatting in place. It looks odd / non-consistent to demote some, but not others. Especially considering there are 100's if not 1000's of other static functions documented in the kernel with kernel-doc formatting.

I'm not interested to solve all kernel-doc issues, but only specific to drivers/infiniband and especially this mlx5 driver which is under my responsibility.

Quoted 8 lines

There are also 1000's of uses that are left referenced by kernel-doc::
tags. See: scripts/find-unused-docs.sh for more details.

If you're going to go through with this, you should at least say what you're doing and why in the commit message. Since demoting an otherwise full and complete kernel-doc header seems a little harsh to say the least.

It wasn't kernel-doc from the beginning.

Thanks

Quoted 6 lines

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services

Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#6 lore raw

PATCH 2/2 RDMA/uverbs: Fix kernel-doc warning of _uverbs_alloc

In reply to Leon Romanovsky

From: Leon Romanovsky <[email protected]>

Fix the following W=1 compilation warning:
drivers/infiniband/core/uverbs_ioctl.c:108: warning: expecting prototype for uverbs_alloc(). Prototype was for _uverbs_alloc() instead

Fixes 461bb2eee4e1 ("IB/uverbs: Add a simple allocator to uverbs_attr_bundle")
---
 drivers/infiniband/core/uverbs_ioctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/core/uverbs_ioctl.c +2 -2
index e47c5949013f..3871049a48f7 100644
@@ -90,8 +90,8 @@ void uapi_compute_bundle_size(struct uverbs_api_ioctl_method *method_elm,
 	WARN_ON_ONCE(method_elm->bundle_size > PAGE_SIZE);
 }
 
-/**
- * uverbs_alloc() - Quickly allocate memory for use with a bundle
+/*
+ * _uverbs_alloc() - Quickly allocate memory for use with a bundle
  * @bundle: The bundle
  * @size: Number of bytes to allocate
  * @flags: Allocator flags

--
2.29.2

#7 lore raw

Re: [PATCH rdma-rc 2/2] RDMA/uverbs: Fix kernel-doc warning of _uverbs_alloc

Quoted 16 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

Fix the following W=1 compilation warning:
drivers/infiniband/core/uverbs_ioctl.c:108: warning: expecting prototype for uverbs_alloc(). Prototype was for _uverbs_alloc() instead

Fixes 461bb2eee4e1 ("IB/uverbs: Add a simple allocator to uverbs_attr_bundle")
---
 drivers/infiniband/core/uverbs_ioctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/core/uverbs_ioctl.c +0 -0
index e47c5949013f..3871049a48f7 100644

drivers/infiniband/core/uverbs_ioctl.c void uapi_compute_bundle_size(struct uverbs_api_ioctl_method *method_elm, · line 93

Quoted 6 lines
drivers/infiniband/core/uverbs_ioctl.c +1 -2
@@ -90,8 +90,8 @@ void uapi_compute_bundle_size(struct uverbs_api_ioctl_method *method_elm,
 	WARN_ON_ONCE(method_elm->bundle_size > PAGE_SIZE);
 }
 
-/**
- * uverbs_alloc() - Quickly allocate memory for use with a bundle
+/*

Why are you also demoting the header?

It looks fine to me. Just correct the function name.

Quoted 4 lines
drivers/infiniband/core/uverbs_ioctl.c +1 -0
+ * _uverbs_alloc() - Quickly allocate memory for use with a bundle
  * @bundle: The bundle
  * @size: Number of bytes to allocate
  * @flags: Allocator flags
Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#8 lore raw

Re: [PATCH rdma-rc 2/2] RDMA/uverbs: Fix kernel-doc warning of _uverbs_alloc

Quoted 21 lines · Lee Jones
Quoted 19 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

Fix the following W=1 compilation warning:
drivers/infiniband/core/uverbs_ioctl.c:108: warning: expecting prototype for uverbs_alloc(). Prototype was for _uverbs_alloc() instead

Fixes 461bb2eee4e1 ("IB/uverbs: Add a simple allocator to uverbs_attr_bundle")
---
 drivers/infiniband/core/uverbs_ioctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/core/uverbs_ioctl.c +0 -0
index e47c5949013f..3871049a48f7 100644
@@ -90,8 +90,8 @@ void uapi_compute_bundle_size(struct uverbs_api_ioctl_method *method_elm,
 	WARN_ON_ONCE(method_elm->bundle_size > PAGE_SIZE);
 }
 
Quoted 5 lines

drivers/infiniband/core/uverbs_ioctl.c void uapi_compute_bundle_size(struct uverbs_api_ioctl_method *method_elm, · line 93

Quoted 3 lines
drivers/infiniband/core/uverbs_ioctl.c +1 -2
-/**
- * uverbs_alloc() - Quickly allocate memory for use with a bundle
+/*

Why are you also demoting the header?

It is mistake. thanks

Quoted 13 lines

It looks fine to me. Just correct the function name.

drivers/infiniband/core/uverbs_ioctl.c void uapi_compute_bundle_size(struct uverbs_api_ioctl_method *method_elm, · line 97

Quoted 4 lines
drivers/infiniband/core/uverbs_ioctl.c +1 -0
+ * _uverbs_alloc() - Quickly allocate memory for use with a bundle
  * @bundle: The bundle
  * @size: Number of bytes to allocate
  * @flags: Allocator flags

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services

Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
maintainer Applied
#9 lore raw
In reply to Leon Romanovsky
Quoted 7 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

Two extra fixes that were missed in Lee's W=1 cleanup.

Leon Romanovsky (2):
RDMA/mlx5: Set correct kernel-doc identifier RDMA/uverbs: Fix kernel-doc warning of _uverbs_alloc

Applied to for-rc, thanks

Jason