* [PATCH] base: power: runtime.c: Remove a unnecessary space
@ 2021-04-18 6:08 Sebastian Fricke
2021-04-18 7:09 ` Joe Perches
0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Fricke @ 2021-04-18 6:08 UTC (permalink / raw)
To: linux-kernel
Cc: Sebastian Fricke, Rafael J. Wysocki, Len Brown, Pavel Machek,
Greg Kroah-Hartman, linux-pm
Remove a redundant space to improve the quality of the comment.
Signed-off-by: Sebastian Fricke <sebastian.fricke@posteo.net>
---
Side-note:
I found this while reading the code, I don't believe it is important but
I thought it doesn't hurt to fix it.
---
drivers/base/power/runtime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index 18b82427d0cb..499434b84171 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -786,7 +786,7 @@ static int rpm_resume(struct device *dev, int rpmflags)
}
/*
- * See if we can skip waking up the parent. This is safe only if
+ * See if we can skip waking up the parent. This is safe only if
* power.no_callbacks is set, because otherwise we don't know whether
* the resume will actually succeed.
*/
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] base: power: runtime.c: Remove a unnecessary space
2021-04-18 6:08 [PATCH] base: power: runtime.c: Remove a unnecessary space Sebastian Fricke
@ 2021-04-18 7:09 ` Joe Perches
2021-04-18 9:11 ` Sebastian Fricke
0 siblings, 1 reply; 6+ messages in thread
From: Joe Perches @ 2021-04-18 7:09 UTC (permalink / raw)
To: Sebastian Fricke, linux-kernel
Cc: Rafael J. Wysocki, Len Brown, Pavel Machek, Greg Kroah-Hartman, linux-pm
On Sun, 2021-04-18 at 06:08 +0000, Sebastian Fricke wrote:
> Remove a redundant space to improve the quality of the comment.
I think this patch is not useful.
It's not redundant.
Two spaces after a period is commonly used to separate sentences.
It's especially common when used with fixed pitch fonts.
A trivial grep seems to show it's used about 50K times in comments.
Though single space after period may be used about twice as often.
$ git grep '^\s*\*.*\. [A-Z]' | wc -l
54439
$ git grep '^\s*\*.*\. [A-Z]' | wc -l
110003
For drivers/base/power/runtime.c, that 2 space after period style is used
dozens of times and changing a single instance of it isn't very useful.
> ---
> Side-note:
> I found this while reading the code, I don't believe it is important but
> I thought it doesn't hurt to fix it.
> ---
> drivers/base/power/runtime.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
> index 18b82427d0cb..499434b84171 100644
> --- a/drivers/base/power/runtime.c
> +++ b/drivers/base/power/runtime.c
> @@ -786,7 +786,7 @@ static int rpm_resume(struct device *dev, int rpmflags)
> }
>
>
> /*
> - * See if we can skip waking up the parent. This is safe only if
> + * See if we can skip waking up the parent. This is safe only if
> * power.no_callbacks is set, because otherwise we don't know whether
> * the resume will actually succeed.
> */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] base: power: runtime.c: Remove a unnecessary space
2021-04-18 7:09 ` Joe Perches
@ 2021-04-18 9:11 ` Sebastian Fricke
2021-04-18 9:18 ` Pavel Machek
2021-04-18 9:22 ` Joe Perches
0 siblings, 2 replies; 6+ messages in thread
From: Sebastian Fricke @ 2021-04-18 9:11 UTC (permalink / raw)
To: Joe Perches
Cc: linux-kernel, Rafael J. Wysocki, Len Brown, Pavel Machek,
Greg Kroah-Hartman, linux-pm
Hey Joe,
On 18.04.2021 00:09, Joe Perches wrote:
>On Sun, 2021-04-18 at 06:08 +0000, Sebastian Fricke wrote:
>> Remove a redundant space to improve the quality of the comment.
>
>I think this patch is not useful.
>
>It's not redundant.
Thank you, I actually found this pattern a few more times but I wanted
to check first if this is a mistake or chosen consciously.
Sorry for the noise.
>
>Two spaces after a period is commonly used to separate sentences.
>It's especially common when used with fixed pitch fonts.
>
>A trivial grep seems to show it's used about 50K times in comments.
>Though single space after period may be used about twice as often.
>
>$ git grep '^\s*\*.*\. [A-Z]' | wc -l
>54439
>$ git grep '^\s*\*.*\. [A-Z]' | wc -l
>110003
>
>For drivers/base/power/runtime.c, that 2 space after period style is used
>dozens of times and changing a single instance of it isn't very useful.
True and if I understand you correctly you would rather keep it as is
right?
Greetings,
Sebastian
>
>> ---
>> Side-note:
>> I found this while reading the code, I don't believe it is important but
>> I thought it doesn't hurt to fix it.
>> ---
>> drivers/base/power/runtime.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
>> index 18b82427d0cb..499434b84171 100644
>> --- a/drivers/base/power/runtime.c
>> +++ b/drivers/base/power/runtime.c
>> @@ -786,7 +786,7 @@ static int rpm_resume(struct device *dev, int rpmflags)
>> }
>>
>>
>> /*
>> - * See if we can skip waking up the parent. This is safe only if
>> + * See if we can skip waking up the parent. This is safe only if
>> * power.no_callbacks is set, because otherwise we don't know whether
>> * the resume will actually succeed.
>> */
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] base: power: runtime.c: Remove a unnecessary space
2021-04-18 9:11 ` Sebastian Fricke
@ 2021-04-18 9:18 ` Pavel Machek
2021-04-18 9:22 ` Joe Perches
1 sibling, 0 replies; 6+ messages in thread
From: Pavel Machek @ 2021-04-18 9:18 UTC (permalink / raw)
To: Sebastian Fricke
Cc: Joe Perches, linux-kernel, Rafael J. Wysocki, Len Brown,
Greg Kroah-Hartman, linux-pm
[-- Attachment #1: Type: text/plain, Size: 617 bytes --]
On Sun 2021-04-18 09:11:43, Sebastian Fricke wrote:
> Hey Joe,
>
> On 18.04.2021 00:09, Joe Perches wrote:
> >On Sun, 2021-04-18 at 06:08 +0000, Sebastian Fricke wrote:
> >>Remove a redundant space to improve the quality of the comment.
> >
> >I think this patch is not useful.
> >
> >It's not redundant.
>
> Thank you, I actually found this pattern a few more times but I wanted
> to check first if this is a mistake or chosen consciously.
It is okay as it is. No need to remove extra space. No need to add it,
either.
Best regards,
Pavel
--
http://www.livejournal.com/~pavelmachek
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] base: power: runtime.c: Remove a unnecessary space
2021-04-18 9:11 ` Sebastian Fricke
2021-04-18 9:18 ` Pavel Machek
@ 2021-04-18 9:22 ` Joe Perches
2021-04-19 15:16 ` Rafael J. Wysocki
1 sibling, 1 reply; 6+ messages in thread
From: Joe Perches @ 2021-04-18 9:22 UTC (permalink / raw)
To: Sebastian Fricke
Cc: linux-kernel, Rafael J. Wysocki, Len Brown, Pavel Machek,
Greg Kroah-Hartman, linux-pm
On Sun, 2021-04-18 at 09:11 +0000, Sebastian Fricke wrote:
> Hey Joe,
Hi Sebastian.
> On 18.04.2021 00:09, Joe Perches wrote:
> > On Sun, 2021-04-18 at 06:08 +0000, Sebastian Fricke wrote:
> > > Remove a redundant space to improve the quality of the comment.
> > I think this patch is not useful.
> > It's not redundant.
>
> Thank you, I actually found this pattern a few more times but I wanted
> to check first if this is a mistake or chosen consciously.
[]
> > For drivers/base/power/runtime.c, that 2 space after period style is used
> > dozens of times and changing a single instance of it isn't very useful.
Even in that single file it's not consistent.
It's something like 3:1 for 2 spaces over 1 space after period.
I believe it's done more by habit and author age than anything.
If you learned to type using a typewriter and not a keyboard, then
you likely still use 2 spaces after a period.
> True and if I understand you correctly you would rather keep it as is
> right?
Yes. IMO: Whitespace in comments like this should not be changed
unless there's some other significant benefit like better alignment.
cheers, Joe
> > > ---
> > > Side-note:
> > > I found this while reading the code, I don't believe it is important but
> > > I thought it doesn't hurt to fix it.
[]
> > > diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
[]
> > > @@ -786,7 +786,7 @@ static int rpm_resume(struct device *dev, int rpmflags)
> > > }
> > >
> > > /*
> > > - * See if we can skip waking up the parent. This is safe only if
> > > + * See if we can skip waking up the parent. This is safe only if
> > > * power.no_callbacks is set, because otherwise we don't know whether
> > > * the resume will actually succeed.
> > > */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] base: power: runtime.c: Remove a unnecessary space
2021-04-18 9:22 ` Joe Perches
@ 2021-04-19 15:16 ` Rafael J. Wysocki
0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2021-04-19 15:16 UTC (permalink / raw)
To: Joe Perches, Sebastian Fricke
Cc: Linux Kernel Mailing List, Rafael J. Wysocki, Len Brown,
Pavel Machek, Greg Kroah-Hartman, Linux PM
On Sun, Apr 18, 2021 at 11:22 AM Joe Perches <joe@perches.com> wrote:
>
> On Sun, 2021-04-18 at 09:11 +0000, Sebastian Fricke wrote:
> > Hey Joe,
>
> Hi Sebastian.
>
> > On 18.04.2021 00:09, Joe Perches wrote:
> > > On Sun, 2021-04-18 at 06:08 +0000, Sebastian Fricke wrote:
> > > > Remove a redundant space to improve the quality of the comment.
> > > I think this patch is not useful.
> > > It's not redundant.
> >
> > Thank you, I actually found this pattern a few more times but I wanted
> > to check first if this is a mistake or chosen consciously.
I write a double space after a period ending a sentence as a rule and
it is not a mistake.
> []
> > > For drivers/base/power/runtime.c, that 2 space after period style is used
> > > dozens of times and changing a single instance of it isn't very useful.
>
> Even in that single file it's not consistent.
> It's something like 3:1 for 2 spaces over 1 space after period.
>
> I believe it's done more by habit and author age than anything.
> If you learned to type using a typewriter and not a keyboard, then
> you likely still use 2 spaces after a period.
By habit and because I prefer it this way (I find it somewhat easier
to separate sentences from one another this way).
> > True and if I understand you correctly you would rather keep it as is
> > right?
>
> Yes. IMO: Whitespace in comments like this should not be changed
> unless there's some other significant benefit like better alignment.
Agreed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-04-19 15:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-18 6:08 [PATCH] base: power: runtime.c: Remove a unnecessary space Sebastian Fricke
2021-04-18 7:09 ` Joe Perches
2021-04-18 9:11 ` Sebastian Fricke
2021-04-18 9:18 ` Pavel Machek
2021-04-18 9:22 ` Joe Perches
2021-04-19 15:16 ` 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).