linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] ACPI/device_sysfs: Add sysfs support for _HRV hardware revision
@ 2016-04-29 19:21 Betty Dall
  2016-04-29 19:21 ` [PATCH v2 1/3] " Betty Dall
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Betty Dall @ 2016-04-29 19:21 UTC (permalink / raw)
  To: rjw, lenb, linux-acpi; +Cc: linux-kernel

The ACPI _HRV object on the device is used to supply Linux with the
device's hardware revision. This is an optional object. Add sysfs support
for the _HRV object if it exists on the device.

This change allows users to easily find the hardware version of non-PCI
hardware by looking at the sysfs 'hrv' file. It is most useful for
non-PCI devices because lspci can list the hardware version for PCI
devices.

Betty Dall (3):
  ACPI/device_sysfs: Add sysfs support for _HRV hardware revision    
  Change _SUN and _STA show functions error return to EIO
  Clean up checkpatch errors

 drivers/acpi/device_sysfs.c | 50 ++++++++++++++++++++++++++++++++++++---------
 1 file changed, 40 insertions(+), 10 deletions(-)

-- 
1.9.1

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

* [PATCH v2 1/3] ACPI/device_sysfs: Add sysfs support for _HRV hardware revision
  2016-04-29 19:21 [PATCH v2 0/3] ACPI/device_sysfs: Add sysfs support for _HRV hardware revision Betty Dall
@ 2016-04-29 19:21 ` Betty Dall
  2016-04-29 19:21 ` [PATCH v2 2/3] ACPI/device_sysfs: Change _SUN and _STA show functions error return to EIO Betty Dall
  2016-04-29 19:21 ` [PATCH v2 3/3] ACPI/device_sysfs: Clean up checkpatch errors Betty Dall
  2 siblings, 0 replies; 7+ messages in thread
From: Betty Dall @ 2016-04-29 19:21 UTC (permalink / raw)
  To: rjw, lenb, linux-acpi; +Cc: linux-kernel, Betty Dall

The ACPI _HRV object on the device is used to supply Linux with the
device's hardware revision. This is an optional object. Add sysfs support
for the _HRV object if it exists on the device.

This change allows users to easily find the hardware version of non-PCI
hardware by looking at the sysfs 'hrv' file. It is most useful for
non-PCI devices because lspci can list the hardware version for PCI
devices.

Signed-off-by: Betty Dall <betty.dall@hpe.com>
---
 drivers/acpi/device_sysfs.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
index b9afb47..49cc0cb 100644
--- a/drivers/acpi/device_sysfs.c
+++ b/drivers/acpi/device_sysfs.c
@@ -473,6 +473,21 @@ acpi_device_sun_show(struct device *dev, struct device_attribute *attr,
 }
 static DEVICE_ATTR(sun, 0444, acpi_device_sun_show, NULL);
 
+static ssize_t
+acpi_device_hrv_show(struct device *dev, struct device_attribute *attr,
+		     char *buf) {
+	struct acpi_device *acpi_dev = to_acpi_device(dev);
+	acpi_status status;
+	unsigned long long hrv;
+
+	status = acpi_evaluate_integer(acpi_dev->handle, "_HRV", NULL, &hrv);
+	if (ACPI_FAILURE(status))
+		return -EIO;
+
+	return sprintf(buf, "%llu\n", hrv);
+}
+static DEVICE_ATTR(hrv, 0444, acpi_device_hrv_show, NULL);
+
 static ssize_t status_show(struct device *dev, struct device_attribute *attr,
 				char *buf) {
 	struct acpi_device *acpi_dev = to_acpi_device(dev);
@@ -541,6 +556,12 @@ int acpi_device_setup_files(struct acpi_device *dev)
 			goto end;
 	}
 
