[PATCH] media: dvbdev.h: fix kernel-doc warnings

From: Randy Dunlap
Date: Sat Dec 03 2022 - 01:09:55 EST


Fix kernel-doc warnings in <media/dvbdev.h> that were recently introduced.

Quietens these warnings:

../include/media/dvbdev.h:193: warning: Function parameter or member 'ref' not described in 'dvb_device'
../include/media/dvbdev.h:207: warning: expecting prototype for dvb_device_get(). Prototype was for dvb_device_put() instead
dvbdev.h:257: warning: contents before sections

Fixes: 0fc044b2b5e2 ("media: dvbdev: adopts refcnt to avoid UAF")
Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Lin Ma <linma@xxxxxxxxxx>
Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
Cc: linux-media@xxxxxxxxxxxxxxx
---
include/media/dvbdev.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff -- a/include/media/dvbdev.h b/include/media/dvbdev.h
--- a/include/media/dvbdev.h
+++ b/include/media/dvbdev.h
@@ -130,6 +130,7 @@ struct dvb_adapter {
* struct dvb_device - represents a DVB device node
*
* @list_head: List head with all DVB devices
+ * @ref: reference count for this device
* @fops: pointer to struct file_operations
* @adapter: pointer to the adapter that holds this device node
* @type: type of the device, as defined by &enum dvb_device_type.
@@ -200,7 +201,7 @@ struct dvb_device {
struct dvb_device *dvb_device_get(struct dvb_device *dvbdev);

/**
- * dvb_device_get - Decrease dvb_device reference
+ * dvb_device_put - Decrease dvb_device reference
*
* @dvbdev: pointer to struct dvb_device
*/
@@ -250,10 +251,10 @@ int dvb_register_device(struct dvb_adapt
/**
* dvb_remove_device - Remove a registered DVB device
*
+ * @dvbdev: pointer to struct dvb_device
+ *
* This does not free memory. dvb_free_device() will do that when
* reference counter is empty
- *
- * @dvbdev: pointer to struct dvb_device
*/
void dvb_remove_device(struct dvb_device *dvbdev);