Skip to contentSkip to conversation

ACPI: sysfs: fix doc warnings in device_sysfs.c

PATCH Superseded Baokun Li 2 participants 3 messages Jun 10, 2021 – Jun 15, 2021 ACPI

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Baokun Li

author
#0 lore raw

PATCH 1/1 ACPI: sysfs: fix doc warnings in device_sysfs.c

Fixes the following W=1 kernel build warning(s):

drivers/acpi/device_sysfs.c:278: warning: Function parameter or
member 'dev' not described in 'acpi_device_uevent_modalias'
drivers/acpi/device_sysfs.c:278: warning: Function parameter or
member 'env' not described in 'acpi_device_uevent_modalias'
drivers/acpi/device_sysfs.c:323: warning: Function parameter or
member 'dev' not described in 'acpi_device_modalias'
drivers/acpi/device_sysfs.c:323: warning: Function parameter or
member 'buf' not described in 'acpi_device_modalias'
drivers/acpi/device_sysfs.c:323: warning: Function parameter or
member 'size' not described in 'acpi_device_modalias'

---
 drivers/acpi/device_sysfs.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/acpi/device_sysfs.c +5 -2
index fa2c1c93072c..3b08efa88ba5 100644
@@ -268,7 +268,8 @@ int __acpi_device_uevent_modalias(struct acpi_device *adev,
 
 /**
  * acpi_device_uevent_modalias - uevent modalias for ACPI-enumerated devices.
- *
+ * @dev: Struct device.
+ * @env: Uevent kobject.
  * Create the uevent modalias field for ACPI-enumerated devices.
  *
  * Because other buses do not support ACPI HIDs & CIDs, e.g. for a device with
@@ -313,7 +314,9 @@ static int __acpi_device_modalias(struct acpi_device *adev, char *buf, int size)
 
 /**
  * acpi_device_modalias - modalias sysfs attribute for ACPI-enumerated devices.
- *
+ * @dev: Struct device.
+ * @buf: The buffer.
+ * @size: Size of the buffer.
  * Create the modalias sysfs attribute for ACPI-enumerated devices.
  *
  * Because other buses do not support ACPI HIDs & CIDs, e.g. for a device with
Signature · 1 line
2.31.1
#1 lore raw
Quoted 24 lines · Baokun Li

Fixes the following W=1 kernel build warning(s):

drivers/acpi/device_sysfs.c:278: warning: Function parameter or
member 'dev' not described in 'acpi_device_uevent_modalias'
drivers/acpi/device_sysfs.c:278: warning: Function parameter or
member 'env' not described in 'acpi_device_uevent_modalias'
drivers/acpi/device_sysfs.c:323: warning: Function parameter or
member 'dev' not described in 'acpi_device_modalias'
drivers/acpi/device_sysfs.c:323: warning: Function parameter or
member 'buf' not described in 'acpi_device_modalias'
drivers/acpi/device_sysfs.c:323: warning: Function parameter or
member 'size' not described in 'acpi_device_modalias'

---
 drivers/acpi/device_sysfs.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/acpi/device_sysfs.c +0 -0
index fa2c1c93072c..3b08efa88ba5 100644

drivers/acpi/device_sysfs.c int __acpi_device_uevent_modalias(struct acpi_device *adev, · line 272

Quoted 6 lines
drivers/acpi/device_sysfs.c +2 -1
@@ -268,7 +268,8 @@ int __acpi_device_uevent_modalias(struct acpi_device *adev,
 
 /**
  * acpi_device_uevent_modalias - uevent modalias for ACPI-enumerated devices.
- *
+ * @dev: Struct device.
+ * @env: Uevent kobject.

This doesn't appear to be accurate.

@env doesn't point to a kobject.

Quoted 17 lines
drivers/acpi/device_sysfs.c +3 -2
  * Create the uevent modalias field for ACPI-enumerated devices.
  *
  * Because other buses do not support ACPI HIDs & CIDs, e.g. for a device with
@@ -313,7 +314,9 @@ static int __acpi_device_modalias(struct acpi_device *adev, char *buf, int size)
 
 /**
  * acpi_device_modalias - modalias sysfs attribute for ACPI-enumerated devices.
- *
+ * @dev: Struct device.
+ * @buf: The buffer.
+ * @size: Size of the buffer.
  * Create the modalias sysfs attribute for ACPI-enumerated devices.
  *
  * Because other buses do not support ACPI HIDs & CIDs, e.g. for a device with
--

2.31.1

#2 lore raw
Quoted 25 lines · Rafael J. Wysocki
Quoted 24 lines · Baokun Li

Fixes the following W=1 kernel build warning(s):

drivers/acpi/device_sysfs.c:278: warning: Function parameter or
member 'dev' not described in 'acpi_device_uevent_modalias'
drivers/acpi/device_sysfs.c:278: warning: Function parameter or
member 'env' not described in 'acpi_device_uevent_modalias'
drivers/acpi/device_sysfs.c:323: warning: Function parameter or
member 'dev' not described in 'acpi_device_modalias'
drivers/acpi/device_sysfs.c:323: warning: Function parameter or
member 'buf' not described in 'acpi_device_modalias'
drivers/acpi/device_sysfs.c:323: warning: Function parameter or
member 'size' not described in 'acpi_device_modalias'

---
  drivers/acpi/device_sysfs.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)
drivers/acpi/device_sysfs.c +0 -0
index fa2c1c93072c..3b08efa88ba5 100644
@@ -268,7 +268,8 @@ int __acpi_device_uevent_modalias(struct acpi_device *adev,
 
Quoted 8 lines

drivers/acpi/device_sysfs.c int __acpi_device_uevent_modalias(struct acpi_device *adev, · line 272

Quoted 5 lines
drivers/acpi/device_sysfs.c +2 -1
  /**
   * acpi_device_uevent_modalias - uevent modalias for ACPI-enumerated devices.
- *
+ * @dev: Struct device.
+ * @env: Uevent kobject.

This doesn't appear to be accurate.

@env doesn't point to a kobject.

I didn't quite understand that variable.

But I saw the same paramter in  'drivers/misc/mei/bus.c +1001' where has comments.

So I copied that comments here.

 997 /**
 998  * mei_cl_device_uevent - me client bus uevent handler
 999  *
1000  * @dev: device
1001  * @env: uevent kobject
1002  *
1003  * Return: 0 on success -ENOMEM on when add_uevent_var fails
1004  */
1005 static int mei_cl_device_uevent(struct device *dev, struct kobj_uevent_env *env)

Thank you for your advice.

I'm about to send a patch v2 with the changes suggested by you.

Best Regards.

Quoted 19 lines
Quoted 16 lines
drivers/acpi/device_sysfs.c +3 -2
   * Create the uevent modalias field for ACPI-enumerated devices.
   *
   * Because other buses do not support ACPI HIDs & CIDs, e.g. for a device with
@@ -313,7 +314,9 @@ static int __acpi_device_modalias(struct acpi_device *adev, char *buf, int size)
 
  /**
   * acpi_device_modalias - modalias sysfs attribute for ACPI-enumerated devices.
- *
+ * @dev: Struct device.
+ * @buf: The buffer.
+ * @size: Size of the buffer.
   * Create the modalias sysfs attribute for ACPI-enumerated devices.
   *
   * Because other buses do not support ACPI HIDs & CIDs, e.g. for a device with
--
Quoted 2 lines

2.31.1

.