+	if (acpi_has_method(dev->handle, "_HRV")) {
+		result = device_create_file(&dev->dev, &dev_attr_hrv);
+		if (result)
+			goto end;
+	}
+
 	if (acpi_has_method(dev->handle, "_STA")) {
 		result = device_create_file(&dev->dev, &dev_attr_status);
 		if (result)
@@ -604,6 +625,9 @@ void acpi_device_remove_files(struct acpi_device *dev)
 	if (acpi_has_method(dev->handle, "_SUN"))
 		device_remove_file(&dev->dev, &dev_attr_sun);
 
+	if (acpi_has_method(dev->handle, "_HRV"))
+		device_remove_file(&dev->dev, &dev_attr_hrv);
+
 	if (dev->pnp.unique_id)
 		device_remove_file(&dev->dev, &dev_attr_uid);
 	if (dev->pnp.type.bus_address)
-- 
1.9.1

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

* [PATCH v2 2/3] ACPI/device_sysfs: Change _SUN and _STA show functions error return to EIO
  2016-04-29 19:21 [PATCH v2 0/3] ACPI/device_sysfs: Add sysfs support for _HRV hardware revision Betty Dall
  2016-04-29 19:21 ` [PATCH v2 1/3] " Betty Dall
@ 2016-04-29 19:21 ` Betty Dall
  2016-04-29 19:21 ` [PATCH v2 3/3] ACPI/device_sysfs: Clean up checkpatch errors Betty Dall
  2 siblings, 0 replies; 7+ messages in thread
From: Betty Dall @ 2016-04-29 19:21 UTC (permalink / raw)
  To: rjw, lenb, linux-acpi; +Cc: linux-kernel, Betty Dall

The error return from a sysfs show function is passed up through
the call chain and visible as the return from the read system call.
The show functions for the _STA and _SUN object currently return
-ENODEV. This patch changes the return to -EIO. ENODEV makes less
sense since the "device' exists or there wouldn't be a sysfs file.

Signed-off-by: Betty Dall <betty.dall@hpe.com>
---
 drivers/acpi/device_sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
index 49cc0cb..e556a3e 100644
--- a/drivers/acpi/device_sysfs.c
+++ b/drivers/acpi/device_sysfs.c
@@ -467,7 +467,7 @@ acpi_device_sun_show(struct device *dev, struct device_attribute *attr,
 
 	status = acpi_evaluate_integer(acpi_dev->handle, "_SUN", NULL, &sun);
 	if (ACPI_FAILURE(status))
-		return -ENODEV;
+		return -EIO;
 
 	return sprintf(buf, "%llu\n", sun);
 }
@@ -496,7 +496,7 @@ static ssize_t status_show(struct device *dev, struct device_attribute *attr,
 
 	status = acpi_evaluate_integer(acpi_dev->handle, "_STA", NULL, &sta);
 	if (ACPI_FAILURE(status))
-		return -ENODEV;
+		return -EIO;
 
 	return sprintf(buf, "%llu\n", sta);
 }
-- 
1.9.1

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

* [PATCH v2 3/3] ACPI/device_sysfs: Clean up checkpatch errors
  2016-04-29 19:21 [PATCH v2 0/3] ACPI/device_sysfs: Add sysfs support for _HRV hardware revision Betty Dall
  2016-04-29 19:21 ` [PATCH v2 1/3] " Betty Dall
  2016-04-29 19:21 ` [PATCH v2 2/3] ACPI/device_sysfs: Change _SUN and _STA show functions error return to EIO Betty Dall
@ 2016-04-29 19:21 ` Betty Dall
  2016-04-29 20:18   ` Rafael J. Wysocki
  2 siblings, 1 reply; 7+ messages in thread
From: Betty Dall @ 2016-04-29 19:21 UTC (permalink / raw)
  To: rjw, lenb, linux-acpi; +Cc: linux-kernel, Betty Dall

Cleaning up five existing checkpatch errors in device_sysfs.c since the
file is being changed.

Signed-off-by: Betty Dall <betty.dall@hpe.com>
---
 drivers/acpi/device_sysfs.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
index e556a3e..5aaebec 100644
--- a/drivers/acpi/device_sysfs.c
+++ b/drivers/acpi/device_sysfs.c
@@ -35,7 +35,7 @@ static ssize_t acpi_object_path(acpi_handle handle, char *buf)
 	if (result)
 		return result;
 
-	result = sprintf(buf, "%s\n", (char*)path.pointer);
+	result = sprintf(buf, "%s\n", (char *)path.pointer);
 	kfree(path.pointer);
 	return result;
 }
@@ -81,6 +81,7 @@ static const struct sysfs_ops acpi_data_node_sysfs_ops = {
 static void acpi_data_node_release(struct kobject *kobj)
 {
 	struct acpi_data_node *dn = to_data_node(kobj);
+
 	complete(&dn->kobj_done);
 }
 
@@ -106,7 +107,8 @@ static void acpi_expose_nondev_subnodes(struct kobject *kobj,
 		ret = kobject_init_and_add(&dn->kobj, &acpi_data_node_ktype,
 					   kobj, "%s", dn->name);
 		if (ret)
-			acpi_handle_err(dn->handle, "Failed to expose (%d)\n", ret);
+			acpi_handle_err(dn->handle,
+				"Failed to expose (%d)\n", ret);
 		else
 			acpi_expose_nondev_subnodes(&dn->kobj, &dn->data);
 	}
@@ -333,7 +335,9 @@ int acpi_device_modalias(struct device *dev, char *buf, int size)
 EXPORT_SYMBOL_GPL(acpi_device_modalias);
 
 static ssize_t
-acpi_device_modalias_show(struct device *dev, struct device_attribute *attr, char *buf) {
+acpi_device_modalias_show(struct device *dev,
+			struct device_attribute *attr, char *buf)
+{
 	return __acpi_device_modalias(to_acpi_device(dev), buf, 1024);
 }
 static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL);
@@ -397,7 +401,9 @@ acpi_eject_store(struct device *d, struct device_attribute *attr,
 static DEVICE_ATTR(eject, 0200, NULL, acpi_eject_store);
 
 static ssize_t
-acpi_device_hid_show(struct device *dev, struct device_attribute *attr, char *buf) {
+acpi_device_hid_show(struct device *dev,
+	struct device_attribute *attr, char *buf)
+{
 	struct acpi_device *acpi_dev = to_acpi_device(dev);
 
 	return sprintf(buf, "%s\n", acpi_device_hid(acpi_dev));
@@ -568,10 +574,10 @@ int acpi_device_setup_files(struct acpi_device *dev)
 			goto end;
 	}
 
-        /*
-         * If device has _EJ0, 'eject' file is created that is used to trigger
-         * hot-removal function from userland.
-         */
+	/*
+	 * If device has _EJ0, 'eject' file is created that is used to trigger
+	 * hot-removal function from userland.
+	 */
 	if (acpi_has_method(dev->handle, "_EJ0")) {
 		result = device_create_file(&dev->dev, &dev_attr_eject);
 		if (result)
-- 
1.9.1

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

* Re: [PATCH v2 3/3] ACPI/device_sysfs: Clean up checkpatch errors
  2016-04-29 19:21 ` [PATCH v2 3/3] ACPI/device_sysfs: Clean up checkpatch errors Betty Dall
@ 2016-04-29 20:18   ` Rafael J. Wysocki
  2016-04-29 21:13     ` Dall, Betty
  0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2016-04-29 20:18 UTC (permalink / raw)
  To: Betty Dall
  Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
	Linux Kernel Mailing List

On Fri, Apr 29, 2016 at 9:21 PM, Betty Dall <betty.dall@hpe.com> wrote:
> Cleaning up five existing checkpatch errors in device_sysfs.c since the
> file is being changed.
>
> Signed-off-by: Betty Dall <betty.dall@hpe.com>
> ---
>  drivers/acpi/device_sysfs.c | 22 ++++++++++++++--------
>  1 file changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
> index e556a3e..5aaebec 100644
> --- a/drivers/acpi/device_sysfs.c
> +++ b/drivers/acpi/device_sysfs.c
> @@ -35,7 +35,7 @@ static ssize_t acpi_object_path(acpi_handle handle, char *buf)
>         if (result)
>                 return result;
>
> -       result = sprintf(buf, "%s\n", (char*)path.pointer);
> +       result = sprintf(buf, "%s\n", (char *)path.pointer);

OK

>         kfree(path.pointer);
>         return result;
>  }
> @@ -81,6 +81,7 @@ static const struct sysfs_ops acpi_data_node_sysfs_ops = {
>  static void acpi_data_node_release(struct kobject *kobj)
>  {
>         struct acpi_data_node *dn = to_data_node(kobj);
> +

Maybe.

>         complete(&dn->kobj_done);
>  }
>
> @@ -106,7 +107,8 @@ static void acpi_expose_nondev_subnodes(struct kobject *kobj,
>                 ret = kobject_init_and_add(&dn->kobj, &acpi_data_node_ktype,
>                                            kobj, "%s", dn->name);
>                 if (ret)
> -                       acpi_handle_err(dn->handle, "Failed to expose (%d)\n", ret);
> +                       acpi_handle_err(dn->handle,
> +                               "Failed to expose (%d)\n", ret);

No.  checkpatch is wrong here.

>                 else
>                         acpi_expose_nondev_subnodes(&dn->kobj, &dn->data);
>         }
> @@ -333,7 +335,9 @@ int acpi_device_modalias(struct device *dev, char *buf, int size)
>  EXPORT_SYMBOL_GPL(acpi_device_modalias);
>
>  static ssize_t
> -acpi_device_modalias_show(struct device *dev, struct device_attribute *attr, char *buf) {
> +acpi_device_modalias_show(struct device *dev,
> +                       struct device_attribute *attr, char *buf)

The brace should go to the new line, but it's better if the header
takes one line only.

> +{
>         return __acpi_device_modalias(to_acpi_device(dev), buf, 1024);
>  }
>  static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL);
> @@ -397,7 +401,9 @@ acpi_eject_store(struct device *d, struct device_attribute *attr,
>  static DEVICE_ATTR(eject, 0200, NULL, acpi_eject_store);
>
>  static ssize_t
> -acpi_device_hid_show(struct device *dev, struct device_attribute *attr, char *buf) {
> +acpi_device_hid_show(struct device *dev,
> +       struct device_attribute *attr, char *buf)

Ditto.

> +{
>         struct acpi_device *acpi_dev = to_acpi_device(dev);
>
>         return sprintf(buf, "%s\n", acpi_device_hid(acpi_dev));
> @@ -568,10 +574,10 @@ int acpi_device_setup_files(struct acpi_device *dev)
>                         goto end;
>         }
>
> -        /*
> -         * If device has _EJ0, 'eject' file is created that is used to trigger
> -         * hot-removal function from userland.
> -         */
> +       /*
> +        * If device has _EJ0, 'eject' file is created that is used to trigger
> +        * hot-removal function from userland.
> +        */

What's the problem with this comment?

>         if (acpi_has_method(dev->handle, "_EJ0")) {
>                 result = device_create_file(&dev->dev, &dev_attr_eject);
>                 if (result)
> --

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

* Re: [PATCH v2 3/3] ACPI/device_sysfs: Clean up checkpatch errors
  2016-04-29 20:18   ` Rafael J. Wysocki
@ 2016-04-29 21:13     ` Dall, Betty
  2016-04-29 21:35       ` Rafael J. Wysocki
  0 siblings, 1 reply; 7+ messages in thread
From: Dall, Betty @ 2016-04-29 21:13 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
	Linux Kernel Mailing List

On 04/29/2016 02:19 PM, Rafael J. Wysocki wrote:
> On Fri, Apr 29, 2016 at 9:21 PM, Betty Dall <betty.dall@hpe.com> wrote:
>> Cleaning up five existing checkpatch errors in device_sysfs.c since the
>> file is being changed.
>>
>> Signed-off-by: Betty Dall <betty.dall@hpe.com>
>> ---
>>  drivers/acpi/device_sysfs.c | 22 ++++++++++++++--------
>>  1 file changed, 14 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
>> index e556a3e..5aaebec 100644
>> --- a/drivers/acpi/device_sysfs.c
>> +++ b/drivers/acpi/device_sysfs.c
>> @@ -35,7 +35,7 @@ static ssize_t acpi_object_path(acpi_handle handle, char *buf)
>>         if (result)
>>                 return result;
>>
>> -       result = sprintf(buf, "%s\n", (char*)path.pointer);
>> +       result = sprintf(buf, "%s\n", (char *)path.pointer);
> 
> OK
> 
>>         kfree(path.pointer);
>>         return result;
>>  }
>> @@ -81,6 +81,7 @@ static const struct sysfs_ops acpi_data_node_sysfs_ops = {
>>  static void acpi_data_node_release(struct kobject *kobj)
>>  {
>>         struct acpi_data_node *dn = to_data_node(kobj);
>> +
> 
> Maybe.

Checkpatch wants a blank line after declarations.

>>         complete(&dn->kobj_done);
>>  }
>>
>> @@ -106,7 +107,8 @@ static void acpi_expose_nondev_subnodes(struct kobject *kobj,
>>                 ret = kobject_init_and_add(&dn->kobj, &acpi_data_node_ktype,
>>                                            kobj, "%s", dn->name);
>>                 if (ret)
>> -                       acpi_handle_err(dn->handle, "Failed to expose (%d)\n", ret);
>> +                       acpi_handle_err(dn->handle,
>> +                               "Failed to expose (%d)\n", ret);
> 
> No.  checkpatch is wrong here.

Ok - that was just an 80 char warning.

>>                 else
>>                         acpi_expose_nondev_subnodes(&dn->kobj, &dn->data);
>>         }
>> @@ -333,7 +335,9 @@ int acpi_device_modalias(struct device *dev, char *buf, int size)
>>  EXPORT_SYMBOL_GPL(acpi_device_modalias);
>>
>>  static ssize_t
>> -acpi_device_modalias_show(struct device *dev, struct device_attribute *attr, char *buf) {
>> +acpi_device_modalias_show(struct device *dev,
>> +                       struct device_attribute *attr, char *buf)
> 
> The brace should go to the new line, but it's better if the header
> takes one line only.

Ok - I was trying to clean up the 80 character warning, but I see your
point.

>> +{
>>         return __acpi_device_modalias(to_acpi_device(dev), buf, 1024);
>>  }
>>  static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL);
>> @@ -397,7 +401,9 @@ acpi_eject_store(struct device *d, struct device_attribute *attr,
>>  static DEVICE_ATTR(eject, 0200, NULL, acpi_eject_store);
>>
>>  static ssize_t
>> -acpi_device_hid_show(struct device *dev, struct device_attribute *attr, char *buf) {
>> +acpi_device_hid_show(struct device *dev,
>> +       struct device_attribute *attr, char *buf)
> 
> Ditto.

OK.

>> +{
>>         struct acpi_device *acpi_dev = to_acpi_device(dev);
>>
>>         return sprintf(buf, "%s\n", acpi_device_hid(acpi_dev));
>> @@ -568,10 +574,10 @@ int acpi_device_setup_files(struct acpi_device *dev)
>>                         goto end;
>>         }
>>
>> -        /*
>> -         * If device has _EJ0, 'eject' file is created that is used to trigger
>> -         * hot-removal function from userland.
>> -         */
>> +       /*
>> +        * If device has _EJ0, 'eject' file is created that is used to trigger
>> +        * hot-removal function from userland.
>> +        */
> 
> What's the problem with this comment?

They were spaces - not a tab.

> 
>>         if (acpi_has_method(dev->handle, "_EJ0")) {
>>                 result = device_create_file(&dev->dev, &dev_attr_eject);
>>                 if (result)
>> --

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

* Re: [PATCH v2 3/3] ACPI/device_sysfs: Clean up checkpatch errors
  2016-04-29 21:13     ` Dall, Betty
@ 2016-04-29 21:35       ` Rafael J. Wysocki
  0 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2016-04-29 21:35 UTC (permalink / raw)
  To: Dall, Betty
  Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
	Linux Kernel Mailing List

On Friday, April 29, 2016 09:13:28 PM Dall, Betty wrote:
> On 04/29/2016 02:19 PM, Rafael J. Wysocki wrote:
> > On Fri, Apr 29, 2016 at 9:21 PM, Betty Dall <betty.dall@hpe.com> wrote:
> >> Cleaning up five existing checkpatch errors in device_sysfs.c since the
> >> file is being changed.
> >>
> >> Signed-off-by: Betty Dall <betty.dall@hpe.com>
> >> ---
> >>  drivers/acpi/device_sysfs.c | 22 ++++++++++++++--------
> >>  1 file changed, 14 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
> >> index e556a3e..5aaebec 100644
> >> --- a/drivers/acpi/device_sysfs.c
> >> +++ b/drivers/acpi/device_sysfs.c
> >> @@ -35,7 +35,7 @@ static ssize_t acpi_object_path(acpi_handle handle, char *buf)
> >>         if (result)
> >>                 return result;
> >>
> >> -       result = sprintf(buf, "%s\n", (char*)path.pointer);
> >> +       result = sprintf(buf, "%s\n", (char *)path.pointer);
> > 
> > OK
> > 
> >>         kfree(path.pointer);
> >>         return result;
> >>  }
> >> @@ -81,6 +81,7 @@ static const struct sysfs_ops acpi_data_node_sysfs_ops = {
> >>  static void acpi_data_node_release(struct kobject *kobj)
> >>  {
> >>         struct acpi_data_node *dn = to_data_node(kobj);
> >> +
> > 
> > Maybe.
> 
> Checkpatch wants a blank line after declarations.

But sometimes they are not really useful.  As in this case IMO.

> >>         complete(&dn->kobj_done);
> >>  }
> >>
> >> @@ -106,7 +107,8 @@ static void acpi_expose_nondev_subnodes(struct kobject *kobj,
> >>                 ret = kobject_init_and_add(&dn->kobj, &acpi_data_node_ktype,
> >>                                            kobj, "%s", dn->name);
> >>                 if (ret)
> >> -                       acpi_handle_err(dn->handle, "Failed to expose (%d)\n", ret);
> >> +                       acpi_handle_err(dn->handle,
> >> +                               "Failed to expose (%d)\n", ret);
> > 
> > No.  checkpatch is wrong here.
> 
> Ok - that was just an 80 char warning.
> 
> >>                 else
> >>                         acpi_expose_nondev_subnodes(&dn->kobj, &dn->data);
> >>         }
> >> @@ -333,7 +335,9 @@ int acpi_device_modalias(struct device *dev, char *buf, int size)
> >>  EXPORT_SYMBOL_GPL(acpi_device_modalias);
> >>
> >>  static ssize_t
> >> -acpi_device_modalias_show(struct device *dev, struct device_attribute *attr, char *buf) {
> >> +acpi_device_modalias_show(struct device *dev,
> >> +                       struct device_attribute *attr, char *buf)
> > 
> > The brace should go to the new line, but it's better if the header
> > takes one line only.
> 
> Ok - I was trying to clean up the 80 character warning, but I see your
> point.
> 
> >> +{
> >>         return __acpi_device_modalias(to_acpi_device(dev), buf, 1024);
> >>  }
> >>  static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL);
> >> @@ -397,7 +401,9 @@ acpi_eject_store(struct device *d, struct device_attribute *attr,
> >>  static DEVICE_ATTR(eject, 0200, NULL, acpi_eject_store);
> >>
> >>  static ssize_t
> >> -acpi_device_hid_show(struct device *dev, struct device_attribute *attr, char *buf) {
> >> +acpi_device_hid_show(struct device *dev,
> >> +       struct device_attribute *attr, char *buf)
> > 
> > Ditto.
> 
> OK.
> 
> >> +{
> >>         struct acpi_device *acpi_dev = to_acpi_device(dev);
> >>
> >>         return sprintf(buf, "%s\n", acpi_device_hid(acpi_dev));
> >> @@ -568,10 +574,10 @@ int acpi_device_setup_files(struct acpi_device *dev)
> >>                         goto end;
> >>         }
> >>
> >> -        /*
> >> -         * If device has _EJ0, 'eject' file is created that is used to trigger
> >> -         * hot-removal function from userland.
> >> -         */
> >> +       /*
> >> +        * If device has _EJ0, 'eject' file is created that is used to trigger
> >> +        * hot-removal function from userland.
> >> +        */
> > 
> > What's the problem with this comment?
> 
> They were spaces - not a tab.

Ah, whitespace damage.  OK

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

end of thread, other threads:[~2016-04-29 21:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-29 19:21 [PATCH v2 0/3] ACPI/device_sysfs: Add sysfs support for _HRV hardware revision Betty Dall
2016-04-29 19:21 ` [PATCH v2 1/3] " Betty Dall
2016-04-29 19:21 ` [PATCH v2 2/3] ACPI/device_sysfs: Change _SUN and _STA show functions error return to EIO Betty Dall
2016-04-29 19:21 ` [PATCH v2 3/3] ACPI/device_sysfs: Clean up checkpatch errors Betty Dall
2016-04-29 20:18   ` Rafael J. Wysocki
2016-04-29 21:13     ` Dall, Betty
2016-04-29 21:35       ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).