linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] power: supply: ab8500: Remove unneeded semicolon
@ 2019-12-19  1:46 Ma Feng
  2019-12-19  1:46 ` [PATCH 2/3] power: supply: ab8500_charger: " Ma Feng
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ma Feng @ 2019-12-19  1:46 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: linux-pm, linux-kernel, Ma Feng

Fixes coccicheck warning:

drivers/power/supply/ab8500_fg.c:2224:5-6: Unneeded semicolon
drivers/power/supply/ab8500_fg.c:2227:4-5: Unneeded semicolon
drivers/power/supply/ab8500_fg.c:2334:3-4: Unneeded semicolon
drivers/power/supply/ab8500_fg.c:2342:3-4: Unneeded semicolon
drivers/power/supply/ab8500_fg.c:2350:3-4: Unneeded semicolon
drivers/power/supply/ab8500_fg.c:2358:3-4: Unneeded semicolon
drivers/power/supply/ab8500_fg.c:2366:3-4: Unneeded semicolon

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ma Feng <mafeng.ma@huawei.com>
---
 drivers/power/supply/ab8500_fg.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
index c3912ee..b96f90a 100644
--- a/drivers/power/supply/ab8500_fg.c
+++ b/drivers/power/supply/ab8500_fg.c
@@ -2221,10 +2221,10 @@ static int ab8500_fg_get_ext_psy_data(struct device *dev, void *data)
 						ab8500_fg_update_cap_scalers(di);
 					queue_work(di->fg_wq, &di->fg_work);
 					break;
-				};
+				}
 			default:
 				break;
-			};
+			}
 			break;
 		case POWER_SUPPLY_PROP_TECHNOLOGY:
 			switch (ext->desc->type) {
@@ -2331,7 +2331,7 @@ static int ab8500_fg_init_hw_registers(struct ab8500_fg *di)
 		if (ret) {
 			dev_err(di->dev, "%s write failed AB8505_RTC_PCUT_MAX_TIME_REG\n", __func__);
 			goto out;
-		};
+		}
 
 		ret = abx500_set_register_interruptible(di->dev, AB8500_RTC,
 			AB8505_RTC_PCUT_FLAG_TIME_REG, di->bm->fg_params->pcut_flag_time);
@@ -2339,7 +2339,7 @@ static int ab8500_fg_init_hw_registers(struct ab8500_fg *di)
 		if (ret) {
 			dev_err(di->dev, "%s write failed AB8505_RTC_PCUT_FLAG_TIME_REG\n", __func__);
 			goto out;
-		};
+		}
 
 		ret = abx500_set_register_interruptible(di->dev, AB8500_RTC,
 			AB8505_RTC_PCUT_RESTART_REG, di->bm->fg_params->pcut_max_restart);
@@ -2347,7 +2347,7 @@ static int ab8500_fg_init_hw_registers(struct ab8500_fg *di)
 		if (ret) {
 			dev_err(di->dev, "%s write failed AB8505_RTC_PCUT_RESTART_REG\n", __func__);
 			goto out;
-		};
+		}
 
 		ret = abx500_set_register_interruptible(di->dev, AB8500_RTC,
 			AB8505_RTC_PCUT_DEBOUNCE_REG, di->bm->fg_params->pcut_debounce_time);
@@ -2355,7 +2355,7 @@ static int ab8500_fg_init_hw_registers(struct ab8500_fg *di)
 		if (ret) {
 			dev_err(di->dev, "%s write failed AB8505_RTC_PCUT_DEBOUNCE_REG\n", __func__);
 			goto out;
-		};
+		}
 
 		ret = abx500_set_register_interruptible(di->dev, AB8500_RTC,
 			AB8505_RTC_PCUT_CTL_STATUS_REG, di->bm->fg_params->pcut_enable);
@@ -2363,7 +2363,7 @@ static int ab8500_fg_init_hw_registers(struct ab8500_fg *di)
 		if (ret) {
 			dev_err(di->dev, "%s write failed AB8505_RTC_PCUT_CTL_STATUS_REG\n", __func__);
 			goto out;
-		};
+		}
 	}
 out:
 	return ret;
-- 
2.6.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] power: supply: ab8500_charger: Remove unneeded semicolon
  2019-12-19  1:46 [PATCH 1/3] power: supply: ab8500: Remove unneeded semicolon Ma Feng
@ 2019-12-19  1:46 ` Ma Feng
  2019-12-19  1:46 ` [PATCH 3/3] power: supply: abx500_chargalg: " Ma Feng
  2019-12-19 17:07 ` [PATCH 1/3] power: supply: ab8500: " Sebastian Reichel
  2 siblings, 0 replies; 4+ messages in thread
