diff mbox series

[v3,1/4] include/tst_pid.h: fix language typo (subtraction)

Message ID 20210623135912.81156-2-krzysztof.kozlowski@canonical.com
State Superseded
Headers show
Series syscalls/msgstress: fixes for small systems | expand

Commit Message

Krzysztof Kozlowski June 23, 2021, 1:59 p.m. UTC
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 include/tst_pid.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Petr Vorel June 28, 2021, 2:49 p.m. UTC | #1
Hi Krzysztof,

>  /*
> - * Returns number of free pids by substarction of the number of pids
> + * Returns number of free pids by subtraction of the number of pids
>   * currently used ('ps -eT') from max_pids
Because you change the description of this function in the next commit,
I'd just fix this simple typo in 2nd commit. But of course it's not wrong
(prevents keeping the fix even if we'd removed second commit).

Kind regards,
Petr
>   */
>  int tst_get_free_pids_(void (*cleanup_fn)(void));
Krzysztof Kozlowski June 28, 2021, 3:50 p.m. UTC | #2
On 28/06/2021 16:49, Petr Vorel wrote:
> Hi Krzysztof,
> 
>>  /*
>> - * Returns number of free pids by substarction of the number of pids
>> + * Returns number of free pids by subtraction of the number of pids
>>   * currently used ('ps -eT') from max_pids
> Because you change the description of this function in the next commit,
> I'd just fix this simple typo in 2nd commit. But of course it's not wrong
> (prevents keeping the fix even if we'd removed second commit).

The commits should do only one thing (fix one bug, bring one feature if
possible) and the next commit does not touch that line. There is no
re-doing of the same change in next commit.

Best regards,
Krzysztof
Petr Vorel June 28, 2021, 7:29 p.m. UTC | #3
> On 28/06/2021 16:49, Petr Vorel wrote:
> > Hi Krzysztof,

> >>  /*
> >> - * Returns number of free pids by substarction of the number of pids
> >> + * Returns number of free pids by subtraction of the number of pids
> >>   * currently used ('ps -eT') from max_pids
> > Because you change the description of this function in the next commit,
> > I'd just fix this simple typo in 2nd commit. But of course it's not wrong
> > (prevents keeping the fix even if we'd removed second commit).

> The commits should do only one thing (fix one bug, bring one feature if
> possible) and the next commit does not touch that line. There is no
> re-doing of the same change in next commit.
As I wrote in this case I wouldn't bother (with test rewrite to new API there
are much more changes in single commit), but sure you're right this is the best
practice which we follow.

Kind regards,
Petr

> Best regards,
> Krzysztof
diff mbox series

Patch

diff --git a/include/tst_pid.h b/include/tst_pid.h
index 9ba1abb27b7c..6c42f73a57e7 100644
--- a/include/tst_pid.h
+++ b/include/tst_pid.h
@@ -13,7 +13,7 @@ 
 pid_t tst_get_unused_pid_(void (*cleanup_fn)(void));
 
 /*
- * Returns number of free pids by substarction of the number of pids
+ * Returns number of free pids by subtraction of the number of pids
  * currently used ('ps -eT') from max_pids
  */
 int tst_get_free_pids_(void (*cleanup_fn)(void));