Skip to contentSkip to conversation

spi: spi-ti-qspi: call pm_runtime_put on pm_runtime_get failure

PATCH Markus Elfring 3 participants 8 messages Jun 2, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
Quoted 2 lines

The counter is incremented via pm_runtime_get even in failure case. To correct the counter call pm_runtime_put in case of failure, too.

How do you think about a wording variant like the following?

Change description:
The PM runtime reference counter is generally incremented by a call of the function “pm_runtime_get_sync”.
Thus call the function “pm_runtime_put_autosuspend” also in one error case to keep the reference counting consistent.

Would you like to add the tag “Fixes” to the commit message?

Regards,
Markus

maintainer
#1 lore raw
Quoted 10 lines · Markus Elfring
Quoted 2 lines

The counter is incremented via pm_runtime_get even in failure case. To correct the counter call pm_runtime_put in case of failure, too.

How do you think about a wording variant like the following?

Change description:
The PM runtime reference counter is generally incremented by a call of the function “pm_runtime_get_sync”.
Thus call the function “pm_runtime_put_autosuspend” also in one error case to keep the reference counting consistent.

The original changelog is perfectly fine, please stop sending these.

#2 lore raw
Quoted 1 line

The original changelog is perfectly fine, please stop sending these.

I find this commit message improvable also according to Linux software development documentation.

Regards,
Markus

maintainer
#3 lore raw
Quoted 4 lines · Markus Elfring
Quoted 1 line

The original changelog is perfectly fine, please stop sending these.

I find this commit message improvable also according to Linux software development documentation.

Causing people to send out new versions of things for tweaks to the commit log consumes time for them and everyone they're sending changes to. Pushing people to make trivial rewordings of their commit logs to match your particular taste is not a good use of people's time.

#4 lore raw
Quoted 5 lines
Quoted 2 lines

I find this commit message improvable also according to Linux software development documentation.

Causing people to send out new versions of things for tweaks to the commit log consumes time for them and everyone they're sending changes to.

Improving patches (besides source code adjustments) is an usual software development activity, isn't it?

Quoted 2 lines

Pushing people to make trivial rewordings of their commit logs to match your particular taste is not a good use of people's time.

Corresponding tweaks can be combined with recommended tags. It can be that only “trivial” items were left over for another bit of fine-tuning. Subsequent description variants can reduce the probability for additional patch review iterations, can't they?

Regards,
Markus

maintainer
#5 lore raw
Quoted 8 lines · Markus Elfring
Quoted 5 lines
Quoted 2 lines

I find this commit message improvable also according to Linux software development documentation.

Causing people to send out new versions of things for tweaks to the commit log consumes time for them and everyone they're sending changes to.

Improving patches (besides source code adjustments) is an usual software development activity, isn't it?

Your updates were not improvements. The formatting was worse and to my native speaker eyes the grammar was worse. With this sort of stylistic thing it's especially important that any review aligns with the needs and practices of the subsystem, there is opinion in there and multiple opinions just makes things harder for submitters.

#6 lore raw
Quoted 8 lines · Mark Brown
Quoted 5 lines · Markus Elfring
Quoted 5 lines
Quoted 2 lines

I find this commit message improvable also according to Linux software development documentation.

Causing people to send out new versions of things for tweaks to the commit log consumes time for them and everyone they're sending changes to.

Quoted 8 lines
Quoted 2 lines

Improving patches (besides source code adjustments) is an usual software development activity, isn't it?

Your updates were not improvements. The formatting was worse and to my native speaker eyes the grammar was worse. With this sort of stylistic thing it's especially important that any review aligns with the needs and practices of the subsystem, there is opinion in there and multiple opinions just makes things harder for submitters.

Thanks Mark for your constructive opinion,
In most cases, such stylistic comments become confusing and discouraging to those who are trying to chip in. Personally I think as long as the patch does not contain typo and is not ambiguous from the maintainer's perspective, it should be fine to let it go forward.

Signature · 1 line
Navid.
#7 lore raw
In reply to Mark Brown
Quoted 1 line

Your updates were not improvements.

I find your view interesting.

Do you refer to a specific wording suggestion here?
https://lore.kernel.org/linux-spi/[email protected]/
https://lkml.org/lkml/2020/6/2/210

You pointed another programming alternative out.
https://lore.kernel.org/patchwork/comment/1447149/
https://lore.kernel.org/linux-spi/[email protected]/

Quoted 1 line

The formatting was worse

Do you prefer an other quotation style for function names?

Quoted 1 line

and to my native speaker eyes the grammar was worse.

I am curious if a more pleasing wording variant will be found.

Quoted 2 lines

With this sort of stylistic thing it's especially important that any review aligns with the needs and practices of the subsystem,

Such an expectation is reasonable to some degree.

Quoted 2 lines

there is opinion in there and multiple opinions just makes things harder for submitters.

Do any of such views deviate from the Linux development documentation?

Regards,
Markus