From: Ma Feng @ 2019-12-19  1:46 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: linux-pm, linux-kernel, Ma Feng

Fixes coccicheck warning:

drivers/power/supply/ab8500_charger.c:1082:2-3: Unneeded semicolon
drivers/power/supply/ab8500_charger.c:792:2-3: Unneeded semicolon
drivers/power/supply/ab8500_charger.c:2430:2-3: Unneeded semicolon

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ma Feng <mafeng.ma@huawei.com>
---
 drivers/power/supply/ab8500_charger.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
index 8a0f9d7..f69550d 100644
--- a/drivers/power/supply/ab8500_charger.c
+++ b/drivers/power/supply/ab8500_charger.c
@@ -789,7 +789,7 @@ static int ab8500_charger_max_usb_curr(struct ab8500_charger *di,
 		di->max_usb_in_curr.usb_type_max = USB_CH_IP_CUR_LVL_0P05;
 		ret = -ENXIO;
 		break;
-	};
+	}
 
 	di->max_usb_in_curr.set_max = di->max_usb_in_curr.usb_type_max;
 	dev_dbg(di->dev, "USB Type - 0x%02x MaxCurr: %d",
@@ -1079,7 +1079,7 @@ static int ab8500_charger_get_usb_cur(struct ab8500_charger *di)
 		di->max_usb_in_curr.usb_type_max = USB_CH_IP_CUR_LVL_0P05;
 		ret = -EPERM;
 		break;
-	};
+	}
 	di->max_usb_in_curr.set_max = di->max_usb_in_curr.usb_type_max;
 	return ret;
 }
@@ -2427,7 +2427,7 @@ static void ab8500_charger_usb_state_changed_work(struct work_struct *work)
 
 	default:
 		break;
