All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] ACPI: sysfs: fix doc warnings in device_sysfs.c
@ 2021-06-10 11:35 Baokun Li
  2021-06-14 15:26 ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Baokun Li @ 2021-06-10 11:35 UTC (permalink / raw)
  To: rjw, lenb, linux-acpi, linux-kernel
  Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3, libaokun1

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'

Signed-off-by: Baokun Li <libaokun1@huawei.com>
---
 drivers/acpi/device_sysfs.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
index fa2c1c93072c..3b08efa88ba5 100644
--- a/drivers/acpi/device_sysfs.c
+++ b/drivers/acpi/device_sysfs.c
@@ -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
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] ACPI: sysfs: fix doc warnings in device_sysfs.c
  2021-06-10 11:35 [PATCH -next] ACPI: sysfs: fix doc warnings in device_sysfs.c Baokun Li
@ 2021-06-14 15:26 ` Rafael J. Wysocki
  2021-06-15  3:50   ` libaokun (A)
  0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2021-06-14 15:26 UTC (permalink / raw)
  To: Baokun Li
  Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
	Linux Kernel Mailing List, Wei Yongjun, Yue Haibing, yangjihong1,
	yu kuai

On Thu, Jun 10, 2021 at 1:25 PM Baokun Li <libaokun1@huawei.com> wrote:
>
> 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'
>
> Signed-off-by: Baokun Li <libaokun1@huawei.com>
> ---
>  drivers/acpi/device_sysfs.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
> index fa2c1c93072c..3b08efa88ba5 100644
> --- a/drivers/acpi/device_sysfs.c
> +++ b/drivers/acpi/device_sysfs.c
> @@ -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.

>   * 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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] ACPI: sysfs: fix doc warnings in device_sysfs.c
  2021-06-14 15:26 ` Rafael J. Wysocki
@ 2021-06-15  3:50   ` libaokun (A)
  0 siblings, 0 replies; 3+ messages in thread
From: libaokun (A) @ 2021-06-15  3:50 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
	Linux Kernel Mailing List, Wei Yongjun, Yue Haibing, yangjihong1,
	yu kuai


在 2021/6/14 23:26, Rafael J. Wysocki 写道:
> On Thu, Jun 10, 2021 at 1:25 PM Baokun Li <libaokun1@huawei.com> wrote:
>> 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'
>>
>> Signed-off-by: Baokun Li <libaokun1@huawei.com>
>> ---
>>   drivers/acpi/device_sysfs.c | 7 +++++--
>>   1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
>> index fa2c1c93072c..3b08efa88ba5 100644
>> --- a/drivers/acpi/device_sysfs.c
>> +++ b/drivers/acpi/device_sysfs.c
>> @@ -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.

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.


>
>>    * 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
>>
> .

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-15  3:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 11:35 [PATCH -next] ACPI: sysfs: fix doc warnings in device_sysfs.c Baokun Li
2021-06-14 15:26 ` Rafael J. Wysocki
2021-06-15  3:50   ` libaokun (A)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.