[PATCH] power: supply: ab8500_fg: drop unexpected word 'is' in the comments

Jiang Jian posted 1 patch 3 years, 10 months ago
drivers/power/supply/ab8500_fg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] power: supply: ab8500_fg: drop unexpected word 'is' in the comments
Posted by Jiang Jian 3 years, 10 months ago
there is an unexpected word 'is' in the comments that need to be dropped

file - drivers/power/supply/ab8500_fg.c
line - 415

* The capacity filter is is reset to zero.

changed to:

* The capacity filter is reset to zero.

Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com>
---
 drivers/power/supply/ab8500_fg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
index 4339fa9ff009..12eafeca83e1 100644
--- a/drivers/power/supply/ab8500_fg.c
+++ b/drivers/power/supply/ab8500_fg.c
@@ -412,7 +412,7 @@ static int ab8500_fg_add_cap_sample(struct ab8500_fg *di, int sample)
  * ab8500_fg_clear_cap_samples() - Clear average filter
  * @di:		pointer to the ab8500_fg structure
  *
- * The capacity filter is is reset to zero.
+ * The capacity filter is reset to zero.
  */
 static void ab8500_fg_clear_cap_samples(struct ab8500_fg *di)
 {
-- 
2.17.1
Re: [PATCH] power: supply: ab8500_fg: drop unexpected word 'is' in the comments
Posted by Sebastian Reichel 3 years, 9 months ago
Hi,

On Thu, Jun 23, 2022 at 01:14:10AM +0800, Jiang Jian wrote:
> there is an unexpected word 'is' in the comments that need to be dropped
> 
> file - drivers/power/supply/ab8500_fg.c
> line - 415
> 
> * The capacity filter is is reset to zero.
> 
> changed to:
> 
> * The capacity filter is reset to zero.
> 
> Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com>
> ---

Thanks, queued with shortened commit message. No need to describe
what exactly has changed, that's obvious from the patch diff...
Instead commit messages should say _why_ something changed, so in
this case something along the lines 'fix word duplication' is
enough.

-- Sebastian

>  drivers/power/supply/ab8500_fg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
> index 4339fa9ff009..12eafeca83e1 100644
> --- a/drivers/power/supply/ab8500_fg.c
> +++ b/drivers/power/supply/ab8500_fg.c
> @@ -412,7 +412,7 @@ static int ab8500_fg_add_cap_sample(struct ab8500_fg *di, int sample)
>   * ab8500_fg_clear_cap_samples() - Clear average filter
>   * @di:		pointer to the ab8500_fg structure
>   *
> - * The capacity filter is is reset to zero.
> + * The capacity filter is reset to zero.
>   */
>  static void ab8500_fg_clear_cap_samples(struct ab8500_fg *di)
>  {
> -- 
> 2.17.1
>