-	};
+	}
 }
 
 /**
-- 
2.6.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] power: supply: abx500_chargalg: Remove unneeded semicolon
  2019-12-19  1:46 [PATCH 1/3] power: supply: ab8500: Remove unneeded semicolon Ma Feng
  2019-12-19  1:46 ` [PATCH 2/3] power: supply: ab8500_charger: " Ma Feng
@ 2019-12-19  1:46 ` Ma Feng
  2019-12-19 17:07 ` [PATCH 1/3] power: supply: ab8500: " Sebastian Reichel
  2 siblings, 0 replies; 4+ messages in thread
From: Ma Feng @ 2019-12-19  1:46 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: linux-pm, linux-kernel, Ma Feng

Fixes coccicheck warning:

drivers/power/supply/abx500_chargalg.c:1826:2-3: Unneeded semicolon

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ma Feng <mafeng.ma@huawei.com>
---
 drivers/power/supply/abx500_chargalg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/abx500_chargalg.c b/drivers/power/supply/abx500_chargalg.c
index e6e37d4..2fb33a0 100644
--- a/drivers/power/supply/abx500_chargalg.c
+++ b/drivers/power/supply/abx500_chargalg.c
@@ -1823,7 +1823,7 @@ static ssize_t abx500_chargalg_en_store(struct abx500_chargalg *di,
 			"Enter 0. Disable AC/USB Charging\n"
 			"1. Enable AC charging\n"
 			"2. Enable USB Charging\n");
-	};
+	}
 	return strlen(buf);
 }
 
-- 
2.6.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] power: supply: ab8500: Remove unneeded semicolon
  2019-12-19  1:46 [PATCH 1/3] power: supply: ab8500: Remove unneeded semicolon Ma Feng
  2019-12-19  1:46 ` [PATCH 2/3] power: supply: ab8500_charger: " Ma Feng
  2019-12-19  1:46 ` [PATCH 3/3] power: supply: abx500_chargalg: " Ma Feng
@ 2019-12-19 17:07 ` Sebastian Reichel
  2 siblings, 0 replies; 4+ messages in thread
From: Sebastian Reichel @ 2019-12-19 17:07 UTC (permalink / raw)
  To: Ma Feng; +Cc: linux-pm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3174 bytes --]

Hi,

On Thu, Dec 19, 2019 at 09:46:29AM +0800, Ma Feng wrote:
> Fixes coccicheck warning:
> 
> drivers/power/supply/ab8500_fg.c:2224:5-6: Unneeded semicolon
> drivers/power/supply/ab8500_fg.c:2227:4-5: Unneeded semicolon
> drivers/power/supply/ab8500_fg.c:2334:3-4: Unneeded semicolon
> drivers/power/supply/ab8500_fg.c:2342:3-4: Unneeded semicolon
> drivers/power/supply/ab8500_fg.c:2350:3-4: Unneeded semicolon
> drivers/power/supply/ab8500_fg.c:2358:3-4: Unneeded semicolon
> drivers/power/supply/ab8500_fg.c:2366:3-4: Unneeded semicolon
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Ma Feng <mafeng.ma@huawei.com>
> ---

Thanks, I queued all 3 patches to power-supply's for-next branch.

-- Sebastian

>  drivers/power/supply/ab8500_fg.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
> index c3912ee..b96f90a 100644
> --- a/drivers/power/supply/ab8500_fg.c
> +++ b/drivers/power/supply/ab8500_fg.c
> @@ -2221,10 +2221,10 @@ static int ab8500_fg_get_ext_psy_data(struct device *dev, void *data)
>  						ab8500_fg_update_cap_scalers(di);
>  					queue_work(di->fg_wq, &di->fg_work);
>  					break;
> -				};
> +				}
>  			default:
>  				break;
> -			};
> +			}
>  			break;
>  		case POWER_SUPPLY_PROP_TECHNOLOGY:
>  			switch (ext->desc->type) {
> @@ -2331,7 +2331,7 @@ static int ab8500_fg_init_hw_registers(struct ab8500_fg *di)
>  		if (ret) {
>  			dev_err(di->dev, "%s write failed AB8505_RTC_PCUT_MAX_TIME_REG\n", __func__);
>  			goto out;
> -		};
> +		}
>  
>  		ret = abx500_set_register_interruptible(di->dev, AB8500_RTC,
>  			AB8505_RTC_PCUT_FLAG_TIME_REG, di->bm->fg_params->pcut_flag_time);
> @@ -2339,7 +2339,7 @@ static int ab8500_fg_init_hw_registers(struct ab8500_fg *di)
>  		if (ret) {
>  			dev_err(di->dev, "%s write failed AB8505_RTC_PCUT_FLAG_TIME_REG\n", __func__);
>  			goto out;
> -		};
> +		}
>  
>  		ret = abx500_set_register_interruptible(di->dev, AB8500_RTC,
>  			AB8505_RTC_PCUT_RESTART_REG, di->bm->fg_params->pcut_max_restart);
> @@ -2347,7 +2347,7 @@ static int ab8500_fg_init_hw_registers(struct ab8500_fg *di)
>  		if (ret) {
>  			dev_err(di->dev, "%s write failed AB8505_RTC_PCUT_RESTART_REG\n", __func__);
>  			goto out;
> -		};
> +		}
>  
>  		ret = abx500_set_register_interruptible(di->dev, AB8500_RTC,
>  			AB8505_RTC_PCUT_DEBOUNCE_REG, di->bm->fg_params->pcut_debounce_time);
> @@ -2355,7 +2355,7 @@ static int ab8500_fg_init_hw_registers(struct ab8500_fg *di)
>  		if (ret) {
>  			dev_err(di->dev, "%s write failed AB8505_RTC_PCUT_DEBOUNCE_REG\n", __func__);
>  			goto out;
> -		};
> +		}
>  
>  		ret = abx500_set_register_interruptible(di->dev, AB8500_RTC,
>  			AB8505_RTC_PCUT_CTL_STATUS_REG, di->bm->fg_params->pcut_enable);
> @@ -2363,7 +2363,7 @@ static int ab8500_fg_init_hw_registers(struct ab8500_fg *di)
>  		if (ret) {
>  			dev_err(di->dev, "%s write failed AB8505_RTC_PCUT_CTL_STATUS_REG\n", __func__);
>  			goto out;
> -		};
> +		}
>  	}
>  out:
>  	return ret;
> -- 
> 2.6.2
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-19 17:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-19  1:46 [PATCH 1/3] power: supply: ab8500: Remove unneeded semicolon Ma Feng
2019-12-19  1:46 ` [PATCH 2/3] power: supply: ab8500_charger: " Ma Feng
2019-12-19  1:46 ` [PATCH 3/3] power: supply: abx500_chargalg: " Ma Feng
2019-12-19 17:07 ` [PATCH 1/3] power: supply: ab8500: " Sebastian Reichel

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).