* [PATCH 4/4] Driver: Power: Supply: abx500_chargalg: Fixed a few coding style errors
@ 2019-09-29 18:19 Madhuparna Bhowmik
2019-09-30 8:23 ` [Linux-kernel-mentees] " Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Madhuparna Bhowmik @ 2019-09-29 18:19 UTC (permalink / raw)
To: linux-pm; +Cc: sre, madhuparnabhowmik03, linux-kernel-mentees
This patch fixes a few coding style errors and warnings
detected by checkpatch.pl:
WARNING: please, no space before tabs
ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line
WARNING: Unnecessary parentheses
WARNING: Block comments use a trailing */ on a separate line
WARNING: Prefer 'long' over 'long int' as the int is unnecessary
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
---
drivers/power/supply/abx500_chargalg.c | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/drivers/power/supply/abx500_chargalg.c b/drivers/power/supply/abx500_chargalg.c
index 23757fb10479..a779fcabe3c6 100644
--- a/drivers/power/supply/abx500_chargalg.c
+++ b/drivers/power/supply/abx500_chargalg.c
@@ -219,7 +219,7 @@ enum maxim_ret {
* @chg_info: information about connected charger types
* @batt_data: data of the battery
* @susp_status: current charger suspension status
- * @bm: Platform specific battery management information
+ * @bm: Platform specific battery management information
* @curr_status: Current step status for over-current protection
* @parent: pointer to the struct abx500
* @chargalg_psy: structure that holds the battery properties exposed by
@@ -354,13 +354,13 @@ static int abx500_chargalg_check_charger_enable(struct abx500_chargalg *di)
if (di->chg_info.charger_type & USB_CHG) {
return di->usb_chg->ops.check_enable(di->usb_chg,
- di->bm->bat_type[di->bm->batt_id].normal_vol_lvl,
- di->bm->bat_type[di->bm->batt_id].normal_cur_lvl);
+ di->bm->bat_type[di->bm->batt_id].normal_vol_lvl,
+ di->bm->bat_type[di->bm->batt_id].normal_cur_lvl);
} else if ((di->chg_info.charger_type & AC_CHG) &&
!(di->ac_chg->external)) {
return di->ac_chg->ops.check_enable(di->ac_chg,
- di->bm->bat_type[di->bm->batt_id].normal_vol_lvl,
- di->bm->bat_type[di->bm->batt_id].normal_cur_lvl);
+ di->bm->bat_type[di->bm->batt_id].normal_vol_lvl,
+ di->bm->bat_type[di->bm->batt_id].normal_cur_lvl);
}
return 0;
}
@@ -865,7 +865,7 @@ static enum maxim_ret abx500_chargalg_chg_curr_maxim(struct abx500_chargalg *di)
di->ccm.wait_cnt = 0;
- if ((di->batt_data.inst_curr > di->ccm.original_iset)) {
+ if (di->batt_data.inst_curr > di->ccm.original_iset) {
dev_dbg(di->dev, " Maximization Ibat (%dmA) too high"
" (limit %dmA) (current iset: %dmA)!\n",
di->batt_data.inst_curr, di->ccm.original_iset,
@@ -967,7 +967,8 @@ static int abx500_chargalg_get_ext_psy_data(struct device *dev, void *data)
/*
* Initialize chargers if not already done.
- * The ab8500_charger*/
+ * The ab8500_charger
+ */
if (!di->ac_chg &&
ext->desc->type == POWER_SUPPLY_TYPE_MAINS)
di->ac_chg = psy_to_ux500_charger(ext);
@@ -1173,7 +1174,8 @@ static int abx500_chargalg_get_ext_psy_data(struct device *dev, void *data)
switch (ext->desc->type) {
case POWER_SUPPLY_TYPE_MAINS:
/* AVG is used to indicate when we are
- * in CV mode */
+ * in CV mode
+ */
if (ret.intval)
di->events.ac_cv_active = true;
else
@@ -1182,7 +1184,8 @@ static int abx500_chargalg_get_ext_psy_data(struct device *dev, void *data)
break;
case POWER_SUPPLY_TYPE_USB:
/* AVG is used to indicate when we are
- * in CV mode */
+ * in CV mode
+ */
if (ret.intval)
di->events.usb_cv_active = true;
else
@@ -1750,7 +1753,7 @@ static ssize_t abx500_chargalg_curr_step_show(struct abx500_chargalg *di,
static ssize_t abx500_chargalg_curr_step_store(struct abx500_chargalg *di,
const char *buf, size_t length)
{
- long int param;
+ long param;
int ret;
ret = kstrtol(buf, 10, ¶m);
@@ -1783,7 +1786,7 @@ static ssize_t abx500_chargalg_en_show(struct abx500_chargalg *di,
static ssize_t abx500_chargalg_en_store(struct abx500_chargalg *di,
const char *buf, size_t length)
{
- long int param;
+ long param;
int ac_usb;
int ret;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Linux-kernel-mentees] [PATCH 4/4] Driver: Power: Supply: abx500_chargalg: Fixed a few coding style errors
2019-09-29 18:19 [PATCH 4/4] Driver: Power: Supply: abx500_chargalg: Fixed a few coding style errors Madhuparna Bhowmik
@ 2019-09-30 8:23 ` Greg KH
2019-10-14 6:58 ` Sebastian Reichel
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2019-09-30 8:23 UTC (permalink / raw)
To: Madhuparna Bhowmik
Cc: linux-pm, madhuparnabhowmik03, linux-kernel-mentees, sre
On Sun, Sep 29, 2019 at 11:49:10PM +0530, Madhuparna Bhowmik wrote:
> This patch fixes a few coding style errors and warnings
> detected by checkpatch.pl:
>
> WARNING: please, no space before tabs
> ERROR: code indent should use tabs where possible
> WARNING: please, no spaces at the start of a line
> WARNING: Unnecessary parentheses
> WARNING: Block comments use a trailing */ on a separate line
> WARNING: Prefer 'long' over 'long int' as the int is unnecessary
I know for the subsystems I maintain, I would require this to be broken
up into "one logical change per patch" so be aware that this might also
need to be done here too.
good luck!
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Linux-kernel-mentees] [PATCH 4/4] Driver: Power: Supply: abx500_chargalg: Fixed a few coding style errors
2019-09-30 8:23 ` [Linux-kernel-mentees] " Greg KH
@ 2019-10-14 6:58 ` Sebastian Reichel
0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Reichel @ 2019-10-14 6:58 UTC (permalink / raw)
To: Madhuparna Bhowmik
Cc: Greg KH, linux-pm, madhuparnabhowmik03, linux-kernel-mentees
[-- Attachment #1: Type: text/plain, Size: 817 bytes --]
Hi,
On Mon, Sep 30, 2019 at 10:23:03AM +0200, Greg KH wrote:
> On Sun, Sep 29, 2019 at 11:49:10PM +0530, Madhuparna Bhowmik wrote:
> > This patch fixes a few coding style errors and warnings
> > detected by checkpatch.pl:
> >
> > WARNING: please, no space before tabs
> > ERROR: code indent should use tabs where possible
> > WARNING: please, no spaces at the start of a line
> > WARNING: Unnecessary parentheses
> > WARNING: Block comments use a trailing */ on a separate line
> > WARNING: Prefer 'long' over 'long int' as the int is unnecessary
>
> I know for the subsystems I maintain, I would require this to be broken
> up into "one logical change per patch" so be aware that this might also
> need to be done here too.
Same applies for the power-supply subsystem. Thanks,
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-14 21:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-29 18:19 [PATCH 4/4] Driver: Power: Supply: abx500_chargalg: Fixed a few coding style errors Madhuparna Bhowmik
2019-09-30 8:23 ` [Linux-kernel-mentees] " Greg KH
2019-10-14 6:58 ` 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).