* [PATCH] drivers: acpi: clean up spaces to be consistent
@ 2022-04-25 2:14 Ian Cowan
2022-05-06 18:34 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: Ian Cowan @ 2022-04-25 2:14 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Len Brown, linux-acpi, linux-kernel, Ian Cowan
This cleans up a few line spaces so that it is consistent with the rest
of the file. There are a few places where a space was added before a
return and two spots where a double line space was made into one line
space.
Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
---
drivers/acpi/ac.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index db487ff9dd1b..f8ec48cd7659 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -32,7 +32,6 @@ MODULE_AUTHOR("Paul Diefenbaugh");
MODULE_DESCRIPTION("ACPI AC Adapter Driver");
MODULE_LICENSE("GPL");
-
static int acpi_ac_add(struct acpi_device *device);
static int acpi_ac_remove(struct acpi_device *device);
static void acpi_ac_notify(struct acpi_device *device, u32 event);
@@ -125,6 +124,7 @@ static int get_ac_property(struct power_supply *psy,
default:
return -EINVAL;
}
+
return 0;
}
@@ -190,12 +190,14 @@ static int acpi_ac_battery_notify(struct notifier_block *nb,
static int __init thinkpad_e530_quirk(const struct dmi_system_id *d)
{
ac_sleep_before_get_state_ms = 1000;
+
return 0;
}
static int __init ac_only_quirk(const struct dmi_system_id *d)
{
ac_only = 1;
+
return 0;
}
@@ -286,6 +288,7 @@ static int acpi_ac_resume(struct device *dev)
return 0;
if (old_state != ac->state)
kobject_uevent(&ac->charger->dev.kobj, KOBJ_CHANGE);
+
return 0;
}
#else
@@ -296,7 +299,6 @@ static int acpi_ac_remove(struct acpi_device *device)
{
struct acpi_ac *ac = NULL;
-
if (!device || !acpi_driver_data(device))
return -EINVAL;
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers: acpi: clean up spaces to be consistent
2022-04-25 2:14 [PATCH] drivers: acpi: clean up spaces to be consistent Ian Cowan
@ 2022-05-06 18:34 ` Rafael J. Wysocki
2022-05-06 20:48 ` Ian Cowan
0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2022-05-06 18:34 UTC (permalink / raw)
To: Ian Cowan
Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
Linux Kernel Mailing List
On Mon, Apr 25, 2022 at 4:14 AM Ian Cowan <ian@linux.cowan.aero> wrote:
>
> This cleans up a few line spaces so that it is consistent with the rest
> of the file. There are a few places where a space was added before a
> return and two spots where a double line space was made into one line
> space.
>
> Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
> ---
> drivers/acpi/ac.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
> index db487ff9dd1b..f8ec48cd7659 100644
> --- a/drivers/acpi/ac.c
> +++ b/drivers/acpi/ac.c
> @@ -32,7 +32,6 @@ MODULE_AUTHOR("Paul Diefenbaugh");
> MODULE_DESCRIPTION("ACPI AC Adapter Driver");
> MODULE_LICENSE("GPL");
>
> -
> static int acpi_ac_add(struct acpi_device *device);
> static int acpi_ac_remove(struct acpi_device *device);
> static void acpi_ac_notify(struct acpi_device *device, u32 event);
> @@ -125,6 +124,7 @@ static int get_ac_property(struct power_supply *psy,
> default:
> return -EINVAL;
> }
> +
> return 0;
> }
>
> @@ -190,12 +190,14 @@ static int acpi_ac_battery_notify(struct notifier_block *nb,
> static int __init thinkpad_e530_quirk(const struct dmi_system_id *d)
> {
> ac_sleep_before_get_state_ms = 1000;
> +
> return 0;
> }
>
> static int __init ac_only_quirk(const struct dmi_system_id *d)
> {
> ac_only = 1;
> +
> return 0;
> }
I don't really think that it is useful to add empty lines in the two
cases above.
The rest of the patch is fine with me.
>
> @@ -286,6 +288,7 @@ static int acpi_ac_resume(struct device *dev)
> return 0;
> if (old_state != ac->state)
> kobject_uevent(&ac->charger->dev.kobj, KOBJ_CHANGE);
> +
> return 0;
> }
> #else
> @@ -296,7 +299,6 @@ static int acpi_ac_remove(struct acpi_device *device)
> {
> struct acpi_ac *ac = NULL;
>
> -
> if (!device || !acpi_driver_data(device))
> return -EINVAL;
>
> --
> 2.35.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers: acpi: clean up spaces to be consistent
2022-05-06 18:34 ` Rafael J. Wysocki
@ 2022-05-06 20:48 ` Ian Cowan
0 siblings, 0 replies; 3+ messages in thread
From: Ian Cowan @ 2022-05-06 20:48 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Len Brown, ACPI Devel Maling List, Linux Kernel Mailing List
On Fri, May 06, 2022 at 08:34:09PM +0200, Rafael J. Wysocki wrote:
> On Mon, Apr 25, 2022 at 4:14 AM Ian Cowan <ian@linux.cowan.aero> wrote:
> > @@ -190,12 +190,14 @@ static int acpi_ac_battery_notify(struct notifier_block *nb,
> > static int __init thinkpad_e530_quirk(const struct dmi_system_id *d)
> > {
> > ac_sleep_before_get_state_ms = 1000;
> > +
> > return 0;
> > }
> >
> > static int __init ac_only_quirk(const struct dmi_system_id *d)
> > {
> > ac_only = 1;
> > +
> > return 0;
> > }
>
> I don't really think that it is useful to add empty lines in the two
> cases above.
>
> The rest of the patch is fine with me.
>
I just submitted v2 removing these 2 changes and leaving the others.
Thanks!
Ian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-06 20:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-25 2:14 [PATCH] drivers: acpi: clean up spaces to be consistent Ian Cowan
2022-05-06 18:34 ` Rafael J. Wysocki
2022-05-06 20:48 ` Ian Cowan
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.